Class TimePeriodExpression

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

public class TimePeriodExpression extends ExpressionBase
Represent an expression
See Also:
  • 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 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
      hasMicroseconds - 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 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
      microsecondsExpr - 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 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 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

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

      public void toPrecedenceFreeEPL(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