org.apache.torque.adapter

## Enum IDMethod

- java.lang.Object
- - java.lang.Enum<IDMethod>
  - - org.apache.torque.adapter.IDMethod

- All Implemented Interfaces:
    Serializable, Comparable<IDMethod>

      public enum IDMethod
      extends Enum<IDMethod>

  Interface for various ID retrieval method types (i.e. auto-increment, sequence, ID broker, etc.).
  Version:
    $Id: IDMethod.java 1336543 2012-05-10 08:56:52Z tfischer $
  Author:
    Daniel Rall

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `AUTO_INCREMENT` Key generation via auto-increment.
    `ID_BROKER` Key generation via the IDBroker table.
    `NATIVE` Key generation via database-specific ID method (i.e.
    `NO_ID_METHOD` No RDBMS key generation (keys may be generated by the application).
    `SEQUENCE` Key generation via sequences.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IDMethod` | `getIdMethod(String idMethod)` Returns the id method for a id method name.
    `String` | `toString()`
    `static IDMethod` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static IDMethod[]` | `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, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

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

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

- - ### Enum Constant Detail

    - #### NATIVE

          public static final IDMethod NATIVE

      Key generation via database-specific ID method (i.e. auto-increment for MySQL, sequence for Oracle, etc.).

    - #### AUTO_INCREMENT

          public static final IDMethod AUTO_INCREMENT

      Key generation via auto-increment.

    - #### SEQUENCE

          public static final IDMethod SEQUENCE

      Key generation via sequences.

    - #### ID_BROKER

          public static final IDMethod ID_BROKER

      Key generation via the IDBroker table.

    - #### NO_ID_METHOD

          public static final IDMethod NO_ID_METHOD

      No RDBMS key generation (keys may be generated by the application).

  - ### Method Detail

    - #### values

          public static IDMethod[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (IDMethod c : IDMethod.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static IDMethod 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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<IDMethod>`

    - #### getIdMethod

          public static IDMethod getIdMethod(String idMethod)

      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.

Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.