Enum DefaultNameStrategy

java.lang.Object
java.lang.Enum<DefaultNameStrategy>
com.codahale.metrics.jdbi3.strategies.DefaultNameStrategy
All Implemented Interfaces:
StatementNameStrategy, Serializable, Comparable<DefaultNameStrategy>, java.lang.constant.Constable

public enum DefaultNameStrategy extends Enum<DefaultNameStrategy> implements StatementNameStrategy
Default strategies which build a basis of more complex strategies
  • Enum Constant Details

    • CHECK_EMPTY

      public static final DefaultNameStrategy CHECK_EMPTY
      If no SQL in the context, returns `sql.empty`, otherwise falls through
    • SQL_OBJECT

      public static final DefaultNameStrategy SQL_OBJECT
      If there is an SQL object attached to the context, returns the name package, the class and the method on which SQL is declared. If not SQL object is attached, falls through
    • NAIVE_NAME

      public static final DefaultNameStrategy NAIVE_NAME
      Returns a raw SQL in the context (even if it's not exist)
    • CONSTANT_SQL_RAW

      public static final DefaultNameStrategy CONSTANT_SQL_RAW
      Returns the `sql.raw` constant
  • Method Details

    • values

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

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