NativeSequencepublic class NativeSequence extends QuerySequence
Constructors Summary |
---|
public NativeSequence()
super();
setShouldSkipUpdate(true);
| public NativeSequence(String name)
super(name);
setShouldSkipUpdate(true);
| public NativeSequence(String name, int size)
super(name, size);
setShouldSkipUpdate(true);
| public NativeSequence(String name, int size, int initialValue)
super(name, size, initialValue);
setShouldSkipUpdate(true);
|
Methods Summary |
---|
protected oracle.toplink.essentials.queryframework.ValueReadQuery | buildSelectQuery()INTERNAL:
return ((DatabasePlatform)getDatasourcePlatform()).buildSelectQueryForNativeSequence();
| protected oracle.toplink.essentials.queryframework.ValueReadQuery | buildSelectQuery(java.lang.String seqName, java.lang.Integer size)INTERNAL:
return ((DatabasePlatform)getDatasourcePlatform()).buildSelectQueryForNativeSequence(seqName, size);
| public boolean | equals(java.lang.Object obj)
if (obj instanceof NativeSequence) {
return equalNameAndSize(this, (NativeSequence)obj);
} else {
return false;
}
| public void | onConnect()INTERNAL:
DatabasePlatform dbPlatform = null;
try {
dbPlatform = (DatabasePlatform)getDatasourcePlatform();
} catch (ClassCastException ex) {
if (getSelectQuery() == null) {
throw ValidationException.platformDoesNotSupportSequence(getName(), Helper.getShortClassName(getDatasourcePlatform()), Helper.getShortClassName(this));
}
}
if (!dbPlatform.supportsNativeSequenceNumbers() && (getSelectQuery() == null)) {
throw ValidationException.platformDoesNotSupportSequence(getName(), Helper.getShortClassName(getDatasourcePlatform()), Helper.getShortClassName(this));
}
super.onConnect();
if (dbPlatform != null) {
setShouldAcquireValueAfterInsert(dbPlatform.shouldNativeSequenceAcquireValueAfterInsert());
setShouldUseTransaction(dbPlatform.shouldNativeSequenceUseTransaction());
}
| public void | onDisconnect()INTERNAL:
setShouldAcquireValueAfterInsert(false);
setShouldUseTransaction(false);
super.onDisconnect();
|
|