|
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.TrueSequenceFactory
SequenceFactory implementation that uses a singular
database sequence to generate numbers. Named true as it attempts to
use native database id generation.
Note this will NOT work on databases that do not support sequences (e.g. SQLServer).
| Constructor Summary | |
TrueSequenceFactory()
|
|
| 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 |
getSequenceName()
Return the name of the sequence used |
java.lang.String |
getTableName()
Return the table name to run sequence queries against. |
static void |
main(java.lang.String[] args)
Usage: java com.solarmetric.kodo.impl.jdbc.schema.TrueSequenceFactory [option]* |
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 |
setSequenceName(java.lang.String seqName)
Set the sequence used. |
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 |
| Constructor Detail |
public TrueSequenceFactory()
| 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 java.lang.String getSequenceName()
public void setSequenceName(java.lang.String seqName)
JDOSEQUENCE.
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
public static void main(java.lang.String[] args)
throws java.sql.SQLException
Usage: java com.solarmetric.kodo.impl.jdbc.schema.TrueSequenceFactory [option]*
Where the following options are recognized.
Configuration;
optionalJDBCConfiguration can be set by using their
names and supplying a value; for example:
-licenseKey adslfja83r3lkadfIf the license key is not specified otherwise, Kodo will check for
default preference files with license keys as outlined in
DefaultConfiguration.
java.sql.SQLException
|
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 | |||||||||