Enum Class AutoIndexMode

java.lang.Object
java.lang.Enum<AutoIndexMode>
org.neo4j.ogm.config.AutoIndexMode
All Implemented Interfaces:
Serializable, Comparable<AutoIndexMode>, Constable

public enum AutoIndexMode extends Enum<AutoIndexMode>
Denotes the types of auto indexing that can be done by the OGM at startup.
Author:
Mark Angrish
  • Enum Constant Details

    • NONE

      public static final AutoIndexMode NONE
      No indexing will be performed.
    • ASSERT

      public static final AutoIndexMode ASSERT
      Removes all indexes and constraints on startup then creates all indexes and constraints defined in metadata.
    • UPDATE

      public static final AutoIndexMode UPDATE
      Creates all missing indexes and constraints.

      If there is an index in the database and constraint in the metadata the index is dropped and constraint created. (and vise versa).

      Other indexes and constraints are left untouched.

      NOTE: When a field with index or constraint is renamed new index or constraint will be created. Existing for the old name will be left untouched.

    • VALIDATE

      public static final AutoIndexMode VALIDATE
      Ensures that all constraints and indexes exist on startup or will throw a Runtime exception.
    • DUMP

      public static final AutoIndexMode DUMP
      Runs validate then creates a file (in same dir where launched) with the cypher used to build indexes and constraints.
  • Method Details

    • values

      public static AutoIndexMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AutoIndexMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public static AutoIndexMode fromString(String name)
      Parses an option name into the Enumeration type it represents.
      Parameters:
      name - The lowercase name to parse.
      Returns:
      The AutoIndexMode this name represents.
    • getName

      public String getName()