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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitequals, groupingIsomorphic, hashCodeaddGroup, checkContentsCanGroup, getGroupParametersgetParameters, getRequiredFilter, makeObjectgetFilterTypeprotected 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)
SQLValueadd 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()
DateSQLExpressionSQLExpression for the millisecond value of the dategetMillis in interface DateSQLExpressionSQLExpression giving milliseconds since epochpublic SQLExpression<? extends java.lang.Number> getSeconds()
DateSQLExpressionSQLExpression for the second value of the dategetSeconds in interface DateSQLExpressionSQLExpression giving seconds since epochpublic SQLFilter<T> getFilter(MatchCondition match, java.util.Date val)
FilterProviderSQLFilter comparing against the target valuegetFilter in interface FilterProvider<T extends DataObject,java.util.Date>SQLFilterpublic SQLFilter<T> getNullFilter(boolean is_null) throws CannotFilterException
FilterProviderSQLFilter checking if the target value is or is not null.getNullFilter in interface FilterProvider<T extends DataObject,java.util.Date>SQLFilterCannotFilterExceptionpublic SQLFilter<T> getOrderFilter(boolean descending) throws CannotFilterException
FilterProviderSQLFilter 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>SQLFilterCannotFilterExceptionpublic boolean preferSeconds()
DateSQLExpressionpreferSeconds in interface DateSQLExpressionpublic int addField(java.lang.StringBuilder sb,
boolean qualify)
FieldValueSQLValue.add(StringBuilder, boolean)addField in interface FieldValue<java.util.Date,T extends DataObject>