T
- type of owning objectpublic class TimestampDateFieldExpression<T extends DataObject> extends FieldExpression<java.util.Date,T> implements DateSQLExpression, FilterProvider<T,java.util.Date>
filter_type, LOG_FETCH, name, repository, target
Modifier | Constructor and Description |
---|---|
protected |
TimestampDateFieldExpression(java.lang.Class<T> target,
Repository rep,
java.lang.String field) |
Modifier and Type | Method and Description |
---|---|
int |
add(java.lang.StringBuilder sb,
boolean qualify)
Add the expression to a StringBuilder
|
int |
addField(java.lang.StringBuilder sb,
boolean qualify)
add SQLFragment corresponding to the raw database field.
|
SQLFilter<T> |
getFilter(MatchCondition match,
java.util.Date val)
Create a
SQLFilter comparing against the target value |
SQLExpression<? extends java.lang.Number> |
getMillis()
get an
SQLExpression for the millisecond value of the date |
SQLFilter<T> |
getNullFilter(boolean is_null)
create a
SQLFilter checking if the target value is or is not null. |
SQLFilter<T> |
getOrderFilter(boolean descending)
create a
SQLFilter that orders results by the target value. |
SQLExpression<? extends java.lang.Number> |
getSeconds()
get an
SQLExpression for the second value of the date |
java.util.Date |
getValue(Repository.Record r) |
boolean |
preferSeconds()
Would this expression preferentially use seconds
|
void |
setValue(Repository.Record r,
java.util.Date value) |
canSet, equals, getFieldName, getFilterType, getParameters, getRequiredFilter, getTarget, getValue, hashCode, makeObject, setObject, setValue, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equals, groupingIsomorphic, hashCode
addGroup, checkContentsCanGroup, getGroupParameters
getParameters, getRequiredFilter, makeObject
getFilterType
protected TimestampDateFieldExpression(java.lang.Class<T> target, Repository rep, java.lang.String field)
public java.util.Date getValue(Repository.Record r)
getValue
in class FieldExpression<java.util.Date,T extends DataObject>
public void setValue(Repository.Record r, java.util.Date value)
setValue
in class FieldExpression<java.util.Date,T extends DataObject>
public int add(java.lang.StringBuilder sb, boolean qualify)
SQLValue
add
in interface SQLValue<java.util.Date>
add
in class FieldExpression<java.util.Date,T extends DataObject>
sb
- StringBuilder to modifyqualify
- boolean should fields be qualified with the table namepublic 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 SQLFilter<T> getFilter(MatchCondition match, java.util.Date val)
FilterProvider
SQLFilter
comparing against the target valuegetFilter
in interface FilterProvider<T extends DataObject,java.util.Date>
SQLFilter
public SQLFilter<T> getNullFilter(boolean is_null) throws CannotFilterException
FilterProvider
SQLFilter
checking if the target value is or is not null.getNullFilter
in interface FilterProvider<T extends DataObject,java.util.Date>
SQLFilter
CannotFilterException
public SQLFilter<T> getOrderFilter(boolean descending) throws CannotFilterException
FilterProvider
SQLFilter
that orders results by the target value. This may involve joins so
may not be just an OrderFilter
though it will contain one.getOrderFilter
in interface FilterProvider<T extends DataObject,java.util.Date>
SQLFilter
CannotFilterException
public boolean preferSeconds()
DateSQLExpression
preferSeconds
in interface DateSQLExpression
public int addField(java.lang.StringBuilder sb, boolean qualify)
FieldValue
SQLValue.add(StringBuilder, boolean)
addField
in interface FieldValue<java.util.Date,T extends DataObject>