Interface DbEnum.ToDbValue<E extends Enum<?>>

Enclosing class:
DbEnum
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface DbEnum.ToDbValue<E extends Enum<?>>
  • Method Summary

    Modifier and Type
    Method
    Description
    toDbValue(E value)
    Gets the string representation of the given enum matching the underlying PostgreSQL enum value.
  • Method Details

    • toDbValue

      String toDbValue(E value)
      Gets the string representation of the given enum matching the underlying PostgreSQL enum value.
      Parameters:
      value - The enum value, never null (ToDbValue is not resolved or called for null values).
      Returns:
      The database value. This does not directly match the value from the database, but will match the underlying database value at the time of this client schema version. In other words, the underlying database may change, but this value will stay constant within a single schema version.