|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.solarmetric.rd.kodo.impl.jdbc.schema.ClassSequenceFactory
SequenceFactory implementation that uses a sequence per class
to generate numbers. It checks for the extension "sequence" under
class-level metadata.
Note that much of the code here is duplicated across
TrueSequenceFactory. The code is seperated for clarity
to plug-in developers.
| Field Summary | |
static java.lang.String |
SEQUENCE_EXT
|
| Constructor Summary | |
ClassSequenceFactory()
|
|
| Method Summary | |
java.lang.String |
getFormat()
Return the MessageFormat string to use as for SQL generation. |
long |
getNext(java.lang.Class cls,
java.lang.String user,
java.lang.String pass)
Return a unique primary key value. |
java.lang.String |
getTableName()
Return the table name to run sequence queries against. |
void |
setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
Set the configuration for this factory; allows access to database connection information, etc. |
void |
setFormat(java.lang.String messageFormat)
Set the string used for MessageFormat to generate
the sequence selecting SQL. |
void |
setTableName(java.lang.String name)
Set the table name to run sequence queries against. |
| 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 SEQUENCE_EXT
| Constructor Detail |
public ClassSequenceFactory()
| Method Detail |
public java.lang.String getTableName()
public void setTableName(java.lang.String name)
DUAL.
name - the name of the tablepublic java.lang.String getFormat()
MessageFormat string to use as for SQL generation.
public void setFormat(java.lang.String messageFormat)
MessageFormat to generate
the sequence selecting SQL. Should have two placeholders:
{0} for the sequence name and {1} for the table name (e.g. dual).
Also, it converts $ to spaces to help with auto configuration
Defaults to select {0}.NEXTVAL from {1}.
public void setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
SequenceFactory
setConfiguration in interface SequenceFactory
public long getNext(java.lang.Class cls,
java.lang.String user,
java.lang.String pass)
SequenceFactory
getNext in interface SequenceFactorycls - the class of the object being persisteduser - the authentication information for connecting to the
databasepass - the authentication information for connecting to the
database
|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||