Class AbstractTemporalLiteral

All Implemented Interfaces:
Expression, Literal, QueryObject
Direct Known Subclasses:
DateLiteral, TimeLiteral, TimestampLiteral

public abstract class AbstractTemporalLiteral extends AbstractLiteral
Abstract immutable base class for temporal literals.
Since:
1.3
Version:
$Revision: 7121 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Author:
Udai Gupta, Ralf Joachim
  • Constructor Details

    • AbstractTemporalLiteral

      protected AbstractTemporalLiteral(Date value)
      Construct an abstract temporal literal with given date.
      Parameters:
      value - Date value for the temporal literal.
    • AbstractTemporalLiteral

      protected AbstractTemporalLiteral(Calendar value)
      Construct an abstract temporal literal with given calendar.
      Parameters:
      value - Calendar value for the temporal literal.
  • Method Details

    • createInstance

      public static AbstractTemporalLiteral createInstance(TemporalType temporalType, Date value)
      Factory method to create a temporal literal for the date given that matches the temporal type given.
      Parameters:
      temporalType - Temporal type of the temporal literal to return.
      value - Date value for the temporal literal.
      Returns:
      Temporal literal.
    • createInstance

      public static AbstractTemporalLiteral createInstance(TemporalType temporalType, Calendar value)
      Factory method to create a temporal literal for the calendar given that matches the temporal type given.
      Parameters:
      temporalType - Temporal type of the temporal literal to return.
      value - Calendar value for the temporal literal.
      Returns:
      Temporal literal.
    • getValue

      public final Date getValue()
      Get date value of the temporal literal.
      Returns:
      Date value of the temporal literal.