@PersistantProperty(property="on") @PersistantProperty(property="nbElementsToRetrieve") public abstract class MMinMaxAccessor extends MSearchAccessor
[
gender: 'M' or 'F',
age: integer,
[other properties]
}
You will be able to find the student with the minimum / maximum age.Modifier and Type | Class and Description |
---|---|
static class |
MMinMaxAccessor.Max |
static class |
MMinMaxAccessor.Min |
IReadAccessor.Standalone
Modifier and Type | Field and Description |
---|---|
protected IReadAccessor |
nbElementsToRetrieve |
protected boolean |
nullIsExtremumValue |
protected List<IReadAccessor> |
on |
SEARCH_ID
internalExpectedGenericType, internalExpectedType, source
Constructor and Description |
---|
MMinMaxAccessor() |
MMinMaxAccessor(IReadAccessor source) |
MMinMaxAccessor(IReadAccessor source,
ICondition condition) |
Modifier and Type | Method and Description |
---|---|
protected void |
check() |
MMinMaxAccessor |
clone()
Clones the Addon.
|
protected void |
commonCompile(ICompilationContext ctxt,
Class<?> expectedType,
Class<?> expectedGenericType) |
boolean |
equals(Object o) |
protected abstract Comparator<Object> |
getComparator(IExecutionContext ctxt) |
CostInfo |
getEstimatedReadCost(ICompilationContext ctxt)
Returns source's cost + 1.
|
IReadAccessor |
getNbElementsToRetrieve() |
List<IReadAccessor> |
getOn() |
int |
hashCode() |
protected abstract boolean |
interpreteComparisonResult(int comparisonResult) |
boolean |
isCacheUsed()
Returns false by default.
|
void |
setNbElementsToRetrieve(IReadAccessor nbElements) |
void |
setOn(List<IReadAccessor> on) |
Object |
specificHandleValue(IExecutionContext ctxt,
Object value)
Override this to apply specific transformation on value read from source accessor.
|
void |
toString(OuterWithLevel outer)
Method used to send String representation of the current object to the
OuterWithLevel . |
check, compileCollection, compileValue, getCondition, getImplementationId, parseCollections, setCondition
getGenericCollectionType, getInternalCacheIdentifier, getSource, getType, handleValue, internalGet, isConstantValue, isInternalCacheIdentifierNeeded, isShouldIterate, resetCachedData, setInternalCacheIdentifier, setSource, wasRegistered
castToExpected, compileRead, compileRead, compileRead, compileRead, get, getGenericTypes, isShouldBeWrappedToConstantValue, isShouldNotCache
optimize, toString
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
finalize, getClass, notify, notifyAll, wait, wait, wait
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
protected List<IReadAccessor> on
protected IReadAccessor nbElementsToRetrieve
protected boolean nullIsExtremumValue
public MMinMaxAccessor()
public MMinMaxAccessor(IReadAccessor source)
public MMinMaxAccessor(IReadAccessor source, ICondition condition)
protected void commonCompile(ICompilationContext ctxt, Class<?> expectedType, Class<?> expectedGenericType) throws MRuleValidationException
commonCompile
in class MSearchAccessor
MRuleValidationException
public CostInfo getEstimatedReadCost(ICompilationContext ctxt) throws MRuleValidationException
AbstractReadSourceAccessor
getEstimatedReadCost
in interface IReadAccessor
getEstimatedReadCost
in class MSearchAccessor
ctxt
- Compilation context.MRuleValidationException
- if validation problem detected.protected void check() throws MRuleValidationException
check
in class MSearchAccessor
MRuleValidationException
public Object specificHandleValue(IExecutionContext ctxt, Object value) throws MAccessorException
AbstractReadSourceAccessor
specificHandleValue
in class MSearchAccessor
MAccessorException
protected abstract boolean interpreteComparisonResult(int comparisonResult)
protected abstract Comparator<Object> getComparator(IExecutionContext ctxt)
public boolean isCacheUsed()
AbstractAddon
isCacheUsed
in interface IAddon
isCacheUsed
in class MSearchAccessor
public MMinMaxAccessor clone()
IAddon
clone
in interface IAccessor
clone
in interface IReadAccessor
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in class MSearchAccessor
public boolean equals(Object o)
equals
in class MSearchAccessor
public int hashCode()
hashCode
in class MSearchAccessor
public void toString(OuterWithLevel outer) throws IOException
Outable
OuterWithLevel
.toString
in interface Outable
toString
in class MSearchAccessor
IOException
public List<IReadAccessor> getOn()
public void setOn(List<IReadAccessor> on)
public IReadAccessor getNbElementsToRetrieve()
public void setNbElementsToRetrieve(IReadAccessor nbElements)