public enum SequenceMode extends java.lang.Enum<SequenceMode> implements ValueEnum
fields
of type
"sequence". Enum Constant and Description |
---|
JDBCDRIVER
Use the JDBC 3.0 API "getGeneratedKeys()" to get the most recent sequence value.
|
NATIVE
Use a database-specific native technique to obtain the most recent sequence value.
|
NONE
No automatic attempt is made to retrieve the most recent sequence value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue() |
static SequenceMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SequenceMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SequenceMode JDBCDRIVER
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "jdbcDriver".
public static final SequenceMode NATIVE
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "native".
public static final SequenceMode NONE
cacheSyncOperation
that is able to return
the entire row without needing generated PK values for context. For example, a query that uses MAX(pk)
would be capable of this. To give a more complex example, say you have a sequence value that is retrieved from a legacy
system: you could store that sequence value in the HTTP session and then have your custom
cacheSyncOperation
reference that session attribute in its WHERE
clause. Also note that
cacheSyncOperations, like any other DataSource operation
, can be
written in Java
or any JSR223-compliant scripting language
- you do not have to use
SQL
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "none".
public static SequenceMode[] values()
for (SequenceMode c : SequenceMode.values()) System.out.println(c);
public static SequenceMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null