public class ExprTimePeriodImpl extends ExprNodeBase implements ExprTimePeriod, TimePeriodEval
Child nodes to this expression carry the actual parts and must return a numeric value.
EPTYPE
Constructor and Description |
---|
ExprTimePeriodImpl(boolean hasYear,
boolean hasMonth,
boolean hasWeek,
boolean hasDay,
boolean hasHour,
boolean hasMinute,
boolean hasSecond,
boolean hasMillisecond,
boolean hasMicrosecond,
TimeAbacus timeAbacus) |
Modifier and Type | Method and Description |
---|---|
boolean |
equalsNode(ExprNode node,
boolean ignoreStreamPrefix)
Return true if a expression node semantically equals the current node, or false if not.
|
double |
evaluateAsSeconds(EventBean[] eventsPerStream,
boolean newData,
ExprEvaluatorContext context) |
CodegenExpression |
evaluateAsSecondsCodegen(CodegenMethodScope codegenMethodScope,
ExprForgeCodegenSymbol exprSymbol,
CodegenClassScope codegenClassScope) |
TimePeriod |
evaluateGetTimePeriod(EventBean[] eventsPerStream,
boolean newData,
ExprEvaluatorContext context) |
CodegenExpression |
evaluateGetTimePeriodCodegen(CodegenMethodScope codegenMethodScope,
ExprForgeCodegenSymbol exprSymbol,
CodegenClassScope codegenClassScope) |
ExprEvaluator |
getExprEvaluator() |
ExprForge |
getForge() |
ExprPrecedenceEnum |
getPrecedence()
Returns precedence.
|
TimeAbacus |
getTimeAbacus() |
TimePeriodComputeForge |
getTimePeriodComputeForge() |
TimePeriodEval |
getTimePeriodEval() |
boolean |
hasVariable()
Indicator whether the time period has a variable in any of the child expressions.
|
boolean |
isConstantResult() |
boolean |
isHasDay()
Indicator whether the time period has a day part child expression.
|
boolean |
isHasHour()
Indicator whether the time period has a hour part child expression.
|
boolean |
isHasMicrosecond()
Indicator whether the time period has a microsecond part child expression.
|
boolean |
isHasMillisecond()
Indicator whether the time period has a millisecond part child expression.
|
boolean |
isHasMinute()
Indicator whether the time period has a minute part child expression.
|
boolean |
isHasMonth()
Indicator whether the time period has a month part child expression.
|
boolean |
isHasSecond()
Indicator whether the time period has a second part child expression.
|
boolean |
isHasWeek()
Indicator whether the time period has a week part child expression.
|
boolean |
isHasYear()
Indicator whether the time period has a year part child expression.
|
CodegenExpression |
makeTimePeriodAnonymous(CodegenMethod method,
CodegenClassScope classScope) |
TimePeriod |
timePeriodEval(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext exprEvaluatorContext) |
void |
toPrecedenceFreeEPL(StringWriter writer,
ExprNodeRenderableFlags flags) |
ExprNode |
validate(ExprValidationContext validationContext) |
accept, accept, acceptChildnodes, addChildNode, addChildNodes, addChildNodeToFront, checkValidated, checkValidatedException, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, accept, acceptChildnodes, addChildNode, addChildNodes, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes
toEPL
public ExprTimePeriodImpl(boolean hasYear, boolean hasMonth, boolean hasWeek, boolean hasDay, boolean hasHour, boolean hasMinute, boolean hasSecond, boolean hasMillisecond, boolean hasMicrosecond, TimeAbacus timeAbacus)
public ExprEvaluator getExprEvaluator()
public TimePeriodEval getTimePeriodEval()
getTimePeriodEval
in interface ExprTimePeriod
public TimePeriodComputeForge getTimePeriodComputeForge()
getTimePeriodComputeForge
in interface ExprTimePeriod
public CodegenExpression evaluateGetTimePeriodCodegen(CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope)
evaluateGetTimePeriodCodegen
in interface ExprTimePeriod
public CodegenExpression makeTimePeriodAnonymous(CodegenMethod method, CodegenClassScope classScope)
makeTimePeriodAnonymous
in interface ExprTimePeriod
public CodegenExpression evaluateAsSecondsCodegen(CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope)
evaluateAsSecondsCodegen
in interface ExprTimePeriod
public boolean hasVariable()
hasVariable
in interface ExprTimePeriod
public TimePeriod evaluateGetTimePeriod(EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext context)
evaluateGetTimePeriod
in interface ExprTimePeriod
public double evaluateAsSeconds(EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext context)
evaluateAsSeconds
in interface ExprTimePeriod
public TimeAbacus getTimeAbacus()
public boolean isHasDay()
isHasDay
in interface ExprTimePeriod
public boolean isHasHour()
isHasHour
in interface ExprTimePeriod
public boolean isHasMinute()
isHasMinute
in interface ExprTimePeriod
public boolean isHasSecond()
isHasSecond
in interface ExprTimePeriod
public boolean isHasMillisecond()
isHasMillisecond
in interface ExprTimePeriod
public boolean isHasMicrosecond()
ExprTimePeriod
isHasMicrosecond
in interface ExprTimePeriod
public boolean isHasYear()
isHasYear
in interface ExprTimePeriod
public boolean isHasMonth()
isHasMonth
in interface ExprTimePeriod
public boolean isHasWeek()
isHasWeek
in interface ExprTimePeriod
public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException
validate
in interface ExprValidator
ExprValidationException
public boolean isConstantResult()
isConstantResult
in interface ExprTimePeriod
public void toPrecedenceFreeEPL(StringWriter writer, ExprNodeRenderableFlags flags)
toPrecedenceFreeEPL
in class ExprNodeBase
public ExprPrecedenceEnum getPrecedence()
ExprNode
getPrecedence
in interface ExprNode
public boolean equalsNode(ExprNode node, boolean ignoreStreamPrefix)
ExprNode
Concrete implementations should compare the type and any additional information that impact the evaluation of a node.
equalsNode
in interface ExprNode
node
- to compare toignoreStreamPrefix
- when the equals-comparison can ignore prefix of event propertiespublic TimePeriod timePeriodEval(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
timePeriodEval
in interface TimePeriodEval
Copyright © 2005–2021. All rights reserved.