Package org.apache.torque.adapter
Enum Class IDMethod
- All Implemented Interfaces:
Serializable,Comparable<IDMethod>,Constable
Interface for various ID retrieval method types
(i.e. auto-increment, sequence, ID broker, etc.).
- Version:
- $Id: IDMethod.java 1917245 2024-04-21 14:06:23Z tv $
- Author:
- Daniel Rall
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionKey generation via auto-increment.Key generation via the IDBroker table.Key generation via database-specific ID method (i.e. auto-increment for MySQL, sequence for Oracle, etc.).No RDBMS key generation (keys may be generated by the application).Key generation via sequences. -
Method Summary
Modifier and TypeMethodDescriptionstatic IDMethodgetIdMethod(String idMethod) Returns the id method for a id method name.toString()static IDMethodReturns the enum constant of this class with the specified name.static IDMethod[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NATIVE
Key generation via database-specific ID method (i.e. auto-increment for MySQL, sequence for Oracle, etc.). -
AUTO_INCREMENT
Key generation via auto-increment. -
SEQUENCE
Key generation via sequences. -
ID_BROKER
Key generation via the IDBroker table. -
NO_ID_METHOD
No RDBMS key generation (keys may be generated by the application).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
-
getIdMethod
Returns the id method for a id method name.- Parameters:
idMethod- the name of the id method.- Returns:
- the id method.
- Throws:
IllegalArgumentException- if idMethod is not a known name.
-