Class TimePeriodExpression
java.lang.Object
com.espertech.esper.common.client.soda.ExpressionBase
com.espertech.esper.common.client.soda.TimePeriodExpression
- All Implemented Interfaces:
Expression
,Serializable
Represent an expression
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.TimePeriodExpression
(boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds) Ctor.TimePeriodExpression
(boolean hasYears, boolean hasMonths, boolean hasWeeks, boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds) Ctor.TimePeriodExpression
(boolean hasYears, boolean hasMonths, boolean hasWeeks, boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds, boolean hasMicroseconds) Ctor.TimePeriodExpression
(Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr) Ctor.TimePeriodExpression
(Expression yearsExpr, Expression monthsExpr, Expression weeksExpr, Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr) Ctor.TimePeriodExpression
(Expression yearsExpr, Expression monthsExpr, Expression weeksExpr, Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr, Expression microsecondsExpr) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionReturns precedence.boolean
Returns true if a subexpression exists that is a day-part.boolean
Returns true if a subexpression exists that is a hour-part.boolean
Returns true if a subexpression exists that is a microsecond-part.boolean
Returns true if a subexpression exists that is a milliseconds-part.boolean
Returns true if a subexpression exists that is a minutes-part.boolean
Returns true if a subexpression exists that is a month-part.boolean
Returns true if a subexpression exists that is a seconds-part.boolean
Returns true if a subexpression exists that is a weeks-part.boolean
Returns true if a subexpression exists that is a year-part.void
setHasDays
(boolean hasDays) Set to true if a subexpression exists that is a day-part.void
setHasHours
(boolean hasHours) Set to true if a subexpression exists that is a hour-part.void
setHasMicroseconds
(boolean hasMicroseconds) Set to true if a subexpression exists that is a microsecond-part.void
setHasMilliseconds
(boolean hasMilliseconds) Set to true if a subexpression exists that is a msec-part.void
setHasMinutes
(boolean hasMinutes) Set to true if a subexpression exists that is a minutes-part.void
setHasMonths
(boolean hasMonths) Set to true if a subexpression exists that is a month-part.void
setHasSeconds
(boolean hasSeconds) Set to true if a subexpression exists that is a seconds-part.void
setHasWeeks
(boolean hasWeeks) Set to true if a subexpression exists that is a weeks-part.void
setHasYears
(boolean hasYears) Set to true if a subexpression exists that is a year-part.void
toPrecedenceFreeEPL
(StringWriter writer) Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.Methods inherited from class com.espertech.esper.common.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
-
Constructor Details
-
TimePeriodExpression
public TimePeriodExpression()Ctor. -
TimePeriodExpression
public TimePeriodExpression(boolean hasYears, boolean hasMonths, boolean hasWeeks, boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds, boolean hasMicroseconds) Ctor.- Parameters:
hasYears
- flag to indicate that a year-part expression existshasMonths
- flag to indicate that a month-part expression existshasWeeks
- flag to indicate that a week-part expression existshasDays
- flag to indicate that a day-part expression existshasHours
- flag to indicate that a hour-part expression existshasMinutes
- flag to indicate that a minute-part expression existshasSeconds
- flag to indicate that a seconds-part expression existshasMilliseconds
- flag to indicate that a millisec-part expression existshasMicroseconds
- flag to indicate that a microsecond-part expression exists
-
TimePeriodExpression
public TimePeriodExpression(Expression yearsExpr, Expression monthsExpr, Expression weeksExpr, Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr, Expression microsecondsExpr) Ctor.- Parameters:
yearsExpr
- expression returning years value, or null if no such partmonthsExpr
- expression returning months value, or null if no such partweeksExpr
- expression returning weeks value, or null if no such partdaysExpr
- expression returning days value, or null if no such parthoursExpr
- expression returning hours value, or null if no such partminutesExpr
- expression returning minutes value, or null if no such partsecondsExpr
- expression returning seconds value, or null if no such partmillisecondsExpr
- expression returning millisec value, or null if no such partmicrosecondsExpr
- expression returning microsecond value, or null if no such part
-
TimePeriodExpression
public TimePeriodExpression(boolean hasYears, boolean hasMonths, boolean hasWeeks, boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds) Ctor.- Parameters:
hasYears
- flag to indicate that a year-part expression existshasMonths
- flag to indicate that a month-part expression existshasWeeks
- flag to indicate that a week-part expression existshasDays
- flag to indicate that a day-part expression existshasHours
- flag to indicate that a hour-part expression existshasMinutes
- flag to indicate that a minute-part expression existshasSeconds
- flag to indicate that a seconds-part expression existshasMilliseconds
- flag to indicate that a millisec-part expression exists
-
TimePeriodExpression
public TimePeriodExpression(boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds) Ctor.- Parameters:
hasDays
- flag to indicate that a day-part expression existshasHours
- flag to indicate that a hour-part expression existshasMinutes
- flag to indicate that a minute-part expression existshasSeconds
- flag to indicate that a seconds-part expression existshasMilliseconds
- flag to indicate that a millisec-part expression exists
-
TimePeriodExpression
public TimePeriodExpression(Expression yearsExpr, Expression monthsExpr, Expression weeksExpr, Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr) Ctor.- Parameters:
yearsExpr
- expression returning years value, or null if no such partmonthsExpr
- expression returning months value, or null if no such partweeksExpr
- expression returning weeks value, or null if no such partdaysExpr
- expression returning days value, or null if no such parthoursExpr
- expression returning hours value, or null if no such partminutesExpr
- expression returning minutes value, or null if no such partsecondsExpr
- expression returning seconds value, or null if no such partmillisecondsExpr
- expression returning millisec value, or null if no such part
-
TimePeriodExpression
public TimePeriodExpression(Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr) Ctor.- Parameters:
daysExpr
- expression returning days value, or null if no such parthoursExpr
- expression returning hours value, or null if no such partminutesExpr
- expression returning minutes value, or null if no such partsecondsExpr
- expression returning seconds value, or null if no such partmillisecondsExpr
- expression returning millisec value, or null if no such part
-
-
Method Details
-
isHasDays
public boolean isHasDays()Returns true if a subexpression exists that is a day-part.- Returns:
- indicator for presence of part
-
setHasDays
public void setHasDays(boolean hasDays) Set to true if a subexpression exists that is a day-part.- Parameters:
hasDays
- for presence of part
-
isHasHours
public boolean isHasHours()Returns true if a subexpression exists that is a hour-part.- Returns:
- indicator for presence of part
-
setHasHours
public void setHasHours(boolean hasHours) Set to true if a subexpression exists that is a hour-part.- Parameters:
hasHours
- for presence of part
-
isHasMinutes
public boolean isHasMinutes()Returns true if a subexpression exists that is a minutes-part.- Returns:
- indicator for presence of part
-
setHasMinutes
public void setHasMinutes(boolean hasMinutes) Set to true if a subexpression exists that is a minutes-part.- Parameters:
hasMinutes
- for presence of part
-
isHasSeconds
public boolean isHasSeconds()Returns true if a subexpression exists that is a seconds-part.- Returns:
- indicator for presence of part
-
setHasSeconds
public void setHasSeconds(boolean hasSeconds) Set to true if a subexpression exists that is a seconds-part.- Parameters:
hasSeconds
- for presence of part
-
isHasMilliseconds
public boolean isHasMilliseconds()Returns true if a subexpression exists that is a milliseconds-part.- Returns:
- indicator for presence of part
-
setHasMilliseconds
public void setHasMilliseconds(boolean hasMilliseconds) Set to true if a subexpression exists that is a msec-part.- Parameters:
hasMilliseconds
- for presence of part
-
isHasYears
public boolean isHasYears()Returns true if a subexpression exists that is a year-part.- Returns:
- indicator for presence of part
-
setHasYears
public void setHasYears(boolean hasYears) Set to true if a subexpression exists that is a year-part.- Parameters:
hasYears
- for presence of part
-
isHasMonths
public boolean isHasMonths()Returns true if a subexpression exists that is a month-part.- Returns:
- indicator for presence of part
-
setHasMonths
public void setHasMonths(boolean hasMonths) Set to true if a subexpression exists that is a month-part.- Parameters:
hasMonths
- for presence of part
-
isHasWeeks
public boolean isHasWeeks()Returns true if a subexpression exists that is a weeks-part.- Returns:
- indicator for presence of part
-
setHasWeeks
public void setHasWeeks(boolean hasWeeks) Set to true if a subexpression exists that is a weeks-part.- Parameters:
hasWeeks
- for presence of part
-
isHasMicroseconds
public boolean isHasMicroseconds()Returns true if a subexpression exists that is a microsecond-part.- Returns:
- indicator for presence of part
-
setHasMicroseconds
public void setHasMicroseconds(boolean hasMicroseconds) Set to true if a subexpression exists that is a microsecond-part.- Parameters:
hasMicroseconds
- indicator for presence of part
-
getPrecedence
Description copied from interface:Expression
Returns precedence.- Returns:
- precedence
-
toPrecedenceFreeEPL
Description copied from class:ExpressionBase
Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.- Specified by:
toPrecedenceFreeEPL
in classExpressionBase
- Parameters:
writer
- is the output to use
-