|
SolarMetric Kodo JDO 2.4.3 generated on March 27 2003 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.solarmetric.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.
Designed as an example for subclassing / re-implementation.
Only tested on Oracle. Other databases may require
subclassing or re-implementation using this class
as a basis.
SequenceFactory,
DBDictionaryFactory, Serialized Form| Constructor Summary | |
|---|---|
TrueSequenceFactory()
|
|
| Method Summary | |
|---|---|
String |
getFormat()
Return the MessageFormat String to use for SQL generation |
long |
getNext(Class cls,
Connector connector)
Gets the next id by pulling the next value from the sequence |
String |
getSequenceName()
Return the name of the sequence used |
String |
getTableName()
Return the table name to run sequence queries against. |
static void |
main(String[] args)
Usage: java com.solarmetric.kodo.impl.jdbc.schema.TrueSequenceFactory [option]* -action <increment> |
void |
setConfiguration(JDBCConfiguration conf,
DBDictionary dict)
Set the configuration for this factory; allows access to database connection information, etc. |
void |
setFormat(String messageFormat)
Set the String used for MessageFormat to generate the sequence selecting SQL. |
void |
setSequenceName(String seqName)
Set the sequence used. |
void |
setTableName(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 String getTableName()
public void setTableName(String name)
name - the name of the tablepublic String getFormat()
public void setFormat(String messageFormat)
public String getSequenceName()
public void setSequenceName(String seqName)
public void setConfiguration(JDBCConfiguration conf,
DBDictionary dict)
SequenceFactorysetConfiguration in interface SequenceFactory
public long getNext(Class cls,
Connector connector)
throws SQLException
getNext in interface SequenceFactory
public static void main(String[] args)
throws SQLException
Usage: java com.solarmetric.kodo.impl.jdbc.schema.TrueSequenceFactory [option]* -action <increment>
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.
|
SolarMetric Kodo JDO 2.4.3 generated on March 27 2003 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||