Methods Summary |
---|
public boolean | equals(java.lang.Object obj)
if (obj instanceof DefaultSequence) {
return equalNameAndSize(this, (DefaultSequence)obj);
} else {
return false;
}
|
public oracle.toplink.essentials.sequencing.Sequence | getDefaultSequence()
return getDatasourcePlatform().getDefaultSequence();
|
public java.lang.Object | getGeneratedValue(oracle.toplink.essentials.internal.databaseaccess.Accessor accessor, oracle.toplink.essentials.internal.sessions.AbstractSession writeSession, java.lang.String seqName)INTERNAL:
Return the newly-generated sequencing value.
Used only in case preallocation is not used (shouldUsePreallocation()==false).
Accessor may be non-null only in case shouldUseSeparateConnection()==true.
Even in this case accessor could be null - if SequencingControl().shouldUseSeparateConnection()==false;
Therefore in case shouldUseSeparateConnection()==true, implementation should handle
both cases: use a separate connection if provided (accessor != null), or get by
without it (accessor == null).
return getDefaultSequence().getGeneratedValue(accessor, writeSession, seqName);
|
public java.util.Vector | getGeneratedVector(oracle.toplink.essentials.internal.databaseaccess.Accessor accessor, oracle.toplink.essentials.internal.sessions.AbstractSession writeSession, java.lang.String name, int size)INTERNAL:
Return a Vector of newly-generated sequencing values.
Used only in case preallocation is used (shouldUsePreallocation()==true).
Accessor may be non-null only in case shouldUseSeparateConnection()==true.
Even in this case accessor could be null - if SequencingControl().shouldUseSeparateConnection()==false;
Therefore in case shouldUseSeparateConnection()==true, implementation should handle
both cases: use a separate connection if provided (accessor != null), or get by
without it (accessor == null).
return getDefaultSequence().getGeneratedVector(accessor, writeSession, name, size);
|
public int | getInitialValue()
if ((initialValue != 0) || (getDefaultSequence() == null)) {
return initialValue;
} else {
return getDefaultSequence().getInitialValue();
}
|
public int | getPreallocationSize()
if ((size != 0) || (getDefaultSequence() == null)) {
return size;
} else {
return getDefaultSequence().getPreallocationSize();
}
|
public boolean | hasPreallocationSize()
return size != 0;
|
protected void | onConnect()INTERNAL:
This method is called when Sequencing object is created.
It's a chance to do initialization.
// nothing to do
|
public void | onDisconnect()INTERNAL:
This method is called when Sequencing object is destroyed..
It's a chance to do deinitialization.
// nothing to do
|
public boolean | shouldAcquireValueAfterInsert()INTERNAL:
Indicates whether sequencing value should be acquired after INSERT.
Note that preallocation could be used only in case sequencing values
should be acquired before insert (this method returns false).
In default implementation, it is true for table sequencing and native
sequencing on Oracle platform, false for native sequencing on other platforms.
return getDefaultSequence().shouldAcquireValueAfterInsert();
|
public boolean | shouldOverrideExistingValue(java.lang.String seqName, java.lang.Object existingValue)INTERNAL:
Indicates whether existing attribute value should be overridden.
This method is called in case an attribute mapped to PK of sequencing-using
descriptor contains non-null value.
return getDefaultSequence().shouldOverrideExistingValue(seqName, existingValue);
|
public boolean | shouldUseTransaction()INTERNAL:
Indicates whether TopLink should internally call beginTransaction() before
getGeneratedValue/Vector, and commitTransaction after.
In default implementation, it is true for table sequencing and
false for native sequencing.
return getDefaultSequence().shouldUseTransaction();
|