public interface IdGenerator
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
getIdAsBigDecimal(Connection connection,
Object keyInfo)
Returns an id as a BigDecimal.
|
int |
getIdAsInt(Connection connection,
Object keyInfo)
Returns an id as a primitive int.
|
long |
getIdAsLong(Connection connection,
Object keyInfo)
Returns an id as a primitive long.
|
String |
getIdAsString(Connection connection,
Object keyInfo)
Returns an id as a String.
|
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
|
int getIdAsInt(Connection connection, Object keyInfo) throws TorqueException
getIdAsLong(Connection, Object) be used instead (due to the
limited range of this method).connection - The database connection to use.keyInfo - an Object that contains additional info.TorqueException - if a Database error occurs.long getIdAsLong(Connection connection, Object keyInfo) throws TorqueException
connection - The database connection to use.keyInfo - an Object that contains additional info.TorqueException - if a Database error occurs.BigDecimal getIdAsBigDecimal(Connection connection, Object keyInfo) throws TorqueException
connection - The database connection to use.keyInfo - an Object that contains additional info.TorqueException - if a Database error occurs.String getIdAsString(Connection connection, Object keyInfo) throws TorqueException
connection - The database connection to use.keyInfo - an Object that contains additional info.TorqueException - if a Database error occurs.boolean isPriorToInsert()
boolean valueboolean isPostInsert()
insert.boolean isConnectionRequired()
boolean valueboolean isGetGeneratedKeysSupported()
boolean valueCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.