Package org.apache.torque.oid

# Klasse SequenceIdGenerator

java.lang.Object
org.apache.torque.oid.AbstractIdGenerator
org.apache.torque.oid.SequenceIdGenerator

Alle implementierten Schnittstellen:
  `IdGenerator`

public class SequenceIdGenerator extends AbstractIdGenerator
This generator works with databases that have an sql syntax for getting an id prior to inserting a row into the database.

Version:
  $Id: SequenceIdGenerator.java 1850586 2019-01-06 18:46:35Z tv $
Autor:
  John D. McNally

- ## Feldübersicht

  ### Von Klasse geerbte Felder org.apache.torque.oid.AbstractIdGenerator

  `adapter, databaseName`

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `SequenceIdGenerator(Adapter adapter, String databaseName)`
  Creates an IdGenerator which will work with the specified database.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `boolean`
  `isConnectionRequired()`
  A flag to determine whether a Connection is required to generate an id.
  `boolean`
  `isGetGeneratedKeysSupported()`
  A flag to determine whether Statement#getGeneratedKeys() should be used.
  `boolean`
  `isPostInsert()`
  A flag to determine the timing of the id generation
  `boolean`
  `isPriorToInsert()`
  A flag to determine the timing of the id generation

  ### Von Klasse geerbte Methoden org.apache.torque.oid.AbstractIdGenerator

  `getId, getIdAsBigDecimal, getIdAsInt, getIdAsLong, getIdAsString, getIdSql`

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Konstruktordetails

  - ### SequenceIdGenerator

    public SequenceIdGenerator(Adapter adapter, String databaseName)
    Creates an IdGenerator which will work with the specified database.
    Parameter:
      `adapter` - the adapter that knows the correct sql syntax.
      `databaseName` - The name of the database to find the correct schema.

- ## Methodendetails

  - ### isPriorToInsert

    public boolean isPriorToInsert()
    A flag to determine the timing of the id generation
    Angegeben von:
      `isPriorToInsert` in Schnittstelle `IdGenerator`
    Angegeben von:
      `isPriorToInsert` in Klasse `AbstractIdGenerator`
    Gibt zurück:
      a `boolean` value

  - ### isPostInsert

    public boolean isPostInsert()
    A flag to determine the timing of the id generation
    Angegeben von:
      `isPostInsert` in Schnittstelle `IdGenerator`
    Angegeben von:
      `isPostInsert` in Klasse `AbstractIdGenerator`
    Gibt zurück:
      a `boolean` value

  - ### isConnectionRequired

    public boolean isConnectionRequired()
    A flag to determine whether a Connection is required to generate an id.
    Angegeben von:
      `isConnectionRequired` in Schnittstelle `IdGenerator`
    Angegeben von:
      `isConnectionRequired` in Klasse `AbstractIdGenerator`
    Gibt zurück:
      a `boolean` value

  - ### isGetGeneratedKeysSupported

    public boolean isGetGeneratedKeysSupported()
    A flag to determine whether Statement#getGeneratedKeys() should be used.
    Angegeben von:
      `isGetGeneratedKeysSupported` in Schnittstelle `IdGenerator`
    Angegeben von:
      `isGetGeneratedKeysSupported` in Klasse `AbstractIdGenerator`
    Gibt zurück:
      a `boolean` value