@PersistantProperties(properties=@PersistantProperty(property="condition")) public class MSearchAccessor extends AbstractReadSourceAccessor
IReadAccessor.Standalone
Modifier and Type | Field and Description |
---|---|
static String |
SEARCH_ID |
internalExpectedGenericType, internalExpectedType, source
Constructor and Description |
---|
MSearchAccessor() |
MSearchAccessor(IReadAccessor source,
ICondition condition) |
Modifier and Type | Method and Description |
---|---|
protected void |
check() |
protected void |
check(boolean conditionMandatory) |
MSearchAccessor |
clone()
Clones the Addon.
|
protected void |
commonCompile(ICompilationContext ctxt,
Class<?> expectedType,
Class<?> expectedGenericType) |
<G,C extends Collection<G>> |
compileCollection(ICompilationContext ctxt,
Class<C> expectedType,
Class<G> expectedGenericType)
Implementation to handle case when expected result is a Collection.
|
void |
compileValue(ICompilationContext ctxt,
Class<?> expectedType)
Implementation to handle case when expected result is a single value.
|
boolean |
equals(Object o) |
ICondition |
getCondition() |
CostInfo |
getEstimatedReadCost(ICompilationContext ctxt)
Returns source's cost + 1.
|
String |
getImplementationId()
Unique addon implementation ID.
|
int |
hashCode() |
boolean |
isCacheUsed()
Returns false by default.
|
protected boolean |
parseCollections()
Always false.
|
void |
setCondition(ICondition condition) |
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 . |
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
public static final String SEARCH_ID
public MSearchAccessor()
public MSearchAccessor(IReadAccessor source, ICondition condition)
public void compileValue(ICompilationContext ctxt, Class<?> expectedType) throws MRuleValidationException
AbstractReadAccessor
compileValue
in class AbstractReadAccessor
MRuleValidationException
public <G,C extends Collection<G>> void compileCollection(ICompilationContext ctxt, Class<C> expectedType, Class<G> expectedGenericType) throws MRuleValidationException
AbstractReadAccessor
compileCollection
in class AbstractReadAccessor
MRuleValidationException
protected void commonCompile(ICompilationContext ctxt, Class<?> expectedType, Class<?> expectedGenericType) throws MRuleValidationException
MRuleValidationException
protected void check() throws MRuleValidationException
MRuleValidationException
protected void check(boolean conditionMandatory) throws MRuleValidationException
MRuleValidationException
public CostInfo getEstimatedReadCost(ICompilationContext ctxt) throws MRuleValidationException
AbstractReadSourceAccessor
getEstimatedReadCost
in interface IReadAccessor
getEstimatedReadCost
in class AbstractReadSourceAccessor
ctxt
- Compilation context.MRuleValidationException
- if validation problem detected.public Object specificHandleValue(IExecutionContext ctxt, Object value) throws MAccessorException
AbstractReadSourceAccessor
specificHandleValue
in class AbstractReadSourceAccessor
MAccessorException
protected boolean parseCollections()
parseCollections
in class AbstractReadSourceAccessor
public String getImplementationId()
IAddon
public boolean isCacheUsed()
AbstractAddon
isCacheUsed
in interface IAddon
isCacheUsed
in class AbstractReadSourceAccessor
public MSearchAccessor clone()
IAddon
clone
in interface IAccessor
clone
in interface IReadAccessor
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in class AbstractReadSourceAccessor
public boolean equals(Object o)
equals
in class AbstractReadSourceAccessor
public int hashCode()
hashCode
in class AbstractReadSourceAccessor
public void toString(OuterWithLevel outer) throws IOException
Outable
OuterWithLevel
.toString
in interface Outable
toString
in class AbstractReadSourceAccessor
IOException
public ICondition getCondition()
public void setCondition(ICondition condition)