public class Sequence extends java.lang.Object implements NativeTypeDomainInterface, java.io.Serializable
SequenceImpl
class. For
more information about the SequenceImpl methods that this class
exposes to the client tier please see the SequenceImpl documentation.
DomainInterface
would allow this class to be used as an Entity Object
attribute domain. However, it generally does not make sense to use
Sequence (or SequenceImpl) because its constructor performs
certain operations and requires parameters that do not fit into the Entity
Object attribute framework. Specifically, the Sequence constructor
requires the name of the database SEQUENCE which will is used to generate
sequence values and an Application Module reference which is used to marshal
the request in 3-tier execution and to provide the transaction context.
Thus, if you designated an Entity Object attribute to be of type Sequence, the framework would not know how to supply these parameters. Of course, if you built a custom Entity Object and overrode various parts of the framework, this can actually be done. However, if you simply assigned Sequence to an Entity Object attribute at Design-time, it would not work as expected.
Unless you do some sophisticated overriding, it would not make sense to use it as an Entity Object attribute type.
SequenceImpl
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
SEQ_IMPL_CLIENT
Internal: Applications should not use this field.
|
static java.lang.String |
SEQ_IMPL_SERVER
Internal: Applications should not use this field.
|
Constructor and Description |
---|
Sequence()
Internal: Applications should not use this constructor.
|
Sequence(java.lang.String seqName,
ApplicationModule am)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
Test if the specified value is equal to
this Sequence
object. |
java.lang.Object |
getData()
Internal: Applications should not use this method.
Returns the sequence value that was generated by the database
sequence while constructing the SequenceImpl object.
|
java.lang.Object |
getNativeObject() |
long |
getValue()
Return a long value for this domain.
|
int |
hashCode()
Computes a hash code for
this Sequence object. |
void |
setContext(DomainOwnerInterface owner,
Transaction trans,
java.lang.Object ctx)
Internal: Applications should not use this method.
|
java.lang.String |
toString()
For testing purposes only: Returns a string representation of the
generated sequence value.
|
public static final java.lang.String SEQ_IMPL_CLIENT
public static final java.lang.String SEQ_IMPL_SERVER
public Sequence()
public Sequence(java.lang.String seqName, ApplicationModule am)
This method will increment the specified database sequence when it is invoked.
seqName
- The name of the database sequence that will be used to
generate sequence values.am
- The application module instance that will provide the JDBC
connection and the marshalling context for the sequence requests.public java.lang.Object getNativeObject()
getNativeObject
in interface NativeTypeDomainInterface
public long getValue()
public java.lang.Object getData()
getData
in interface DomainInterface
public void setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)
setContext
in interface DomainInterface
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
this
Sequence
object.equals
in class java.lang.Object
other
- The object to which the Sequence should be compared.this
Sequence.public int hashCode()
this
Sequence object.hashCode
in class java.lang.Object
this
Sequence object.