Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.2.0)

E17483-03


oracle.jbo.domain
Class Sequence

java.lang.Object
  extended by oracle.jbo.domain.Sequence

All Implemented Interfaces:
java.io.Serializable, DomainInterface, NativeTypeDomainInterface

public class Sequence
extends java.lang.Object
implements NativeTypeDomainInterface, java.io.Serializable

A lightweight, tier-independent wrapper for the server tier-dependent SequenceImpl class. For more information about the SequenceImpl methods that this class exposes to the client tier please see the SequenceImpl documentation.

Sequence as a Domain for Entity Object Attributes

The tier-indpendence of this class combined with its implementation of the 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.

Since:
JDeveloper 3.0
See Also:
SequenceImpl, Serialized Form

Field Summary
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 Summary
Sequence()
          Internal: Applications should not use this constructor.
Sequence(java.lang.String seqName, ApplicationModule am)
          Constructor.

 

Method Summary
 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.

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

SEQ_IMPL_CLIENT

public static final java.lang.String SEQ_IMPL_CLIENT
Internal: Applications should not use this field.
See Also:
Constant Field Values

SEQ_IMPL_SERVER

public static final java.lang.String SEQ_IMPL_SERVER
Internal: Applications should not use this field.
See Also:
Constant Field Values

Constructor Detail

Sequence

public Sequence()
Internal: Applications should not use this constructor.

Sequence

public Sequence(java.lang.String seqName,
                ApplicationModule am)
Constructor.

This method will increment the specified database sequence when it is invoked.

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

Method Detail

getNativeObject

public java.lang.Object getNativeObject()
Specified by:
getNativeObject in interface NativeTypeDomainInterface

getValue

public long getValue()
Return a long value for this domain. This method may be used to access the value for this domain in EL-expressions.

getData

public 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.
Specified by:
getData in interface DomainInterface
Returns:
a formatted value object.

setContext

public void setContext(DomainOwnerInterface owner,
                       Transaction trans,
                       java.lang.Object ctx)
Internal: Applications should not use this method.
Specified by:
setContext in interface DomainInterface

toString

public java.lang.String toString()
For testing purposes only: Returns a string representation of the generated sequence value.
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Test if the specified value is equal to this Sequence object.
Overrides:
equals in class java.lang.Object
Parameters:
other - The object to which the Sequence should be compared.
Returns:
true The specified object is equal to the this Sequence.

hashCode

public int hashCode()
Computes a hash code for this Sequence object.
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of this Sequence object.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.2.0)

E17483-03


Copyright © 1997, 2012, Oracle. All rights reserved.