Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.sequencing
Class Sequence

`java.lang.Object
oracle.toplink.sequencing.Sequence`

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

Direct Known Subclasses:
  DefaultSequence, StandardSequence

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

Purpose: Define an interface for sequencing customization.

Description: Customary sequencing behavior could be achieved by implementing this interface and passing the instance to DatabaseSession.getSequencingControl().setValueGenerationPolicy(..). TopLink internally uses the same method to set its default implementation of this interface, which provides native sequencing and table sequencing. Note that the following methods: shouldAcquireValueAfterInsert(); shouldUsePreallocation(); shouldUseSeparateConnection(); shouldUseTransaction(); are called only once - during creation of the sequencing object. Therefore during the lifetime of sequencing object these methods should return the same values as when called for the first time. If this is not true - resetSequencing (call SequencingControl.resetSequencing()).

Responsibilities:

- Define the APIs for customary sequencing.

See Also:
  `SequencingControl`, Serialized Form

Constructor Summary
`Sequence()`
`Sequence(java.lang.String name)`
`Sequence(java.lang.String name, int size)`

Method Summary
`java.lang.Object` | `clone()`
`static boolean` | `equalNameAndSize(Sequence seq1, Sequence seq2)`
`boolean` | `equals(java.lang.Object obj)`
`Platform` | `getDatasourcePlatform()`
`java.lang.String` | `getName()`
`int` | `getPreallocationSize()`
`boolean` | `isConnected()` PUBLIC: Indicates that Sequence is connected.
`void` | `setName(java.lang.String name)`
`void` | `setPreallocationSize(int size)`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Sequence

    public Sequence()

### Sequence

    public Sequence(java.lang.String name)

### Sequence

    public Sequence(java.lang.String name,
                    int size)

Method Detail

### getName

    public java.lang.String getName()

### setName

    public void setName(java.lang.String name)

### getPreallocationSize

    public int getPreallocationSize()

### setPreallocationSize

    public void setPreallocationSize(int size)

### clone

    public java.lang.Object clone()

### equals

    public boolean equals(java.lang.Object obj)

### equalNameAndSize

    public static boolean equalNameAndSize(Sequence seq1,
                                           Sequence seq2)

### getDatasourcePlatform

    public Platform getDatasourcePlatform()

### isConnected

    public boolean isConnected()

  PUBLIC: Indicates that Sequence is connected.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD