Package com.j_spaces.jdbc.builder.range
Class SegmentRange
java.lang.Object
com.gigaspaces.internal.query.AbstractCustomQuery
com.j_spaces.jdbc.builder.range.Range
com.j_spaces.jdbc.builder.range.SegmentRange
- All Implemented Interfaces:
ICustomQuery,SmartExternalizable,Externalizable,Serializable
Defines a range of objects. The range is defined by two objects - _min and _max. And represents a
range in the following way: (_min,_max) ==> _min < x < _max (null,_max) ==> x < _max (_min,null)
==> x > _min
- Author:
- anna
- See Also:
-
Field Summary
Fields inherited from class com.j_spaces.jdbc.builder.range.Range
EMPTY_RANGE -
Constructor Summary
ConstructorsConstructorDescriptionSegmentRange(String colName, FunctionCallDescription functionCallDescription, Comparable<?> value1, boolean includeMin, Comparable<?> value2, boolean includeMax) SegmentRange(String colName, Comparable<?> value1, boolean includeMin, Comparable<?> value2, boolean includeMax) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(Comparable value) getMax()getMin()intersection(EqualValueRange range) intersection(InRange range) intersection(IsNullRange range) intersection(NotEqualValueRange range) intersection(NotNullRange range) intersection(NotRegexRange range) intersection(Range range) intersection(RegexRange range) intersection(RelationRange range) intersection(SegmentRange range) Calculates the intersection between this range and the given rangebooleanbooleanbooleanbooleanvoidvoidsetIncludeMax(boolean includeMax) voidsetIncludeMin(boolean includeMin) booleanvoidtoEntryPacket(QueryTemplatePacket e, int index) Convert the range to a single external entry expressiontoSQLQuery(ITypeDesc typeDesc) voidMethods inherited from class com.j_spaces.jdbc.builder.range.Range
chooseRange, evaluatePredicate, getFunction, getFunctionCallDescription, getPath, getPredicate, getRightColumnPosition, hasFunctionCallDescription, hasFunctionOnlyOnOneSide, hasSameFunction, intersection, intersection, isComplex, isEmptyRange, isEqualValueRange, isIndexed, isInternalRange, isNestedQuery, isUidsRange, matches, setFunction, setFunctionCallDescription, twoBuiltInFunctionsMethods inherited from class com.gigaspaces.internal.query.AbstractCustomQuery
addCustomIndex, getCustomIndexes, matchConvertingExceptionHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
Constructor Details
-
SegmentRange
public SegmentRange() -
SegmentRange
public SegmentRange(String colName, Comparable<?> value1, boolean includeMin, Comparable<?> value2, boolean includeMax) -
SegmentRange
public SegmentRange(String colName, FunctionCallDescription functionCallDescription, Comparable<?> value1, boolean includeMin, Comparable<?> value2, boolean includeMax)
-
-
Method Details
-
getMin
- Returns:
- the _min
-
getMax
- Returns:
- the _max
-
isIncludeMin
public boolean isIncludeMin()- Returns:
- the _includeMin
-
setIncludeMin
public void setIncludeMin(boolean includeMin) - Parameters:
includeMin- the includeMin to set
-
setIncludeMax
public void setIncludeMax(boolean includeMax) - Parameters:
includeMax- the includeMax to set
-
isIncludeMax
public boolean isIncludeMax()- Returns:
- the _includeMax
-
toEntryPacket
Description copied from class:RangeConvert the range to a single external entry expression- Overrides:
toEntryPacketin classRange
-
contains
- Returns:
- true if this range contains given value
-
intersection
Calculates the intersection between this range and the given range- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
intersection
- Specified by:
intersectionin classRange
-
suitableAsCompoundIndexSegment
public boolean suitableAsCompoundIndexSegment()- Overrides:
suitableAsCompoundIndexSegmentin classRange
-
isSegmentRange
public boolean isSegmentRange()- Overrides:
isSegmentRangein classRange
-
isRelevantForAllIndexValuesOptimization
public boolean isRelevantForAllIndexValuesOptimization()- Overrides:
isRelevantForAllIndexValuesOptimizationin classRange
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classRange- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classRange- Throws:
IOException
-
getIndexScanner
- Overrides:
getIndexScannerin classRange
-
toSQLQuery
- Parameters:
typeDesc- TODO- Returns:
- SQLQuery
-