@PersistantProperty(property="year") @PersistantProperty(property="month") @PersistantProperty(property="day") @PersistantProperty(property="hour") @PersistantProperty(property="minute") @PersistantProperty(property="second") @PersistantProperty(property="milli") public class MDateManipulationAccessor extends AbstractReadSourceAccessor
IReadAccessor.Standalone
Modifier and Type | Field and Description |
---|---|
static String |
DATEOP_ID |
internalExpectedGenericType, internalExpectedType, source
Constructor and Description |
---|
MDateManipulationAccessor()
Default constructor.
|
MDateManipulationAccessor(IReadAccessor source,
IReadAccessor year,
IReadAccessor month,
IReadAccessor day,
IReadAccessor hour,
IReadAccessor minute,
IReadAccessor second,
IReadAccessor milli)
Full constructor.
|
Modifier and Type | Method and Description |
---|---|
MDateManipulationAccessor |
clone()
Clones the Addon.
|
<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) |
IReadAccessor |
getDay() |
CostInfo |
getEstimatedReadCost(ICompilationContext ctxt)
Returns source's cost + 1.
|
IReadAccessor |
getHour() |
String |
getImplementationId()
Unique addon implementation ID.
|
IReadAccessor |
getMilli() |
IReadAccessor |
getMinute() |
IReadAccessor |
getMonth() |
IReadAccessor |
getSecond() |
IReadAccessor |
getYear() |
int |
hashCode() |
boolean |
isInternalCacheIdentifierNeeded()
This method allows to tell the engine if a cache identifier is needed.
|
protected boolean |
parseCollections()
Always true.
|
void |
setDay(IReadAccessor day) |
void |
setHour(IReadAccessor hour) |
void |
setMilli(IReadAccessor milli) |
void |
setMinute(IReadAccessor minute) |
void |
setMonth(IReadAccessor month) |
void |
setSecond(IReadAccessor second) |
void |
setYear(IReadAccessor year) |
protected 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, isCacheUsed, isConstantValue, 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 DATEOP_ID
public MDateManipulationAccessor()
public MDateManipulationAccessor(IReadAccessor source, IReadAccessor year, IReadAccessor month, IReadAccessor day, IReadAccessor hour, IReadAccessor minute, IReadAccessor second, IReadAccessor milli)
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
public CostInfo getEstimatedReadCost(ICompilationContext ctxt) throws MRuleValidationException
AbstractReadSourceAccessor
getEstimatedReadCost
in interface IReadAccessor
getEstimatedReadCost
in class AbstractReadSourceAccessor
ctxt
- Compilation context.MRuleValidationException
- if validation problem detected.protected boolean parseCollections()
parseCollections
in class AbstractReadSourceAccessor
protected Object specificHandleValue(IExecutionContext ctxt, Object value) throws MAccessorException
AbstractReadSourceAccessor
specificHandleValue
in class AbstractReadSourceAccessor
MAccessorException
public boolean isInternalCacheIdentifierNeeded()
AbstractAddon
isInternalCacheIdentifierNeeded
in interface IAddon
isInternalCacheIdentifierNeeded
in class AbstractReadSourceAccessor
AbstractAddon.setInternalCacheIdentifier(Integer)
public String getImplementationId()
IAddon
public MDateManipulationAccessor 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 IReadAccessor getYear()
public void setYear(IReadAccessor year)
public IReadAccessor getMonth()
public void setMonth(IReadAccessor month)
public IReadAccessor getDay()
public void setDay(IReadAccessor day)
public IReadAccessor getHour()
public void setHour(IReadAccessor hour)
public IReadAccessor getMinute()
public void setMinute(IReadAccessor minute)
public IReadAccessor getSecond()
public void setSecond(IReadAccessor second)
public IReadAccessor getMilli()
public void setMilli(IReadAccessor milli)