|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.indiana.iucbrf.feature.FeatureKeyFactory edu.indiana.iucbrf.feature.FeatureKeyIntFactory
public class FeatureKeyIntFactory
Used to obtain the next available unique FeatureKey.
Field Summary | |
---|---|
protected int |
nextKey
|
Fields inherited from class edu.indiana.iucbrf.feature.FeatureKeyFactory |
---|
constantName, dbFactory, info, nextKeyValueSet |
Constructor Summary | |
---|---|
FeatureKeyIntFactory()
Creates a new instance of FeatureKeyFactory |
|
FeatureKeyIntFactory(DBInfo info)
Creates a new instance of FeatureKeyFactory and loads the next value of the nextKey from the constantstable in the database. |
|
FeatureKeyIntFactory(int startKey)
Constructor |
Method Summary | |
---|---|
FeatureKey |
convertDBStringToKey(java.lang.String dbEntry)
Assumes that the dbEntry String contains an integer. |
FeatureKey |
generateKey()
Method generateKey |
protected void |
reset()
Resets the factory |
void |
setNextKey(int nextKey)
Sets the next value of nextKey to be the passed parameter. |
protected void |
setNextKeyFromDB()
Reads the next value for nextKey from the ConstantsTable in the database |
protected void |
setNextKeyFromDB(boolean checkIfSetAlready)
Reads the next value for nextKey from the ConstantsTable in the database |
protected void |
storeNextKeyToDB()
Stores the nextKey in the constants table in the database. |
Methods inherited from class edu.indiana.iucbrf.feature.FeatureKeyFactory |
---|
finalize, isDBFactory, isNextKeyValueSet, setDBFactory, setNextKeyValueSet, shutDown |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int nextKey
Constructor Detail |
---|
public FeatureKeyIntFactory()
public FeatureKeyIntFactory(int startKey)
startKey
- an intpublic FeatureKeyIntFactory(DBInfo info)
info
- a DBInfoMethod Detail |
---|
public FeatureKey generateKey()
generateKey
in class FeatureKeyFactory
public FeatureKey convertDBStringToKey(java.lang.String dbEntry)
convertDBStringToKey
in class FeatureKeyFactory
protected void setNextKeyFromDB()
setNextKeyFromDB
in class FeatureKeyFactory
protected void setNextKeyFromDB(boolean checkIfSetAlready)
public void setNextKey(int nextKey)
nextKey
- an intprotected void reset()
protected void storeNextKeyToDB()
storeNextKeyToDB
in class FeatureKeyFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |