com.espertech.esper.client.soda
Class TimePeriodExpression

java.lang.Object
  extended by com.espertech.esper.client.soda.ExpressionBase
      extended by com.espertech.esper.client.soda.TimePeriodExpression
All Implemented Interfaces:
Expression, java.io.Serializable

public class TimePeriodExpression
extends ExpressionBase

Represent an expression

See Also:
Serialized Form

Constructor Summary
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(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.
 
Method Summary
 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 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 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(java.io.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.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimePeriodExpression

public TimePeriodExpression()
Ctor.


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 exists
hasMonths - flag to indicate that a month-part expression exists
hasWeeks - flag to indicate that a week-part expression exists
hasDays - flag to indicate that a day-part expression exists
hasHours - flag to indicate that a hour-part expression exists
hasMinutes - flag to indicate that a minute-part expression exists
hasSeconds - flag to indicate that a seconds-part expression exists
hasMilliseconds - 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 exists
hasHours - flag to indicate that a hour-part expression exists
hasMinutes - flag to indicate that a minute-part expression exists
hasSeconds - flag to indicate that a seconds-part expression exists
hasMilliseconds - 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 part
monthsExpr - expression returning months value, or null if no such part
weeksExpr - expression returning weeks value, or null if no such part
daysExpr - expression returning days value, or null if no such part
hoursExpr - expression returning hours value, or null if no such part
minutesExpr - expression returning minutes value, or null if no such part
secondsExpr - expression returning seconds value, or null if no such part
millisecondsExpr - 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 part
hoursExpr - expression returning hours value, or null if no such part
minutesExpr - expression returning minutes value, or null if no such part
secondsExpr - expression returning seconds value, or null if no such part
millisecondsExpr - expression returning millisec value, or null if no such part
Method Detail

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

getPrecedence

public ExpressionPrecedenceEnum getPrecedence()
Description copied from interface: Expression
Returns precedence.

Returns:
precedence

toPrecedenceFreeEPL

public void toPrecedenceFreeEPL(java.io.StringWriter writer)
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 class ExpressionBase
Parameters:
writer - is the output to use

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com