- 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.ToLong<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,,Long> 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>,HasLongValue<ENTITY>,com.speedment.runtime.compute.trait.HasMap<ENTITY,,LongUnaryOperator, com.speedment.runtime.compute.ToLong<ENTITY>> com.speedment.runtime.compute.trait.HasMapToDouble<ENTITY,,LongToDoubleFunction> com.speedment.runtime.compute.trait.HasMinus<ENTITY>,com.speedment.runtime.compute.trait.HasMultiply<ENTITY>,com.speedment.runtime.compute.trait.HasNegate<com.speedment.runtime.compute.ToLong<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>,LongFieldComparator<ENTITY>,com.speedment.runtime.compute.ToLong<ENTITY>,ToLongFunction<ENTITY>
public interface LongField<ENTITY>
extends Field<ENTITY>, HasLongValue<ENTITY>, HasComparableOperators<ENTITY,Long>, com.speedment.runtime.compute.ToLong<ENTITY>, LongFieldComparator<ENTITY>
A field that represents a primitive
long value.
Generated by com.speedment.sources.pattern.FieldPattern.
- Since:
- 3.0.0
- Author:
- Emil Forslund
-
Method Summary
Modifier and TypeMethodDescriptiondefault longapplyAsLong(ENTITY entity) Returns aComparatorthat will compare to this field using this fields natural order, null fields are sorted last.static <ENTITY> LongField<ENTITY>create(Class<ENTITY> table, String columnName, LongGetter<ENTITY> getter, boolean unique) Creates a newLongFieldusing the default implementation.getField()Gets the field that is being compared.default LongFieldComparator<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.HasLongValue
getAsLong, getterMethods inherited from interface com.speedment.runtime.compute.ToLong
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> LongField<ENTITY> create(Class<ENTITY> table, String columnName, LongGetter<ENTITY> getter, boolean unique) Creates a newLongFieldusing 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
-
applyAsLong
- Specified by:
applyAsLongin interfacecom.speedment.runtime.compute.ToLong<ENTITY>- Specified by:
applyAsLongin interfaceToLongFunction<ENTITY>
-
comparator
LongFieldComparator<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,Long> - 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,Long> - Specified by:
reversedin interfaceLongFieldComparator<ENTITY>- Returns:
- a new reverse comparator
-
getField
Description copied from interface:LongFieldComparatorGets the field that is being compared.- Specified by:
getFieldin interfaceFieldComparator<ENTITY>- Specified by:
getFieldin interfaceLongFieldComparator<ENTITY>- Returns:
- the compared field
-