public class MCountAccessor extends MSearchAccessor
IReadAccessor.Standalone
Modifier and Type | Field and Description |
---|---|
static String |
COUNT_ID |
SEARCH_ID
internalExpectedGenericType, internalExpectedType, source
Constructor and Description |
---|
MCountAccessor() |
MCountAccessor(IReadAccessor source,
ICondition condition) |
Modifier and Type | Method and Description |
---|---|
protected void |
check() |
MCountAccessor |
clone()
Clones the Addon.
|
<G,C extends Collection<G>> |
compileCollection(ICompilationContext ctxt,
Class<C> expectedType,
Class<G> expectedGenericType)
Unsupported.
|
void |
compileValue(ICompilationContext ctxt,
Class<?> expectedType)
Implementation to handle case when expected result is a single value.
|
CostInfo |
getEstimatedReadCost(ICompilationContext ctxt)
Returns source's cost + 1.
|
String |
getImplementationId()
Unique addon implementation ID.
|
Class<?> |
getType(IContext ctxt)
Returns requested type if any, otherwise the source's type if any.
|
Object |
handleValue(IExecutionContext ctxt,
Object value)
If value is a collection an collections should be parsed, calls
AbstractReadSourceAccessor.specificHandleValue(IExecutionContext, Object)
for all elements in collection. |
check, commonCompile, equals, getCondition, hashCode, isCacheUsed, parseCollections, setCondition, specificHandleValue, toString
getGenericCollectionType, getInternalCacheIdentifier, getSource, 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
public static final String COUNT_ID
public MCountAccessor()
public MCountAccessor(IReadAccessor source, ICondition condition)
protected void check() throws MRuleValidationException
check
in class MSearchAccessor
MRuleValidationException
public void compileValue(ICompilationContext ctxt, Class<?> expectedType) throws MRuleValidationException
AbstractReadAccessor
compileValue
in class MSearchAccessor
MRuleValidationException
public <G,C extends Collection<G>> void compileCollection(ICompilationContext ctxt, Class<C> expectedType, Class<G> expectedGenericType) throws MRuleValidationException
compileCollection
in class MSearchAccessor
MRuleValidationException
public Object handleValue(IExecutionContext ctxt, Object value) throws MAccessorException
AbstractReadSourceAccessor
AbstractReadSourceAccessor.specificHandleValue(IExecutionContext, Object)
for all elements in collection.
Otherwise calls it only once for the value.handleValue
in interface IAccessorValueHandler
handleValue
in class AbstractReadSourceAccessor
MAccessorException
public CostInfo getEstimatedReadCost(ICompilationContext ctxt) throws MRuleValidationException
AbstractReadSourceAccessor
getEstimatedReadCost
in interface IReadAccessor
getEstimatedReadCost
in class MSearchAccessor
ctxt
- Compilation context.MRuleValidationException
- if validation problem detected.public Class<?> getType(IContext ctxt) throws MAccessorException
AbstractReadSourceAccessor
getType
in interface IAccessor
getType
in class AbstractReadSourceAccessor
MAccessorException
public String getImplementationId()
IAddon
getImplementationId
in interface IAddon
getImplementationId
in class MSearchAccessor
public MCountAccessor clone()
IAddon
clone
in interface IAccessor
clone
in interface IReadAccessor
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in class MSearchAccessor