Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.javatools.db
Class Sequence

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractBuildableObject
          extended by oracle.javatools.db.AbstractSystemObject
              extended by oracle.javatools.db.AbstractSchemaObject
                  extended by oracle.javatools.db.Sequence
All Implemented Interfaces:
DBObject, SchemaObject, SystemObject, Copyable, DynamicPropertySet

public class Sequence
extends AbstractSchemaObject

Model of a database sequence.


Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport
 
Field Summary
static java.lang.String TYPE
           
 
Fields inherited from class oracle.javatools.db.AbstractSystemObject
m_listeners
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
Sequence()
          Constructs a new sequence.
Sequence(java.lang.String name, Schema schema)
          Constructs a new sequence in the specified schema with the specified name.
 
Method Summary
 java.lang.Boolean getCacheFlag()
          Returns TRUE if the sequence is cached, FALSE if it isn't, and null representing the database default.
 java.math.BigInteger getCacheSize()
          Retrieves the cache size for this sequence.
 java.lang.Boolean getCycleFlag()
          Retrieves whether this sequence should cycle back to the beginning when the last permissible value is reached.
 java.math.BigInteger getIncrementBy()
          Retrieves the increment value for this sequence.
 java.math.BigInteger getLastNumber()
          Retrieves the last sequence number written to disk in the database.
 java.math.BigInteger getMaxValue()
          Retrieves the maximum value for this sequence.
 java.math.BigInteger getMinValue()
          Retrieves the minimum value for this sequence.
 java.lang.Boolean getOrderFlag()
          Retrieves whether this sequence must generate values in order.
 java.math.BigInteger getStartWith()
          Retrieves the start with value for this sequence.
 java.lang.String getType()
          Returns the type of this object.
 void setCacheFlag(java.lang.Boolean cacheFlag)
          Sets whether this sequence caches sequence values.
 void setCacheSize(java.math.BigInteger cacheSize)
          Sets the cache size for this sequence.
 void setCycleFlag(java.lang.Boolean cycleFlag)
          Sets whether this sequence should cycle back to the beginning when the last permissible value is reached.
 void setIncrementBy(java.math.BigInteger incrementBy)
          Sets the increment value for this sequence.
 void setLastNumber(java.math.BigInteger lastNumber)
          Sets the last sequence number written to disk in the database.
 void setMaxValue(java.math.BigInteger maxValue)
          Sets the maximum value for this sequence.
 void setMinValue(java.math.BigInteger minValue)
          Sets the minimum value for this sequence.
 void setOrderFlag(java.lang.Boolean orderFlag)
          Sets whether this sequence must generate values in order.
 void setStartWith(java.math.BigInteger startWith)
          Sets the start with value for this sequence.
 
Methods inherited from class oracle.javatools.db.AbstractSchemaObject
addObjectListener, copyToImpl, equalsImpl, getProperty, getSchema, removeObjectListener, setProperty, setSchema
 
Methods inherited from class oracle.javatools.db.AbstractSystemObject
addObjectListener, fireObjectUpdated, getParent, removeObjectListener
 
Methods inherited from class oracle.javatools.db.AbstractBuildableObject
checkInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.SystemObject
addObjectListener, fireObjectUpdated, removeObjectListener
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getReferenceIDs, replaceReferenceIDs, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, setProperties
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values
Constructor Detail

Sequence

public Sequence()
Constructs a new sequence.


Sequence

public Sequence(java.lang.String name,
                Schema schema)
Constructs a new sequence in the specified schema with the specified name.

Parameters:
name - a string containing the name of the sequence
schema - the schema that owns the sequence
Method Detail

getType

public java.lang.String getType()
Description copied from interface: DBObject
Returns the type of this object. Valid types include things like tables, views, synonyms, and columns.

Returns:
a string describing the type of object.

setStartWith

public void setStartWith(java.math.BigInteger startWith)
Sets the start with value for this sequence.

Parameters:
startWith - an BigInteger value representing the start value of this sequence, or null to omit the specification of a start value

getStartWith

public java.math.BigInteger getStartWith()
Retrieves the start with value for this sequence.

Returns:
an BigInteger value representing the start with value of this sequence, or null if the start with value is not specified

setMinValue

public void setMinValue(java.math.BigInteger minValue)
Sets the minimum value for this sequence.

Parameters:
minValue - an BigInteger value representing the minimum value of this sequence, or null to omit the specification of a minimum value

getMinValue

public java.math.BigInteger getMinValue()
Retrieves the minimum value for this sequence.

Returns:
an BigInteger value representing the minimum value of this sequence, or null if the minimum value is not specified

setMaxValue

public void setMaxValue(java.math.BigInteger maxValue)
Sets the maximum value for this sequence.

Parameters:
maxValue - an BigInteger value representing the maximum value of this sequence, or null to omit the specification of a maximum value

getMaxValue

public java.math.BigInteger getMaxValue()
Retrieves the maximum value for this sequence.

Returns:
an BigInteger value representing the maximum value of this sequence, or null if the maximum value is not specified

setIncrementBy

public void setIncrementBy(java.math.BigInteger incrementBy)
Sets the increment value for this sequence.

Parameters:
incrementBy - an BigInteger value representing the increment value of this sequence, or null to omit the specification of a increment value

getIncrementBy

public java.math.BigInteger getIncrementBy()
Retrieves the increment value for this sequence.

Returns:
an BigInteger value representing the increment value of this sequence, or null if the increment value is not specified

setCycleFlag

public void setCycleFlag(java.lang.Boolean cycleFlag)
Sets whether this sequence should cycle back to the beginning when the last permissible value is reached.

Parameters:
cycleFlag - a boolean value representing the cycle flag of this sequence, or null to omit the specification of a cycle flag

getCycleFlag

public java.lang.Boolean getCycleFlag()
Retrieves whether this sequence should cycle back to the beginning when the last permissible value is reached.

Returns:
a boolean value representing the cycle flag of this sequence, or null if the cycle flag is not specified

setOrderFlag

public void setOrderFlag(java.lang.Boolean orderFlag)
Sets whether this sequence must generate values in order.

Parameters:
orderFlag - a boolean value representing the order flag of this sequence, or null to omit the specification of a order flag

getOrderFlag

public java.lang.Boolean getOrderFlag()
Retrieves whether this sequence must generate values in order.

Returns:
a boolean value representing the order flag of this sequence, or null if the order flag is not specified

setCacheFlag

public void setCacheFlag(java.lang.Boolean cacheFlag)
Sets whether this sequence caches sequence values. A value of null represents the database default. When TRUE, setCacheSize() must be called with a minimum value of 2.

Parameters:
cached - : TRUE, FALSE or null
Since:
11.0
See Also:
setCacheSize(java.math.BigInteger)

getCacheFlag

public java.lang.Boolean getCacheFlag()
Returns TRUE if the sequence is cached, FALSE if it isn't, and null representing the database default.

Since:
11.0

setCacheSize

public void setCacheSize(java.math.BigInteger cacheSize)
Sets the cache size for this sequence. Only valid when getCacheFlag() is TRUE.

Parameters:
cacheSize - an BigInteger value representing the size of the cache used by this sequence, or null to omit the specification of cache size.
See Also:
getCacheFlag()

getCacheSize

public java.math.BigInteger getCacheSize()
Retrieves the cache size for this sequence. Only valid when getCacheFlag() is TRUE.

Returns:
a BigInteger value representing the size of the cache used by this sequence, or null if the cache size is not specified.
See Also:
getCacheFlag()

getLastNumber

public java.math.BigInteger getLastNumber()
Retrieves the last sequence number written to disk in the database. If a sequence uses caching, the number written to disk is the last number placed in the sequence cache. This number is likely to be greater than the last sequence number that was used.

This will only be populated if the sequence is retrieved from a live Database.


setLastNumber

public void setLastNumber(java.math.BigInteger lastNumber)
Sets the last sequence number written to disk in the database.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

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