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
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
ConstructorsModifierConstructorDescriptionprotected
AbstractTemporalLiteral
(Calendar value) Construct an abstract temporal literal with given calendar.protected
AbstractTemporalLiteral
(Date value) Construct an abstract temporal literal with given date. -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractTemporalLiteral
createInstance
(TemporalType temporalType, Calendar value) Factory method to create a temporal literal for the calendar given that matches the temporal type given.static AbstractTemporalLiteral
createInstance
(TemporalType temporalType, Date value) Factory method to create a temporal literal for the date given that matches the temporal type given.final 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 Details
-
AbstractTemporalLiteral
Construct an abstract temporal literal with given date.- Parameters:
value
- Date value for the temporal literal.
-
AbstractTemporalLiteral
Construct an abstract temporal literal with given calendar.- Parameters:
value
- Calendar value for the temporal literal.
-
-
Method Details
-
createInstance
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
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
Get date value of the temporal literal.- Returns:
- Date value of the temporal literal.
-