Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.domain
Class Sequence

    java.lang.Object
      |
      +--oracle.jbo.domain.Sequence

public class Sequence
extends java.lang.Object
implements DomainInterface, 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()` Returns the sequence value that was generated by the database sequence while constructing the SequenceImpl object.
`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.

### SEQ_IMPL_SERVER

    public static final java.lang.String SEQ_IMPL_SERVER

  Internal: Applications should not use this field.

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

### getData

    public java.lang.Object getData()

  Returns the sequence value that was generated by the database sequence while constructing the SequenceImpl object.
  Specified by:
    getData in interface DomainInterface
  Returns:
    A java.lang.Integer representation of the next sequence value.

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD