public class JotyDataBuffer.QueueManager
extends java.lang.Object
It supports adding and deleting operations to the queue, indeed, but, not only, what is the most useful feature of this object, a linear representation of the queue is offered to the user: all items are presented with a whatever verbose description, derived by any reasonable data joining, and they are listed in the queuing order. This is obtained with a mapping between the positioning index on the presented list and the positioning index of the record as loaded in memory.
The most of the actions of the user that imply the modification of the queue must be performed as transaction: this class makes available tools for making it easy.
At a user's actions level this class strictly collaborates with the
QueuedDataTransferHandler
.
QueuedDataTransferHandler
Modifier and Type | Field and Description |
---|---|
java.lang.String |
idField |
java.lang.Integer |
m_sourceBP |
int |
m_sourceNextBP |
long |
m_sourceNextID |
int |
m_sourcePrecBP |
long |
m_sourcePrevID |
int |
m_targetBP |
java.lang.String |
nextField |
java.lang.String |
prevField |
Modifier and Type | Method and Description |
---|---|
void |
addRecord(WResultSet rs) |
void |
buildOrderMap()
Called by
loadData of the container class, it builds the core
data structures used by the GUI part of the queue, implemented by the
Table object. |
boolean |
deleteRecord(long id) |
void |
empty() |
int |
getID(int buffPosition) |
int |
getIDFromRowIndex(int buffPosition) |
java.lang.Integer |
getIdRow(long id) |
java.lang.Integer |
getMappedRow(int row) |
int |
getNextID(int buffPosition) |
int |
getPrevID(int buffPosition) |
java.lang.Integer |
getReverseMappedRow(int row) |
protected java.lang.String |
managedDbTable() |
boolean |
manageQueueOnDbTable(long id,
int m_targetIndex,
boolean internalMove,
boolean delayedId)
Makes the move.
|
boolean |
manageRemoval() |
void |
prepareTransaction(int m_index)
Identifies all the sources and all the targets for the assignments
that will make the 'move' in the queue
|
void |
setMainMetadata(java.lang.String managedDbTable,
java.lang.String id_dbField) |
public java.lang.String idField
public java.lang.String prevField
public java.lang.String nextField
public long m_sourcePrevID
public long m_sourceNextID
public int m_sourcePrecBP
public int m_sourceNextBP
public java.lang.Integer m_sourceBP
public int m_targetBP
public void addRecord(WResultSet rs)
public void buildOrderMap()
loadData
of the container class, it builds the core
data structures used by the GUI part of the queue, implemented by the
Table
object.Table
public boolean deleteRecord(long id)
public void empty()
public int getID(int buffPosition)
public int getIDFromRowIndex(int buffPosition)
public java.lang.Integer getIdRow(long id)
public java.lang.Integer getMappedRow(int row)
public int getNextID(int buffPosition)
public int getPrevID(int buffPosition)
public java.lang.Integer getReverseMappedRow(int row)
protected java.lang.String managedDbTable()
public boolean manageQueueOnDbTable(long id, int m_targetIndex, boolean internalMove, boolean delayedId)
It worth noting that the method relies on the features of the framework that sustain a transaction through the web or not.
id
- the entity idm_targetIndex
- (optionally valued) if the list is target of the move it
is the index of target row before of which or upon on
which the new record must take place.internalMove
- true in the case of a move of an 'atom' from a position in
the queue to a new one.delayedId
- true if in web mode and a new record is being createdpublic boolean manageRemoval()
public void prepareTransaction(int m_index)
public void setMainMetadata(java.lang.String managedDbTable, java.lang.String id_dbField)