|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.lyophil.jdbc.JDBCIdentifierSource
A long number source that keeps them in a table in a database and pulls them out one at a time, starting at zero. Built off of the JDBC 1.2 protocol. It'd be much nicer with the JDBC 2.0 protocol.
Field Summary | |
private java.lang.Object |
guard
synchronization guard for the database. |
private static long |
LASTID
|
static java.lang.String |
PROPKEY
|
Fields inherited from interface net.walend.lyophil.IdentifierSource |
ROLE |
Constructor Summary | |
JDBCIdentifierSource()
|
Method Summary | |
boolean |
checkSetUp()
make sure the backing storage is set up correctly |
java.io.Serializable |
createID()
Return a Long unique in the system, based on a database table. |
protected java.lang.String |
getDatabaseName()
|
protected PropertySource |
getLongProperties()
|
protected PropertySource |
getPropertySource()
|
java.io.Serializable |
peekNextID()
Returns the next id to be created, without assigning it as in use. |
void |
setUp()
set up the backing storage |
void |
tearDown()
clean up the backing storage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPKEY
private final java.lang.Object guard
private static final long LASTID
Constructor Detail |
public JDBCIdentifierSource()
Method Detail |
protected PropertySource getPropertySource()
protected java.lang.String getDatabaseName()
protected PropertySource getLongProperties()
public boolean checkSetUp()
IdentifierSource
checkSetUp
in interface IdentifierSource
public void setUp()
IdentifierSource
setUp
in interface IdentifierSource
public void tearDown()
IdentifierSource
tearDown
in interface IdentifierSource
public java.io.Serializable peekNextID()
IdentifierSource
peekNextID
in interface IdentifierSource
public java.io.Serializable createID()
createID
in interface IdentifierSource
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |