com.holonplatform.datastore.mongo.core.document

## Enum EnumCodecStrategy

- java.lang.Object
- - java.lang.Enum<EnumCodecStrategy>
  - - com.holonplatform.datastore.mongo.core.document.EnumCodecStrategy

- All Implemented Interfaces:
    Serializable, Comparable<EnumCodecStrategy>

      public enum EnumCodecStrategy
      extends Enum<EnumCodecStrategy>

  Enumeration of Enum types encoding and decoding.
  Since:
    5.2.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `NAME` Use the enum constant name for encoding and decoding.
    `ORDINAL` Use the enum constant ordinal for encoding and decoding.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static com.holonplatform.core.config.ConfigProperty<EnumCodecStrategy>` | `CONFIG_PROPERTY` A configuration property which can be used to declare the enum codec strategy.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static EnumCodecStrategy` | `getDefault()` Return the default `EnumCodecStrategy`.
    `static EnumCodecStrategy` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static EnumCodecStrategy[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

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

- - ### Enum Constant Detail

    - #### NAME

          public static final EnumCodecStrategy NAME

      Use the enum constant name for encoding and decoding.

    - #### ORDINAL

          public static final EnumCodecStrategy ORDINAL

      Use the enum constant ordinal for encoding and decoding.

  - ### Field Detail

    - #### CONFIG_PROPERTY

          public static final com.holonplatform.core.config.ConfigProperty<EnumCodecStrategy> CONFIG_PROPERTY

      A configuration property which can be used to declare the enum codec strategy.

      It can be used, for example, to declare the enum codec strategy for a `Property`, using the property configuration.

  - ### Method Detail

    - #### values

          public static EnumCodecStrategy[] 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 (EnumCodecStrategy c : EnumCodecStrategy.values())
              System.out.println(c);

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

    - #### valueOf

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

    - #### getDefault

          public static EnumCodecStrategy getDefault()

      Return the default `EnumCodecStrategy`.
      Returns:
        `NAME`

Copyright © 2019 The Holon Platform. All rights reserved.