Class AbstractTemporalLiteral
- java.lang.Object
-
- org.castor.cpa.query.object.AbstractQueryObject
-
- org.castor.cpa.query.object.expression.AbstractExpression
-
- org.castor.cpa.query.object.literal.AbstractLiteral
-
- org.castor.cpa.query.object.literal.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 Summary
Constructors Modifier Constructor Description protected
AbstractTemporalLiteral(java.util.Calendar value)
Construct an abstract temporal literal with given calendar.protected
AbstractTemporalLiteral(java.util.Date value)
Construct an abstract temporal literal with given date.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AbstractTemporalLiteral
createInstance(TemporalType temporalType, java.util.Calendar value)
Factory method to create a temporal literal for the calendar given that matches the temporal type given.static AbstractTemporalLiteral
createInstance(TemporalType temporalType, java.util.Date value)
Factory method to create a temporal literal for the date given that matches the temporal type given.java.util.Date
getValue()
Get date value of the temporal literal.-
Methods inherited from class org.castor.cpa.query.object.expression.AbstractExpression
abs, add, add, add, add, between, between, between, between, between, between, between, concat, concat, divide, divide, divide, divide, equal, equal, equal, equal, equal, equal, equal, equal, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, length, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, like, locate, locate, locate, locate, locate, locate, lower, multiply, multiply, multiply, multiply, negate, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notLike, notLike, notLike, notLike, notLike, notLike, plus, remainder, remainder, remainder, remainder, sqrt, substring, substring, substring, substring, subtract, subtract, subtract, subtract, trim, trim, trim, trim, trim, trim, upper
-
Methods inherited from class org.castor.cpa.query.object.AbstractQueryObject
toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.castor.cpa.query.Expression
abs, add, add, add, add, between, between, between, between, between, between, between, concat, concat, divide, divide, divide, divide, equal, equal, equal, equal, equal, equal, equal, equal, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, length, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, like, locate, locate, locate, locate, locate, locate, lower, multiply, multiply, multiply, multiply, negate, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notLike, notLike, notLike, notLike, notLike, notLike, plus, remainder, remainder, remainder, remainder, sqrt, substring, substring, substring, substring, subtract, subtract, subtract, subtract, trim, trim, trim, trim, trim, trim, upper
-
Methods inherited from interface org.castor.cpa.query.QueryObject
toString
-
-
-
-
Constructor Detail
-
AbstractTemporalLiteral
protected AbstractTemporalLiteral(java.util.Date value)
Construct an abstract temporal literal with given date.- Parameters:
value
- Date value for the temporal literal.
-
AbstractTemporalLiteral
protected AbstractTemporalLiteral(java.util.Calendar value)
Construct an abstract temporal literal with given calendar.- Parameters:
value
- Calendar value for the temporal literal.
-
-
Method Detail
-
createInstance
public static AbstractTemporalLiteral createInstance(TemporalType temporalType, java.util.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, java.util.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 java.util.Date getValue()
Get date value of the temporal literal.- Returns:
- Date value of the temporal literal.
-
-