|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.indiana.util.db.RDBCollectionIDFactory
public class RDBCollectionIDFactory
Used to obtain the next available unique RDBCollectionID.
Field Summary | |
---|---|
protected int |
nextIdentifier
|
Constructor Summary | |
---|---|
RDBCollectionIDFactory(DBInfo info)
Creates a new instance of RDBcollectionIDFactory and loads the next value of the RDBCollectionID from the constantstable in the database. |
Method Summary | |
---|---|
void |
finalize()
Method finalize |
RDBCollectionID |
generateIdentifier()
Generates the next RDBCollectionID |
protected boolean |
isNextIdentifierValueSet()
Method isNextIdentifierValueSet |
protected void |
reset()
Resets the factory |
void |
setNextIdentifier(int nextIdentifier)
Sets the next value of ID to be the passed parameter. |
protected void |
setNextIdentifierFromDB()
Reads the next value for the RDBCollectionID form the ConstantsTable in the database |
protected void |
setNextIdentifierValueSet(boolean nextIdentifierValueSet)
|
void |
shutDown()
Shutsdown the factory by storing the nextIdentifier in the database. |
protected void |
storeNextIdentifierToDB()
Stores the nextIdentofoer in the constants table in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int nextIdentifier
Constructor Detail |
---|
public RDBCollectionIDFactory(DBInfo info)
info
- a DBInfoMethod Detail |
---|
public RDBCollectionID generateIdentifier()
protected void setNextIdentifierValueSet(boolean nextIdentifierValueSet)
nextIdentifierValueSeta
- booleanprotected boolean isNextIdentifierValueSet()
protected void setNextIdentifierFromDB()
protected void storeNextIdentifierToDB()
public void setNextIdentifier(int nextIdentifier) throws InvalidCollectionIDException
nextIdentifier
- an int
InvalidCollectionIDException
protected void reset()
public void shutDown()
public void finalize()
finalize
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |