|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.query.ConstantExpression
wt.query.DateExpression
This class represents a date constant in a SQL statement. This subclass
of ConstantExpression is necessary to provide the special handling for
date values. The java date values are converted to a string representation
and used within a TO_DATE() SQL function when used in SQL statements.
Supported API: true
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
static String |
DATE_JAVA_FORMAT
|
static String |
DATE_JAVA_PARSE
|
private static DMLGenerator |
dmlGenerator
|
static long |
EXTERNALIZATION_VERSION_UID
|
private String |
javaFormat
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
static String |
TIME_JAVA_FORMAT
|
static String |
TIME_JAVA_PARSE
|
static String |
TIMESTAMP_JAVA_FORMAT
|
static String |
TIMESTAMP_JAVA_PARSE
|
private boolean |
timezoneDependent
|
static String |
UTIL_DATE_JAVA_PARSE
|
Fields inherited from class wt.query.ConstantExpression |
DEBUG |
Fields inherited from interface wt.query.ColumnExpression |
ADVANCED_QUERY, ADVANCED_QUERY_ENABLED, COLUMN_ALIAS, JAVA_TYPE |
Fields inherited from interface wt.query.Expression |
FROM_COUNT |
Fields inherited from interface wt.query.RelationalExpression |
BIND_PARAMETER |
Constructor Summary | |
DateExpression()
Supported API: false |
|
DateExpression(Date a_value)
Supported API: false |
|
DateExpression(Date a_value,
String a_javaFormat,
boolean a_useTimezone)
Supported API: false |
Method Summary | |
private String |
format(boolean a_includeQuote)
|
Object |
getBindParameter()
Gets the value of the attribute: bindParameter; Returns a bind parameter for this expression (if supported). |
private DMLGenerator |
getDMLGenerator()
|
String |
getExpression(boolean a_useBind,
Vector a_tableInfos,
Vector a_aliases,
boolean a_outerJoin)
Return string representation of this expression. |
private static ColumnExpression |
newExpression(Date a_value)
|
private static ColumnExpression |
newExpression(Date a_value,
String a_javaType)
|
static ColumnExpression |
newExpression(Object a_value,
String a_javaType)
Create a new Expression. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(DateExpression thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class wt.query.ConstantExpression |
getClassAttributes, getColumnAlias, getFromCount, getJavaType, getValue, isAdvancedQuery, isAdvancedQueryEnabled, isEscapeNeeded, isEscapeNeeded, isStringBased, isStringBased, isUseEscape, newExpression, readVersion, setAdvancedQueryEnabled, setColumnAlias, setFromAlias, setUseEscape, toString, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private String javaFormat
private boolean timezoneDependent
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
public static final String DATE_JAVA_FORMAT
public static final String TIME_JAVA_FORMAT
public static final String TIMESTAMP_JAVA_FORMAT
public static final String DATE_JAVA_PARSE
public static final String TIME_JAVA_PARSE
public static final String TIMESTAMP_JAVA_PARSE
public static final String UTIL_DATE_JAVA_PARSE
private static DMLGenerator dmlGenerator
Constructor Detail |
public DateExpression()
public DateExpression(Date a_value, String a_javaFormat, boolean a_useTimezone)
a_value
- Specifies the date value.a_javaFormat
- Specifies the date format used to construct the DateExpression.a_useTimezone
- Indicates if timezone (as specified in wt.properties) should be used construct the DateExpression.DateFormat
public DateExpression(Date a_value)
a_value
- Specifies the date constant value.Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class ConstantExpression
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class ConstantExpression
input
-
IOException
ClassNotFoundException
protected boolean readVersion(DateExpression thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public Object getBindParameter() throws WTException
getBindParameter
in interface RelationalExpression
getBindParameter
in class ConstantExpression
WTException
public String getExpression(boolean a_useBind, Vector a_tableInfos, Vector a_aliases, boolean a_outerJoin) throws QueryException
getExpression
in interface RelationalExpression
getExpression
in class ConstantExpression
a_useBind
- a_tableInfos
- a_aliases
- a_outerJoin
- Indicates that outer join syntax should be used for this expression.
QueryException
public static ColumnExpression newExpression(Object a_value, String a_javaType)
a_value
- Specifies the data constant value.a_javaType
- Specifies the Java type of the value.
private static ColumnExpression newExpression(Date a_value) throws WTException
WTException
private static ColumnExpression newExpression(Date a_value, String a_javaType) throws WTException
WTException
private final String format(boolean a_includeQuote)
private DMLGenerator getDMLGenerator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |