Top Fields Constructors Methods
org.eclipse.persistence.sequencing

public Class UUIDSequence

extends Sequence
Class Inheritance
Imports
java.util.UUID, .Vector, org.eclipse.persistence.internal.databaseaccess.Accessor, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.queries.ValueReadQuery

Field Summary

Inherited from org.eclipse.persistence.sequencing.Sequence:
depthinitialValueisCustomQualifiernameplatformqualifiershouldAlwaysOverrideExistingValuesize

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides org.eclipse.persistence.sequencing.Sequence.equals.

Indicates whether some other object is "equal to" this one.
public Object
getGeneratedValue(Accessor
Accessor is a separate sequencing accessor (may be null);
accessor
,
AbstractSession
Session is a Session used for writing (either ClientSession or DatabaseSession);
writeSession
,
String
String is sequencing number field name
seqName
)

Implements abstract org.eclipse.persistence.sequencing.Sequence.getGeneratedValue.

INTERNAL: Return the newly-generated sequencing value.
public Vector<?>
getGeneratedVector(Accessor
Accessor is a separate sequencing accessor (may be null);
accessor
,
AbstractSession
Session is a Session used for writing (either ClientSession or DatabaseSession);
writeSession
,
String
String is sequencing number field name
seqName
,
int
int number of values to preallocate (output Vector size).
size
)

Implements abstract org.eclipse.persistence.sequencing.Sequence.getGeneratedVector.

INTERNAL: Return a Vector of newly-generated sequencing values.
public void
onConnect()

Implements abstract org.eclipse.persistence.sequencing.Sequence.onConnect.

INTERNAL: This method is called when Sequencing object is created.
public void
onDisconnect()

Implements abstract org.eclipse.persistence.sequencing.Sequence.onDisconnect.

INTERNAL: This method is called when Sequencing object is destroyed.
public boolean
shouldAcquireValueAfterInsert()

Implements abstract org.eclipse.persistence.sequencing.Sequence.shouldAcquireValueAfterInsert.

INTERNAL: Indicates whether sequencing value should be acquired after INSERT.
public boolean
shouldUsePreallocation()

Overrides org.eclipse.persistence.sequencing.Sequence.shouldUsePreallocation.

INTERNAL: Indicates whether several sequencing values should be acquired at a time and be kept by TopLink.
public boolean
shouldUseTransaction()

Implements abstract org.eclipse.persistence.sequencing.Sequence.shouldUseTransaction.

INTERNAL: Indicates whether TopLink should internally call beginTransaction() before getGeneratedValue/Vector, and commitTransaction after.
Inherited from org.eclipse.persistence.sequencing.Sequence:
cloneequalNameAndSizegetDatasourcePlatformgetGeneratedValuegetGeneratedVectorgetInitialValuegetNamegetPreallocationSizegetQualifiedgetQualifierhashCodeisConnectedisCustomQualifierisNativeisTableisUnaryTableonConnectonDisconnectsetDatasourcePlatformsetInitialValuesetNamesetPreallocationSizesetQualifiersetShouldAlwaysOverrideExistingValueshouldAlwaysOverrideExistingValueshouldAlwaysOverrideExistingValuetoStringverifyPlatform

Constructor Detail

UUIDSequenceback to summary
public UUIDSequence()
UUIDSequenceback to summary
public UUIDSequence(String name)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides org.eclipse.persistence.sequencing.Sequence.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getGeneratedValueback to summary
public Object getGeneratedValue(Accessor accessor, AbstractSession writeSession, String seqName)

Implements abstract org.eclipse.persistence.sequencing.Sequence.getGeneratedValue.

Doc from org.eclipse.persistence.sequencing.Sequence.getGeneratedValue.

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).

Parameters
accessor:Accessor

Accessor is a separate sequencing accessor (may be null);

writeSession:AbstractSession

Session is a Session used for writing (either ClientSession or DatabaseSession);

seqName:String

String is sequencing number field name

Annotations
@Override
getGeneratedVectorback to summary
public Vector<?> getGeneratedVector(Accessor accessor, AbstractSession writeSession, String seqName, int size)

Implements abstract org.eclipse.persistence.sequencing.Sequence.getGeneratedVector.

Doc from org.eclipse.persistence.sequencing.Sequence.getGeneratedVector.

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).

Parameters
accessor:Accessor

Accessor is a separate sequencing accessor (may be null);

writeSession:AbstractSession

Session is a Session used for writing (either ClientSession or DatabaseSession);

seqName:String

String is sequencing number field name

size:int

int number of values to preallocate (output Vector size).

Annotations
@Override
onConnectback to summary
public void onConnect()

Implements abstract org.eclipse.persistence.sequencing.Sequence.onConnect.

Doc from org.eclipse.persistence.sequencing.Sequence.onConnect.

INTERNAL: This method is called when Sequencing object is created. If it requires initialization, subclass should override this method.

Annotations
@Override
onDisconnectback to summary
public void onDisconnect()

Implements abstract org.eclipse.persistence.sequencing.Sequence.onDisconnect.

Doc from org.eclipse.persistence.sequencing.Sequence.onDisconnect.

INTERNAL: This method is called when Sequencing object is destroyed. If it requires deinitialization, subclass should override this method.

Annotations
@Override
shouldAcquireValueAfterInsertback to summary
public boolean shouldAcquireValueAfterInsert()

Implements abstract org.eclipse.persistence.sequencing.Sequence.shouldAcquireValueAfterInsert.

Doc from org.eclipse.persistence.sequencing.Sequence.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.

Annotations
@Override
shouldUsePreallocationback to summary
public boolean shouldUsePreallocation()

Overrides org.eclipse.persistence.sequencing.Sequence.shouldUsePreallocation.

Doc from org.eclipse.persistence.sequencing.Sequence.shouldUsePreallocation.

INTERNAL: 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.

Annotations
@Override
shouldUseTransactionback to summary
public boolean shouldUseTransaction()

Implements abstract org.eclipse.persistence.sequencing.Sequence.shouldUseTransaction.

Doc from org.eclipse.persistence.sequencing.Sequence.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.

Annotations
@Override