- Type Parameters:
ENTITY- entity type
- All Superinterfaces:
Comparator<ENTITY>,com.speedment.runtime.compute.expression.Expression<ENTITY>,Field<ENTITY>,FieldComparator<ENTITY>,com.speedment.runtime.compute.trait.HasAbs<com.speedment.runtime.compute.ToShort<ENTITY>>,com.speedment.runtime.compute.trait.HasAsDouble<ENTITY>,com.speedment.runtime.compute.trait.HasAsInt<ENTITY>,com.speedment.runtime.compute.trait.HasAsLong<ENTITY>,HasColumnName,HasComparableOperators<ENTITY,,Short> com.speedment.runtime.compute.trait.HasCompare<ENTITY>,com.speedment.runtime.compute.trait.HasCompose<ENTITY>,com.speedment.runtime.compute.trait.HasDivide<ENTITY>,HasGetter<ENTITY>,com.speedment.runtime.compute.trait.HasHash<ENTITY>,com.speedment.runtime.compute.trait.HasMap<ENTITY,,com.speedment.common.function.ShortUnaryOperator, com.speedment.runtime.compute.ToShort<ENTITY>> com.speedment.runtime.compute.trait.HasMapToDouble<ENTITY,,com.speedment.common.function.ShortToDoubleFunction> com.speedment.runtime.compute.trait.HasMinus<ENTITY>,com.speedment.runtime.compute.trait.HasMultiply<ENTITY>,com.speedment.runtime.compute.trait.HasNegate<com.speedment.runtime.compute.ToShort<ENTITY>>,com.speedment.runtime.compute.trait.HasPlus<ENTITY>,com.speedment.runtime.compute.trait.HasPow<ENTITY>,HasShortValue<ENTITY>,com.speedment.runtime.compute.trait.HasSign<com.speedment.runtime.compute.ToByte<ENTITY>>,com.speedment.runtime.compute.trait.HasSqrt<com.speedment.runtime.compute.ToDouble<ENTITY>>,HasTable<ENTITY>,ShortFieldComparator<ENTITY>,com.speedment.runtime.compute.ToShort<ENTITY>,com.speedment.common.function.ToShortFunction<ENTITY>
public interface ShortField<ENTITY>
extends Field<ENTITY>, HasShortValue<ENTITY>, HasComparableOperators<ENTITY,Short>, com.speedment.runtime.compute.ToShort<ENTITY>, ShortFieldComparator<ENTITY>
A field that represents a primitive
short value.
Generated by com.speedment.sources.pattern.FieldPattern.
- Since:
- 3.0.0
- Author:
- Emil Forslund
-
Method Summary
Modifier and TypeMethodDescriptiondefault shortapplyAsShort(ENTITY entity) Returns aComparatorthat will compare to this field using this fields natural order, null fields are sorted last.static <ENTITY> ShortField<ENTITY>create(Class<ENTITY> table, String columnName, ShortGetter<ENTITY> getter, boolean unique) Creates a newShortFieldusing the default implementation.default ShortField<ENTITY>getField()Gets the field that is being compared.default ShortFieldComparator<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.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.jpastreamer.field.trait.HasShortValue
getAsShort, getterMethods inherited from interface com.speedment.runtime.compute.ToShort
abs, asDouble, asInt, asLong, compare, compose, divide, divide, divide, divide, divide, divide, expressionType, hash, map, mapToDouble, minus, minus, minus, minus, minus, minus, minus, minus, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, negate, plus, plus, plus, plus, plus, plus, plus, plus, pow, pow, pow, pow, sign, sqrt
-
Method Details
-
create
static <ENTITY> ShortField<ENTITY> create(Class<ENTITY> table, String columnName, ShortGetter<ENTITY> getter, boolean unique) Creates a newShortFieldusing the default implementation.- Type Parameters:
ENTITY- entity type- Parameters:
table- the table that this 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
-
applyAsShort
-
comparator
ShortFieldComparator<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,Short> - 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 interfaceComparator<ENTITY>- Specified by:
reversedin interfaceFieldComparator<ENTITY>- Specified by:
reversedin interfaceHasComparableOperators<ENTITY,Short> - Specified by:
reversedin interfaceShortFieldComparator<ENTITY>- Returns:
- a new reverse comparator
-
getField
Description copied from interface:ShortFieldComparatorGets the field that is being compared.- Specified by:
getFieldin interfaceFieldComparator<ENTITY>- Specified by:
getFieldin interfaceShortFieldComparator<ENTITY>- Returns:
- the compared field
-