- Type Parameters:
ENTITY- entity type
- All Superinterfaces:
CharFieldComparator<ENTITY>,Comparator<ENTITY>,com.speedment.runtime.compute.expression.Expression<ENTITY>,Field<ENTITY>,FieldComparator<ENTITY>,com.speedment.runtime.compute.trait.HasAsDouble<ENTITY>,com.speedment.runtime.compute.trait.HasAsInt<ENTITY>,com.speedment.runtime.compute.trait.HasAsLong<ENTITY>,com.speedment.runtime.compute.trait.HasCase<ENTITY,,com.speedment.runtime.compute.ToChar<ENTITY>> HasCharValue<ENTITY>,HasColumnName,HasComparableOperators<ENTITY,,Character> com.speedment.runtime.compute.trait.HasCompare<ENTITY>,com.speedment.runtime.compute.trait.HasCompose<ENTITY>,HasGetter<ENTITY>,com.speedment.runtime.compute.trait.HasHash<ENTITY>,com.speedment.runtime.compute.trait.HasMap<ENTITY,,com.speedment.common.function.CharUnaryOperator, com.speedment.runtime.compute.ToChar<ENTITY>> HasTable<ENTITY>,com.speedment.runtime.compute.ToChar<ENTITY>,com.speedment.common.function.ToCharFunction<ENTITY>
public interface CharField<ENTITY>
extends Field<ENTITY>, HasCharValue<ENTITY>, HasComparableOperators<ENTITY,Character>, com.speedment.runtime.compute.ToChar<ENTITY>, CharFieldComparator<ENTITY>
A field that represents a primitive
char value.
Generated by com.speedment.sources.pattern.FieldPattern.
- Since:
- 3.0.0
- Author:
- Emil Forslund
-
Method Summary
Modifier and TypeMethodDescriptiondefault charapplyAsChar(ENTITY entity) Returns aComparatorthat will compare to this field using this fields natural order, null fields are sorted last.static <ENTITY> CharField<ENTITY>create(Class<ENTITY> table, String columnName, CharGetter<ENTITY> getter, boolean unique) Creates a newCharFieldusing the default implementation.getField()Gets the field that is being compared.default CharFieldComparator<ENTITY>reversed()Returns a newFieldComparatorthat order entities in the opposite orders compared to this comparator.Methods inherited from interface java.util.Comparator
equalsMethods inherited from interface com.speedment.jpastreamer.field.comparator.FieldComparator
getNullOrder, isReversedMethods inherited from interface com.speedment.jpastreamer.field.trait.HasCharValue
getAsChar, getterMethods inherited from interface com.speedment.jpastreamer.field.trait.HasColumnName
columnNameMethods inherited from interface com.speedment.jpastreamer.field.trait.HasComparableOperators
between, between, comparatorNullFieldsFirst, equal, greaterOrEqual, greaterThan, in, in, lessOrEqual, lessThan, notBetween, notBetween, notEqual, notIn, notIn, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface com.speedment.runtime.compute.ToChar
asDouble, asInt, asLong, compare, compose, expressionType, hash, map, toLowerCase, toUpperCase
-
Method Details
-
create
static <ENTITY> CharField<ENTITY> create(Class<ENTITY> table, String columnName, CharGetter<ENTITY> getter, boolean unique) Creates a newCharFieldusing the default implementation.- Type Parameters:
ENTITY- entity type- Parameters:
table- the table that the field belongs tocolumnName- the name of the database column the field representsgetter- method reference to getter in entityunique- if column only contains unique values- Returns:
- the created field
-
applyAsChar
- Specified by:
applyAsCharin interfacecom.speedment.common.function.ToCharFunction<ENTITY>
-
comparator
CharFieldComparator<ENTITY> comparator()Description copied from interface:HasComparableOperatorsReturns aComparatorthat will compare to this field using this fields natural order, null fields are sorted last.- Specified by:
comparatorin interfaceHasComparableOperators<ENTITY,Character> - Returns:
- a
Comparatorthat will compare to this field using this fields natural order, null fields are sorted last.
-
reversed
Description copied from interface:FieldComparatorReturns a newFieldComparatorthat order entities in the opposite orders compared to this comparator. For an example, if this comparator orders entities based on a column 'firstname' in descending order, then the returnedFieldComparatorwill be ordering entities based on 'firstname' in ascending order.- Specified by:
reversedin interfaceCharFieldComparator<ENTITY>- Specified by:
reversedin interfaceComparator<ENTITY>- Specified by:
reversedin interfaceFieldComparator<ENTITY>- Specified by:
reversedin interfaceHasComparableOperators<ENTITY,Character> - Returns:
- a new reverse comparator
-
getField
Description copied from interface:CharFieldComparatorGets the field that is being compared.- Specified by:
getFieldin interfaceCharFieldComparator<ENTITY>- Specified by:
getFieldin interfaceFieldComparator<ENTITY>- Returns:
- the compared field
-