Package org.apache.torque.oid
Klasse SequenceIdGenerator
java.lang.Object
org.apache.torque.oid.AbstractIdGenerator
org.apache.torque.oid.SequenceIdGenerator
- Alle implementierten Schnittstellen:
IdGenerator
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
KonstruktorenKonstruktorBeschreibungSequenceIdGenerator(Adapter adapter, String databaseName) Creates an IdGenerator which will work with the specified database. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanA flag to determine whether a Connection is required to generate an id.booleanA flag to determine whether Statement#getGeneratedKeys() should be used.booleanA flag to determine the timing of the id generationbooleanA flag to determine the timing of the id generationVon Klasse geerbte Methoden org.apache.torque.oid.AbstractIdGenerator
getId, getIdAsBigDecimal, getIdAsInt, getIdAsLong, getIdAsString, getIdSql
-
Konstruktordetails
-
SequenceIdGenerator
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:
isPriorToInsertin SchnittstelleIdGenerator- Angegeben von:
isPriorToInsertin KlasseAbstractIdGenerator- Gibt zurück:
- a
booleanvalue
-
isPostInsert
public boolean isPostInsert()A flag to determine the timing of the id generation- Angegeben von:
isPostInsertin SchnittstelleIdGenerator- Angegeben von:
isPostInsertin KlasseAbstractIdGenerator- Gibt zurück:
- a
booleanvalue
-
isConnectionRequired
public boolean isConnectionRequired()A flag to determine whether a Connection is required to generate an id.- Angegeben von:
isConnectionRequiredin SchnittstelleIdGenerator- Angegeben von:
isConnectionRequiredin KlasseAbstractIdGenerator- Gibt zurück:
- a
booleanvalue
-
isGetGeneratedKeysSupported
public boolean isGetGeneratedKeysSupported()A flag to determine whether Statement#getGeneratedKeys() should be used.- Angegeben von:
isGetGeneratedKeysSupportedin SchnittstelleIdGenerator- Angegeben von:
isGetGeneratedKeysSupportedin KlasseAbstractIdGenerator- Gibt zurück:
- a
booleanvalue
-