| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|
com.newstep.solid.persistence.db
|
Class KeyTableUidGenerator
|
public class KeyTableUidGenerator
Implements a generic unique id generation mechanism using a database table
with sequence names and values for update
TODO: emulate a hilo sequence generator.
Implements:
UniqueIdGenerator
Links:
Implementation Implementation Link
Implements a generic unique id generation mechanism using a database table
with sequence names and values for update
TODO: emulate a hilo sequence generator.
| Field Summary |
private static String |
|
private final static long |
|
private final static String |
|
private final static String |
|
private final static String |
|
private final static String |
|
private final static String |
|
private final static String |
|
private final static String |
|
private static Logger |
|
private final static String |
|
private final static long |
|
| Constructor Summary |
public void |
|
| Method Summary |
public int |
|
public int |
|
private static String className
Multiplicity:
1
Static.
private final static long INIT_SEQUENCE_VAL
Final.
Multiplicity:
1
Static.
private final static String KEY_ID
Final.
Multiplicity:
1
Static.
private final static String KEY_INSERT
Final.
Multiplicity:
1
Static.
private final static String KEY_QUERY
Final.
Multiplicity:
1
Static.
private final static String KEY_QUERY_LOCKED
Final.
Multiplicity:
1
Static.
private final static String KEY_TABLE
Final.
Multiplicity:
1
Static.
private final static String KEY_UPDATE
Final.
Multiplicity:
1
Static.
private final static String KEY_VALUE
Final.
Multiplicity:
1
Static.
private static Logger logger
Multiplicity:
1
Static.
private final static String MAX_KEY
Final.
Multiplicity:
1
Static.
private final static long MAX_SEQUENCE_VAL
Final.
Multiplicity:
1
Static.
public void KeyTableUidGenerator ()
Constructor for the KeyTableUidGenerator object
Stereotype:
create
public int getCurrentUniqueId (String uidName, Transaction trans)
Gets the current value of the specified sequence
Parameters:
uidName the name of the sequence to retrieve
trans the transaction in which the sequence should be retrieved
Exceptions:
PersistenceException if an error occurs retrieving the specified sequence
Return:
The current sequence value
Throws:
PersistenceException
public int getNextUniqueId (String uidName, Transaction trans)
Gets the next valid unique id for the specified sequence
Parameters:
uidName the name of the sequence to increment
trans the transaction in which the sequence should be incremented
Exceptions:
PersistenceException if an error occurs incrementing the specified sequence
Return:
The next sequence value
Throws:
PersistenceException
| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|