- 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.ToInt<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,,Integer> 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>,HasIntValue<ENTITY>,com.speedment.runtime.compute.trait.HasMap<ENTITY,,IntUnaryOperator, com.speedment.runtime.compute.ToInt<ENTITY>> com.speedment.runtime.compute.trait.HasMapToDouble<ENTITY,,IntToDoubleFunction> com.speedment.runtime.compute.trait.HasMinus<ENTITY>,com.speedment.runtime.compute.trait.HasMultiply<ENTITY>,com.speedment.runtime.compute.trait.HasNegate<com.speedment.runtime.compute.ToInt<ENTITY>>,com.speedment.runtime.compute.trait.HasPlus<ENTITY>,com.speedment.runtime.compute.trait.HasPow<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>,IntFieldComparator<ENTITY>,com.speedment.runtime.compute.ToInt<ENTITY>,ToIntFunction<ENTITY>
public interface IntField<ENTITY>
extends Field<ENTITY>, HasIntValue<ENTITY>, HasComparableOperators<ENTITY,Integer>, com.speedment.runtime.compute.ToInt<ENTITY>, IntFieldComparator<ENTITY>
A field that represents a primitive
int value.
Generated by com.speedment.sources.pattern.FieldPattern.
- Since:
- 3.0.0
- Author:
- Emil Forslund
-
Method Summary
Modifier and TypeMethodDescriptiondefault intapplyAsInt(ENTITY entity) Returns aComparatorthat will compare to this field using this fields natural order, null fields are sorted last.static <ENTITY> IntField<ENTITY>Creates a newIntFieldusing the default implementation.getField()Gets the field that is being compared.default IntFieldComparator<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.HasIntValue
getAsInt, getterMethods inherited from interface com.speedment.runtime.compute.ToInt
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> IntField<ENTITY> create(Class<ENTITY> table, String columnName, IntGetter<ENTITY> getter, boolean unique) Creates a newIntFieldusing 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
-
applyAsInt
- Specified by:
applyAsIntin interfacecom.speedment.runtime.compute.ToInt<ENTITY>- Specified by:
applyAsIntin interfaceToIntFunction<ENTITY>
-
comparator
IntFieldComparator<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,Integer> - 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,Integer> - Specified by:
reversedin interfaceIntFieldComparator<ENTITY>- Returns:
- a new reverse comparator
-
getField
Description copied from interface:IntFieldComparatorGets the field that is being compared.- Specified by:
getFieldin interfaceFieldComparator<ENTITY>- Specified by:
getFieldin interfaceIntFieldComparator<ENTITY>- Returns:
- the compared field
-