|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.persist.broker.TableSequence
This PrimaryKeyStrategy involves selecting a sequence value from a table. The column name selected is constructed with the following format {0}_uid_seq, where {0} is the table name of the persistent object that requires a PK.
Field Summary | |
protected java.lang.String |
sequenceColumnSuffix
|
protected java.lang.String |
sequenceTableName
|
Constructor Summary | |
TableSequence()
|
Method Summary | |
java.lang.String |
getSequenceColumnSuffix()
Returns the suffix of the column which is queried to get the next sequence number for a given table. |
java.lang.String |
getSequenceTableName()
Returns the name of the table which is queried to get the next sequence number for a given table. |
java.lang.Object |
nextPrimaryKey(RDBBroker broker,
RDBPersistence pObj)
Calls to this method should never return the same value. |
void |
setSequenceColumnSuffix(java.lang.String newSuffix)
Bean style mutator to allow client code to alter which column that the sequence value is selected from. |
void |
setSequenceTableName(java.lang.String newTableName)
Bean style mutator to allow client code to alter which table that the sequence value is selected from. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String sequenceTableName
protected java.lang.String sequenceColumnSuffix
Constructor Detail |
public TableSequence()
Method Detail |
public void setSequenceTableName(java.lang.String newTableName)
newTableName
- The new table name from which to select
the sequence value from.public void setSequenceColumnSuffix(java.lang.String newSuffix)
newSuffix
- The new SequenceColumnSuffix valuepublic java.lang.String getSequenceTableName()
public java.lang.String getSequenceColumnSuffix()
public java.lang.Object nextPrimaryKey(RDBBroker broker, RDBPersistence pObj) throws java.sql.SQLException, QueryException
PrimaryKeyStrategy
nextPrimaryKey
in interface PrimaryKeyStrategy
broker
- - The current broker being used.pObj
- - The peristent object to get a primary key for
java.sql.SQLException
QueryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |