Package com.smartgwt.client.types

# Enum SequenceMode

java.lang.Object
java.lang.Enum<SequenceMode>
com.smartgwt.client.types.SequenceMode

All Implemented Interfaces:
  `ValueEnum`, `Serializable`, `Comparable<SequenceMode>`, `Constable`

public enum SequenceMode extends Enum<SequenceMode> implements ValueEnum
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 Constants
  Enum Constant
  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.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getValue()`
  `static SequenceMode`
  `valueOf(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.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### JDBCDRIVER

    public static final SequenceMode 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+ drivers. NOTE: Oracle special case The Oracle JDBC driver provides a "getGeneratedKeys" method, but that method does not actually return the generated key values; instead, it returns a ROWID, which we must use to fetch the inserted row, and obtain the generated key values from it. For this reason, you may find that "native" is slightly faster to retrieve sequence values than "jdbcDriver" with Oracle (or you may find that it makes no noticeable difference; it depends on too many factors for us to give a concrete recommendation)

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "jdbcDriver".

  - ### NATIVE

    public static final SequenceMode 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

    public static final SequenceMode NONE
    No automatic attempt is made to retrieve the most recent sequence value. You are expected to handle this by providing a `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".

- ## Method Details

  - ### values

    public static SequenceMode[] 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

    public static SequenceMode valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null

  - ### getValue

    public String getValue()
    Specified by:
      `getValue` in interface `ValueEnum`