public class TimePeriodExpression extends ExpressionBase
Constructor and Description |
---|
TimePeriodExpression()
Ctor.
|
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.
|
Modifier and Type | Method and Description |
---|---|
ExpressionPrecedenceEnum |
getPrecedence()
Returns precedence.
|
boolean |
isHasDays()
Returns true if a subexpression exists that is a day-part.
|
boolean |
isHasHours()
Returns true if a subexpression exists that is a hour-part.
|
boolean |
isHasMicroseconds()
Returns true if a subexpression exists that is a microsecond-part.
|
boolean |
isHasMilliseconds()
Returns true if a subexpression exists that is a milliseconds-part.
|
boolean |
isHasMinutes()
Returns true if a subexpression exists that is a minutes-part.
|
boolean |
isHasMonths()
Returns true if a subexpression exists that is a month-part.
|
boolean |
isHasSeconds()
Returns true if a subexpression exists that is a seconds-part.
|
boolean |
isHasWeeks()
Returns true if a subexpression exists that is a weeks-part.
|
boolean |
isHasYears()
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.
|
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
public TimePeriodExpression()
public TimePeriodExpression(boolean hasYears, boolean hasMonths, boolean hasWeeks, boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds, boolean hasMicroseconds)
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 existspublic TimePeriodExpression(Expression yearsExpr, Expression monthsExpr, Expression weeksExpr, Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr, Expression microsecondsExpr)
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 partpublic TimePeriodExpression(boolean hasYears, boolean hasMonths, boolean hasWeeks, boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds)
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 existspublic TimePeriodExpression(boolean hasDays, boolean hasHours, boolean hasMinutes, boolean hasSeconds, boolean hasMilliseconds)
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 existspublic TimePeriodExpression(Expression yearsExpr, Expression monthsExpr, Expression weeksExpr, Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr)
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 partpublic TimePeriodExpression(Expression daysExpr, Expression hoursExpr, Expression minutesExpr, Expression secondsExpr, Expression millisecondsExpr)
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 partpublic boolean isHasDays()
public void setHasDays(boolean hasDays)
hasDays
- for presence of partpublic boolean isHasHours()
public void setHasHours(boolean hasHours)
hasHours
- for presence of partpublic boolean isHasMinutes()
public void setHasMinutes(boolean hasMinutes)
hasMinutes
- for presence of partpublic boolean isHasSeconds()
public void setHasSeconds(boolean hasSeconds)
hasSeconds
- for presence of partpublic boolean isHasMilliseconds()
public void setHasMilliseconds(boolean hasMilliseconds)
hasMilliseconds
- for presence of partpublic boolean isHasYears()
public void setHasYears(boolean hasYears)
hasYears
- for presence of partpublic boolean isHasMonths()
public void setHasMonths(boolean hasMonths)
hasMonths
- for presence of partpublic boolean isHasWeeks()
public void setHasWeeks(boolean hasWeeks)
hasWeeks
- for presence of partpublic boolean isHasMicroseconds()
public void setHasMicroseconds(boolean hasMicroseconds)
hasMicroseconds
- indicator for presence of partpublic ExpressionPrecedenceEnum getPrecedence()
Expression
public void toPrecedenceFreeEPL(StringWriter writer)
ExpressionBase
toPrecedenceFreeEPL
in class ExpressionBase
writer
- is the output to use