com.holonplatform.datastore.jdbc.config

## Enum IdentifierResolutionStrategy

- java.lang.Object
- - java.lang.Enum<IdentifierResolutionStrategy>
  - - com.holonplatform.datastore.jdbc.config.IdentifierResolutionStrategy

- All Implemented Interfaces:
    Serializable, Comparable<IdentifierResolutionStrategy>

      public enum IdentifierResolutionStrategy
      extends Enum<IdentifierResolutionStrategy>

  Enumeration of the available `PropertyBox`/`PropertySet` identifier resolution strategies.

  The identifier resolution strategy is used by the JDBC Datastore to perform operations which involve a `PropertyBox` and for which the `PropertyBox` identifier properties are required to match the `PropertyBox` data with the database table primary key.

  The JDBC Datastore operations which require a consistent idenfier resolution are: `DatastoreOperations.refresh(com.holonplatform.core.datastore.DataTarget, PropertyBox)`, `DatastoreOperations.save(com.holonplatform.core.datastore.DataTarget, PropertyBox, com.holonplatform.core.datastore.DatastoreOperations.WriteOption...)`, `DatastoreOperations.update(com.holonplatform.core.datastore.DataTarget, PropertyBox, com.holonplatform.core.datastore.DatastoreOperations.WriteOption...)`, `DatastoreOperations.delete(com.holonplatform.core.datastore.DataTarget, PropertyBox, com.holonplatform.core.datastore.DatastoreOperations.WriteOption...)`.

  Since:
    5.1.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `AUTO` If the `PropertySet` bound to the `PropertyBox` provides provides a not empty identifier property set, use it as `PropertyBox` identifier.
    `IDENTIFIER_PROPERTIES` Use the `PropertySet` identifier properties as `PropertyBox` identifier.
    `TABLE_PRIMARY_KEY` Use the database table primary key to obtain the `PropertyBox` identifier.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IdentifierResolutionStrategy` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static IdentifierResolutionStrategy[]` | `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

    - #### AUTO

          public static final IdentifierResolutionStrategy AUTO

      If the `PropertySet` bound to the `PropertyBox` provides provides a not empty identifier property set, use it as `PropertyBox` identifier. Otherwise, try to obtain the `PropertyBox` identifier properties from the database table primary key.

    - #### IDENTIFIER_PROPERTIES

          public static final IdentifierResolutionStrategy IDENTIFIER_PROPERTIES

      Use the `PropertySet` identifier properties as `PropertyBox` identifier.
      See Also:
        `PropertySet.getIdentifiers()`

    - #### TABLE_PRIMARY_KEY

          public static final IdentifierResolutionStrategy TABLE_PRIMARY_KEY

      Use the database table primary key to obtain the `PropertyBox` identifier.

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

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

Copyright © 2019 The Holon Platform. All rights reserved.