Package com.smartgwt.client.types
Enum SequenceMode
- All Implemented Interfaces:
ValueEnum
,Serializable
,Comparable<SequenceMode>
,Constable
The possible types of sequence handling Smart GWT Server can apply. This refers to the technique used to obtain the
primary keys of the most recent insert, which the product uses to enable
automatic cache synchronization
(updating client-side components bound
to a dataSource to reflect updates to that dataSource). Only applicable to fields
of type
"sequence". -
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionUse the JDBC 3.0 API "getGeneratedKeys()" to get the most recent sequence value.Use a database-specific native technique to obtain the most recent sequence value.No automatic attempt is made to retrieve the most recent sequence value. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
static SequenceMode
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.
-
Enum Constant Details
-
JDBCDRIVER
Use the JDBC 3.0 API "getGeneratedKeys()" to get the most recent sequence value. Obviously, this is only an option for JDBC 3.0+ driversIf this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "jdbcDriver". -
NATIVE
Use a database-specific native technique to obtain the most recent sequence value. The actual technique used varies widely depending on the vagaries of the underlying database (and sometimes the vagaries of particular releases of a database product)If this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "native". -
NONE
No automatic attempt is made to retrieve the most recent sequence value. You are expected to handle this by providing acacheSyncOperation
that is able to return the entire row without needing generated PK values for context. For example, a query that usesMAX(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 customcacheSyncOperation
reference that session attribute in itsWHERE
clause. Also note that cacheSyncOperations, like any otherDataSource operation
, can bewritten in Java
or anyJSR223-compliant scripting language
- you do not have to use SQLIf this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "none".
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
-