Interface DbEnum.FromDbValue<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.FromDbValue<E extends Enum<?>>
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the Enum for the given database value.
  • Method Details

    • fromDbValue

      E fromDbValue(String dbValue) throws IllegalArgumentException
      Gets the Enum for the given database value.
      Parameters:
      dbValue - The database value, never null (FromDbValue is not resolved or called for null values).
      Throws:
      IllegalArgumentException - when unable to map the database value to the Enum.