Class UUIDSequence
java.lang.Object
org.eclipse.persistence.sequencing.Sequence
org.eclipse.persistence.sequencing.UUIDSequence
- All Implemented Interfaces:
- Serializable,- Cloneable
- See Also:
- 
Field SummaryFields inherited from class org.eclipse.persistence.sequencing.Sequencedepth, initialValue, isCustomQualifier, name, platform, qualifier, shouldAlwaysOverrideExistingValue, size
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetGeneratedValue(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, String seqName) INTERNAL: Return the newly-generated sequencing value.getGeneratedVector(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, String seqName, int size) INTERNAL: Return a Vector of newly-generated sequencing values.voidINTERNAL: This method is called when Sequencing object is created.voidINTERNAL: This method is called when Sequencing object is destroyed.booleanINTERNAL: Indicates whether sequencing value should be acquired after INSERT.booleanINTERNAL: Indicates whether several sequencing values should be acquired at a time and be kept by TopLink.booleanINTERNAL: Indicates whether TopLink should internally call beginTransaction() before getGeneratedValue/Vector, and commitTransaction after.Methods inherited from class org.eclipse.persistence.sequencing.Sequenceclone, equalNameAndSize, equals, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getInitialValue, getName, getPreallocationSize, getQualified, getQualifier, hashCode, isConnected, isCustomQualifier, isNative, isTable, isUnaryTable, onConnect, onDisconnect, setDatasourcePlatform, setInitialValue, setName, setPreallocationSize, setQualifier, setShouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, shouldAlwaysOverrideExistingValue, toString, verifyPlatform
- 
Constructor Details- 
UUIDSequencepublic UUIDSequence()
- 
UUIDSequence
 
- 
- 
Method Details- 
getGeneratedValuepublic Object getGeneratedValue(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, String seqName) Description copied from class:SequenceINTERNAL: 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).- Specified by:
- getGeneratedValuein class- Sequence
- Parameters:
- accessor- Accessor is a separate sequencing accessor (may be null);
- writeSession- Session is a Session used for writing (either ClientSession or DatabaseSession);
- seqName- String is sequencing number field name
 
- 
getGeneratedVectorpublic Vector getGeneratedVector(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, String seqName, int size) Description copied from class:SequenceINTERNAL: 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).- Specified by:
- getGeneratedVectorin class- Sequence
- Parameters:
- accessor- Accessor is a separate sequencing accessor (may be null);
- writeSession- Session is a Session used for writing (either ClientSession or DatabaseSession);
- seqName- String is sequencing number field name
- size- int number of values to preallocate (output Vector size).
 
- 
onConnectpublic void onConnect()Description copied from class:SequenceINTERNAL: This method is called when Sequencing object is created. If it requires initialization, subclass should override this method.
- 
onDisconnectpublic void onDisconnect()Description copied from class:SequenceINTERNAL: This method is called when Sequencing object is destroyed. If it requires deinitialization, subclass should override this method.- Specified by:
- onDisconnectin class- Sequence
 
- 
shouldAcquireValueAfterInsertpublic boolean shouldAcquireValueAfterInsert()Description copied from class:SequenceINTERNAL: 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.- Specified by:
- shouldAcquireValueAfterInsertin class- Sequence
 
- 
shouldUseTransactionpublic boolean shouldUseTransaction()Description copied from class:SequenceINTERNAL: 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.- Specified by:
- shouldUseTransactionin class- Sequence
 
- 
shouldUsePreallocationpublic boolean shouldUsePreallocation()Description copied from class:SequenceINTERNAL: Indicates whether several sequencing values should be acquired at a time and be kept by TopLink. This in only possible in case sequencing numbers should be acquired before insert (shouldAcquireValueAfterInsert()==false). In default implementation, it is true for table sequencing and native sequencing on Oracle platform, false for native sequencing on other platforms.- Overrides:
- shouldUsePreallocationin class- Sequence
 
 
-