public class MysqlDateConverter extends java.lang.Object implements DateSQLExpression, WrappedSQLExpression<java.util.Date>
SQLExpression
to a DateSQLExpression
Constructor and Description |
---|
MysqlDateConverter(long res,
SQLExpression<? extends java.lang.Number> val) |
Modifier and Type | Method and Description |
---|---|
int |
add(java.lang.StringBuilder sb,
boolean qualify)
Add the expression to a StringBuilder
|
boolean |
equals(java.lang.Object obj) |
SQLExpression<? extends java.lang.Number> |
getMillis()
get an
SQLExpression for the millisecond value of the date |
java.util.List<PatternArgument> |
getParameters(java.util.List<PatternArgument> list)
Add parameters for this value to a list.
|
SQLFilter |
getRequiredFilter()
Get an SQLFilter required to be added to the filter set.
|
SQLExpression<? extends java.lang.Number> |
getSeconds()
get an
SQLExpression for the second value of the date |
SQLValue<java.util.Date> |
getSQLValue()
get an equivalent (but preferable)
SQLValue |
java.lang.Class<java.util.Date> |
getTarget()
Get the type of the returned object as far as it is known.
|
int |
hashCode() |
java.util.Date |
makeObject(java.sql.ResultSet rs,
int pos)
Extract a result of the expression from a ResultSet into an object of the specified type.
|
boolean |
preferSeconds()
Would this expression preferentially use seconds
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
groupingIsomorphic
addGroup, checkContentsCanGroup, getGroupParameters
public MysqlDateConverter(long res, SQLExpression<? extends java.lang.Number> val)
public int add(java.lang.StringBuilder sb, boolean qualify)
SQLValue
public SQLExpression<? extends java.lang.Number> getMillis()
DateSQLExpression
SQLExpression
for the millisecond value of the dategetMillis
in interface DateSQLExpression
SQLExpression
giving milliseconds since epochpublic SQLExpression<? extends java.lang.Number> getSeconds()
DateSQLExpression
SQLExpression
for the second value of the dategetSeconds
in interface DateSQLExpression
SQLExpression
giving seconds since epochpublic java.util.List<PatternArgument> getParameters(java.util.List<PatternArgument> list)
SQLValue
getParameters
in interface SQLValue<java.util.Date>
list
- to modifypublic java.util.Date makeObject(java.sql.ResultSet rs, int pos) throws DataException, java.sql.SQLException
SQLValue
makeObject
in interface SQLValue<java.util.Date>
rs
- ResultSetDataException
java.sql.SQLException
public SQLFilter getRequiredFilter()
SQLValue
getRequiredFilter
in interface SQLValue<java.util.Date>
public java.lang.Class<java.util.Date> getTarget()
Targetted
public int hashCode()
hashCode
in interface SQLExpression<java.util.Date>
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface SQLExpression<java.util.Date>
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean preferSeconds()
DateSQLExpression
preferSeconds
in interface DateSQLExpression
public SQLValue<java.util.Date> getSQLValue()
WrappedSQLExpression
SQLValue
getSQLValue
in interface WrappedSQLExpression<java.util.Date>