Package de.espirit.or

Enum Class CaseMode

java.lang.Object
java.lang.Enum<CaseMode>
de.espirit.or.CaseMode
All Implemented Interfaces:
Serializable, Comparable<CaseMode>, Constable

public enum CaseMode extends Enum<CaseMode>
The different case modes (UPPER_CASE, LOWER_CASE, and MIXED_CASE) a database may support. Use convertCase(String) to convert identifiers to the appropriate supported case. Use getComparator() for comparison - e.g. MIXED_CASE.getComparator("test", "Test") yields 0.
Since:
4.1.11
  • Enum Constant Details

    • UPPER_CASE

      public static final CaseMode UPPER_CASE
      Only upper case identifiers are supported.
      Since:
      4.1.11
    • LOWER_CASE

      public static final CaseMode LOWER_CASE
      Only lower case identifiers are supported.
      Since:
      4.1.11
    • MIXED_CASE

      public static final CaseMode MIXED_CASE
      Mixed case identifiers are supported.
      Since:
      4.1.11
    • LOWER_CASE_IGNORED_FOR_COMPARE

      public static final CaseMode LOWER_CASE_IGNORED_FOR_COMPARE
      Mixed case is supported, but upper and lower case are indistinguishable, e.g. "product" and "PRODUCT" are treated equal.
      This is behaviour is known from windows for file and folder names.
      Since:
      4.1.11
  • Method Details

    • values

      public static CaseMode[] 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 CaseMode 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
    • convertCase

      @NotNull public @NotNull String convertCase(@NotNull @NotNull String value)
      Convert the given identifier to the
      Parameters:
      value - the string to convert.
      Returns:
      The input string converted to the target format (or the input string itself if names are stored in mixed case).
      Since:
      4.1.11
    • getComparator

      @NotNull public @NotNull Comparator<String> getComparator()
      UPPER_CASE.getComparator().compare("products", "PRODUCTS") will yield 0.
      Returns:
      A comparator respecting case mode.
      Since:
      4.1.11
    • isLowerCase

      public boolean isLowerCase()
      true if identifiers are lower case.
      Attention: isUpperCase() and isLowerCase() may both deliver false.
      Returns:
      true if identifiers are lower case.
      Since:
      4.1.10
      See Also:
    • isUpperCase

      public boolean isUpperCase()
      true if identifiers are upper case.
      Attention: isUpperCase() and isLowerCase() may both deliver false.
      Returns:
      true if identifiers are upper case.
      Since:
      4.1.10
      See Also: