| java.lang.Object com.completex.objective.components.persistency.key.impl.VersionSequenceKeyGeneratorImpl
All known Subclasses: com.completex.objective.components.persistency.key.impl.SimpleVersionSequenceKeyGeneratorImpl, com.completex.objective.components.persistency.key.impl.OdalSimpleVersionSequenceKeyGenerator, com.completex.objective.components.persistency.key.impl.BulkVersionSequenceKeyGenerator100, com.completex.objective.components.persistency.key.impl.OdalBulkVersionSequenceKeyGenerator100,
VersionSequenceKeyGeneratorImpl | public class VersionSequenceKeyGeneratorImpl implements ComplexSequenceKeyGenerator(Code) | | Sequence based version generator - decorator for ComplexSequenceKeyGenerator
Example of key generator section:
keyGenerator = {
class = com.completex.objective.components.persistency.key.impl.VersionSequenceKeyGeneratorImpl
staticAttributes = {
name = CONTACT_SEQ
alwaysGenerate = TRUE # or FALSE
}
}
author: Gennady Krizhevsky |
Method Summary | |
public Object | getNextKey(Transaction transaction, Persistency persistency, Record record) | public Object | getNextKey(Transaction transaction, Persistency persistency, Record record, Object dynamicParameters) | public Object | getNextKeyPlain(Transaction transaction, Persistency persistency, String objectName) | public String | getSeqName() | public Object | getStaticParameters() | public void | insertValue(Transaction transaction, Persistency persistency, PersistentEntry persistentEntry) | public boolean | isAlwaysGenerate() | protected boolean | isInsertConditionSatisfied0(PersistentEntry persistentEntry) | public void | setAlwaysGenerate(boolean alwaysGenerate) | public void | setDatabasePolicy(DatabasePolicy databasePolicy) | public void | setLogger(Log log) | public void | setSeqName(String seqName) | public void | setStaticParameters(Object staticParameters) | public void | updateValue(Transaction transaction, Persistency persistency, PersistentEntry persistentEntry, boolean complexDirty) Populates value when the condition (persistentEntry.getRecord().isDirty() || isAlwaysGenerate()) is true
and the condition (persistentEntry.getValue() == null or not persistentEntry.isDirty()) is true. |
TAG_ALWAYS_GENERATE | final public static String TAG_ALWAYS_GENERATE(Code) | | |
alwaysGenerate | protected boolean alwaysGenerate(Code) | | |
VersionSequenceKeyGeneratorImpl | public VersionSequenceKeyGeneratorImpl(ComplexSequenceKeyGenerator delegateKeyGenerator, DatabasePolicy databasePolicy, String seqName, Log logger)(Code) | | Parameters: delegateKeyGenerator - Parameters: databasePolicy - Parameters: seqName - Parameters: logger - |
VersionSequenceKeyGeneratorImpl | public VersionSequenceKeyGeneratorImpl()(Code) | | |
isAlwaysGenerate | public boolean isAlwaysGenerate()(Code) | | Returns true if the version value has to be populated even if Record is not dirty
true if the version value has to be populated even if Record is not dirty |
isInsertConditionSatisfied0 | protected boolean isInsertConditionSatisfied0(PersistentEntry persistentEntry)(Code) | | |
setAlwaysGenerate | public void setAlwaysGenerate(boolean alwaysGenerate)(Code) | | Set true if the version value has to be populated even if Record is not dirty
Parameters: alwaysGenerate - true if the version value has to be populated even if Record is not dirty |
|
|