Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.persistence.db
Class KeyTableUidGenerator
All Implemented Interfaces:
       UniqueIdGenerator

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
to Interface UniqueIdGenerator
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
getCurrentUniqueId(String uidName, Transaction trans)
public int
getNextUniqueId(String uidName, Transaction trans)
Field Detail
className
private static String className
Multiplicity:
1
Static.
 

INIT_SEQUENCE_VAL
private final static long INIT_SEQUENCE_VAL
Final.
Multiplicity:
1
Static.
 

KEY_ID
private final static String KEY_ID
Final.
Multiplicity:
1
Static.
 

KEY_INSERT
private final static String KEY_INSERT
Final.
Multiplicity:
1
Static.
 

KEY_QUERY
private final static String KEY_QUERY
Final.
Multiplicity:
1
Static.
 

KEY_QUERY_LOCKED
private final static String KEY_QUERY_LOCKED
Final.
Multiplicity:
1
Static.
 

KEY_TABLE
private final static String KEY_TABLE
Final.
Multiplicity:
1
Static.
 

KEY_UPDATE
private final static String KEY_UPDATE
Final.
Multiplicity:
1
Static.
 

KEY_VALUE
private final static String KEY_VALUE
Final.
Multiplicity:
1
Static.
 

logger
private static Logger logger
Multiplicity:
1
Static.
 

MAX_KEY
private final static String MAX_KEY
Final.
Multiplicity:
1
Static.
 

MAX_SEQUENCE_VAL
private final static long MAX_SEQUENCE_VAL
Final.
Multiplicity:
1
Static.
 
Constructor Detail
KeyTableUidGenerator
public void KeyTableUidGenerator ()
 
Constructor for the KeyTableUidGenerator object
Stereotype:
create
 
Method Detail
getCurrentUniqueId
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
 

getNextUniqueId
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
 

Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD