Business Components

oracle.jbo.domain
Class DBSequence

oracle.jbo.domain.DBSequence
All Implemented Interfaces:
java.io.Serializable

public class DBSequence
implements java.io.Serializable

DBSequence as a Domain for Entity Object Attributes

Since:
JDeveloper 3.0
See Also:
oracle.jbo.server.SequenceImpl, Serialized Form

Field Summary
TypeField
static java.lang.String AM_IMPL_CLIENT
           
 
Constructor Summary
DBSequence()
          Internal: Applications should not use this constructor.
DBSequence(java.math.BigDecimal num)
           
DBSequence(java.math.BigInteger num)
           
DBSequence(DBSequence seq)
           
DBSequence(java.lang.Integer num)
           
DBSequence(java.lang.Long num)
           
DBSequence(Number num)
           
DBSequence(java.lang.String numberString)
           
DBSequence(java.lang.String seqName, oracle.jbo.ApplicationModule am)
          Constructor.
 
Method Summary
TypeMethod
static java.lang.Long createInstanceWithAM(oracle.jbo.ApplicationModule am)
          A class method that may be invoked to retrieve the next value from a database sequence.
 boolean equals(java.lang.Object other)
          Test if the specified value is equal to this Sequence object.
static CustomDatumFactory getCustomDatumFactory()
          Internal: Applications should not invoke this method.
 java.lang.Object getData()
          Returns the sequence value that was generated by the database sequence while constructing the SequenceImpl object.
 Number getSequenceNumber()
           
 int hashCode()
          Computes a hash code for this Sequence object.
 void setContext(oracle.jbo.domain.DomainOwnerInterface owner, oracle.jbo.Transaction trans, java.lang.Object ctx)
          Internal: Applications should not use this method.
 Datum toDatum(OracleConnection conn)
          Internal: Applications should not invoke this method.
 java.lang.String toString()
          For testing purposes only: Returns a string representation of the generated sequence value.
 

Field Detail

AM_IMPL_CLIENT

public static final java.lang.String AM_IMPL_CLIENT
Constructor Detail

DBSequence

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

DBSequence

public DBSequence(java.math.BigInteger num)

DBSequence

public DBSequence(java.math.BigDecimal num)

DBSequence

public DBSequence(java.lang.Long num)

DBSequence

public DBSequence(java.lang.Integer num)

DBSequence

public DBSequence(Number num)

DBSequence

public DBSequence(DBSequence seq)

DBSequence

public DBSequence(java.lang.String numberString)

DBSequence

public DBSequence(java.lang.String seqName,
                  oracle.jbo.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

getCustomDatumFactory

public static CustomDatumFactory getCustomDatumFactory()
Internal: Applications should not invoke this method.

Initializes the Number Domain. This method is invoked when JBO is initialized.

Returns:
the CustomDatumFactory for the Number Domain.

getData

public java.lang.Object getData()
Returns the sequence value that was generated by the database sequence while constructing the SequenceImpl object.
Returns:
A java.lang.Integer representation of the next sequence value.

setContext

public void setContext(oracle.jbo.domain.DomainOwnerInterface owner,
                       oracle.jbo.Transaction trans,
                       java.lang.Object ctx)
Internal: Applications should not use this method.

getSequenceNumber

public Number getSequenceNumber()

toString

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

equals

public boolean equals(java.lang.Object other)
Test if the specified value is equal to this Sequence 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.
Returns:
the hash code of this Sequence object.

createInstanceWithAM

public static java.lang.Long createInstanceWithAM(oracle.jbo.ApplicationModule am)
A class method that may be invoked to retrieve the next value from a database sequence.
Parameters:
seqName - The name of the database sequence that will be used to generate the sequence value.
am - The application module instance that will provide the JDBC connection for the sequence request

toDatum

public Datum toDatum(OracleConnection conn)
              throws java.sql.SQLException
Internal: Applications should not invoke this method.

Converts this Number Domain object back into an SQL NUMBER object.

Parameters:
conn - Not used.
Returns:
A Datum containing NUMBER object.
Throws:
SQLException - Never.

Business Components