Class NamingStrategy

java.lang.Object
dev.morphia.mapping.NamingStrategy

public abstract class NamingStrategy extends Object
Defines a naming strategy for use, e.g., in naming collections and fields
Since:
2.0
  • Constructor Details

    • NamingStrategy

      public NamingStrategy()
  • Method Details

    • identity

      public static NamingStrategy identity()
      Defines a naming strategy that returns the value passed
      Returns:
      the unchanged value.
    • lowerCase

      public static NamingStrategy lowerCase()
      Defines a naming strategy that returns the lowercase form of the value passed
      Returns:
      the updated value.
    • snakeCase

      public static NamingStrategy snakeCase()
      Defines a naming strategy that returns snake case of the value passed
      Returns:
      the new value.
      See Also:
    • camelCase

      public static NamingStrategy camelCase()
      Defines a naming strategy that returns camel case of the value passed
      Returns:
      the new value.
      See Also:
    • kebabCase

      public static NamingStrategy kebabCase()
      Defines a naming strategy that returns kebab case of the value passed
      Returns:
      the new value.
      See Also:
    • apply

      public abstract String apply(String value)
      Applies this naming strategy to the given value
      Parameters:
      value - the value to process
      Returns:
      the updated value