ENTITY
- the entity typeD
- the database typeE
- the java enum typeFK
- the foreign key entity typepublic interface EnumForeignKeyField<ENTITY,D,E extends Enum<E>,FK> extends EnumField<ENTITY,D,E>, HasNullableFinder<ENTITY,FK>
Enum
value in the entity that has a finder to
another entity.Modifier and Type | Method and Description |
---|---|
static <ENTITY,D,E extends Enum<E>,FK> |
create(ColumnIdentifier<ENTITY> identifier,
ReferenceGetter<ENTITY,E> getter,
ReferenceSetter<ENTITY,E> setter,
TypeMapper<D,E> typeMapper,
HasComparableOperators<FK,E> referenced,
Function<E,String> enumToString,
Function<String,E> stringToEnum,
Class<E> enumClass)
Create a new instance of this interface using the default implementation.
|
Function<E,String> |
enumToString()
A method that takes an enum and converts it into a
String . |
Function<String,E> |
stringToEnum()
A method that takes a
String and converts it into an enum for
this field. |
between, between, constants, create, enumClass, equal, greaterOrEqual, greaterThan, lessOrEqual, lessThan, notBetween, notBetween, notEqual
create
isNotNull, isNull
get, getter, set, setter, setTo, typeMapper
findColumn, identifier
between, between, comparator, comparatorNullFieldsFirst, comparatorNullFieldsLast, equal, greaterOrEqual, greaterThan, in, in, lessOrEqual, lessThan, notBetween, notBetween, notEqual, notIn, notIn
contains, containsIgnoreCase, endsWith, endsWithIgnoreCase, equalIgnoreCase, isEmpty, isNotEmpty, notContains, notContainsIgnoreCase, notEndsWith, notEndsWithIgnoreCase, notEqualIgnoreCase, notStartsWith, notStartsWithIgnoreCase, startsWith, startsWithIgnoreCase
nullableFinder
backwardFinder, finder, getReferencedField
Function<String,E> stringToEnum()
String
and converts it into an enum for
this field.
The function should return null
if a null
value is
specified as input and throw an exception if the value is invalid.
Function<E,String> enumToString()
String
.
The function should return null
if a null
value is
specified as input and throw an exception if the value is invalid.
static <ENTITY,D,E extends Enum<E>,FK> EnumForeignKeyField<ENTITY,D,E,FK> create(ColumnIdentifier<ENTITY> identifier, ReferenceGetter<ENTITY,E> getter, ReferenceSetter<ENTITY,E> setter, TypeMapper<D,E> typeMapper, HasComparableOperators<FK,E> referenced, Function<E,String> enumToString, Function<String,E> stringToEnum, Class<E> enumClass)
ENTITY
- the entity typeD
- the database typeE
- the java enum typeFK
- the foreign key entity typeidentifier
- the column that this field representsgetter
- method reference to the getter in the entitysetter
- method reference to the setter in the entitytypeMapper
- the type mapper that is appliedreferenced
- the field in the foreign entity that is referencedenumToString
- method to convert enum to a stringstringToEnum
- method to convert a string to enumenumClass
- the enum classCopyright © 2017 Speedment, Inc.. All rights reserved.