Module jpastreamer.field
Package com.speedment.jpastreamer.field
Interface ComparableField<ENTITY,V extends Comparable<? super V>>
- Type Parameters:
ENTITY- the entity typeV- the field value type
- All Superinterfaces:
Comparator<ENTITY>,Field<ENTITY>,HasColumnName,HasComparableOperators<ENTITY,,V> com.speedment.runtime.compute.trait.HasCompare<ENTITY>,HasGetter<ENTITY>,com.speedment.runtime.compute.trait.HasMapToDoubleIfPresent<ENTITY,,ToDoubleFunction<V>> HasReferenceOperators<ENTITY>,HasReferenceValue<ENTITY,,V> HasTable<ENTITY>,ReferenceField<ENTITY,V>
- All Known Subinterfaces:
EnumField<ENTITY,,E> StringField<ENTITY>
public interface ComparableField<ENTITY,V extends Comparable<? super V>>
extends ReferenceField<ENTITY,V>, HasComparableOperators<ENTITY,V>
A field that represents an object value that implements
Comparable.- Since:
- 2.2.0
- Author:
- Per Minborg, Emil Forslund
- See Also:
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <ENTITY,V extends Comparable<? super V>>
ComparableField<ENTITY,V> create(Class<ENTITY> table, String columnName, ReferenceGetter<ENTITY, V> getter, boolean unique) Creates a newComparableFieldusing the default implementation.Methods inherited from interface java.util.Comparator
equalsMethods inherited from interface com.speedment.jpastreamer.field.trait.HasColumnName
columnNameMethods inherited from interface com.speedment.jpastreamer.field.trait.HasComparableOperators
between, between, comparator, comparatorNullFieldsFirst, equal, greaterOrEqual, greaterThan, in, in, lessOrEqual, lessThan, notBetween, notBetween, notEqual, notIn, notIn, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface com.speedment.runtime.compute.trait.HasCompare
compareMethods inherited from interface com.speedment.jpastreamer.field.trait.HasReferenceOperators
isNotNull, isNullMethods inherited from interface com.speedment.jpastreamer.field.trait.HasReferenceValue
get, getterMethods inherited from interface com.speedment.jpastreamer.field.ReferenceField
asBigDecimal, asBoolean, asByte, asChar, asDouble, asEnum, asFloat, asInt, asLong, asShort, asString, mapToBigDecimalIfPresent, mapToBooleanIfPresent, mapToByteIfPresent, mapToCharIfPresent, mapToDoubleIfPresent, mapToEnumIfPresent, mapToFloatIfPresent, mapToIntIfPresent, mapToLongIfPresent, mapToShortIfPresent, mapToStringIfPresent
-
Method Details
-
create
static <ENTITY,V extends Comparable<? super V>> ComparableField<ENTITY,V> create(Class<ENTITY> table, String columnName, ReferenceGetter<ENTITY, V> getter, boolean unique) Creates a newComparableFieldusing the default implementation.- Type Parameters:
ENTITY- the entity typeV- the field value type- Parameters:
table- the table the field belongs tocolumnName- the name of the database column the field representsgetter- method reference to the getter in the entityunique- represented column only contains unique values- Returns:
- the created field
-