Enum Class DbFieldType

java.lang.Object
java.lang.Enum<DbFieldType>
tech.ailef.dbadmin.external.dbmapping.DbFieldType
All Implemented Interfaces:
Serializable, Comparable<DbFieldType>, Constable

public enum DbFieldType extends Enum<DbFieldType>
The enum for supported database field types.
  • Enum Constant Details

  • Method Details

    • values

      public static DbFieldType[] 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 DbFieldType 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
    • getFragmentName

      public abstract String getFragmentName()
      Returns the name of the Thymeleaf fragments in the 'inputs.html' file, used to render an input field for this specific type. For example, a fragment using a file input is used for binary fields.
    • parseValue

      public abstract Object parseValue(Object value)
      Parse the value received through an HTML form into a instance of an object of this specific type. This usually involves a conversion from string, but, for example, files are sent as MultipartFile instead.
      Parameters:
      value - the value to parse
      Returns:
    • getJavaClass

      public abstract Class<?> getJavaClass()
      Returns the Java class corresponding to this field type.
      Returns:
    • getCompareOperators

      public abstract List<CompareOperator> getCompareOperators()
      Returns a list of compare operators that can be used to compare two values for this field type. Used in the faceted search to provide more operators than just equality (e.g. after/before for dates).
      Returns:
    • isRelationship

      public boolean isRelationship()
    • fromClass

      public static DbFieldType fromClass(Class<?> klass)