T - Type of owning/home table.I - Type of remote tablepublic class ConstIndexedSQLValue<T extends DataObject,I extends DataObject> extends java.lang.Object implements IndexedSQLValue<T,I>, GroupingSQLValue<IndexedReference>
IndexedSQLValue that resolves to a constant value.
It adds the id of the reference to the SQL statement. This is therefore illegal in a GROUP BY clause
so the class implements GroupingSQLValue.SQLGroupMapper![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Constructor and Description |
|---|
ConstIndexedSQLValue(AppContext conn,
java.lang.Class<T> clazz,
IndexedReference<I> val) |
| Modifier and Type | Method and Description |
|---|---|
int |
add(java.lang.StringBuilder sb,
boolean qualify)
Add the expression to a StringBuilder
|
int |
addGroup(java.lang.StringBuilder sb,
boolean qualify)
Add the group-by clause to a query.
|
boolean |
equals(java.lang.Object obj) |
DataObjectFactory<I> |
getFactory()
get the remote
DataObjectFactory |
SQLFilter<T> |
getFilter(MatchCondition match,
IndexedReference val)
Create a
SQLFilter comparing against the target value |
java.lang.Class<T> |
getFilterType()
get the type bounds on the produced
SQLFilter. |
java.util.List<PatternArgument> |
getGroupParameters(java.util.List<PatternArgument> list)
Get the parameters for a group-by clause.
|
SQLExpression<java.lang.Integer> |
getIDExpression()
Get a Integer valued
SQLExpression for the id of the referenced value. |
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. |
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.
|
SQLFilter<T> |
getSQLFilter(SQLFilter<I> fil)
Create a filter for the home table out of a a filter on the target object.
|
java.lang.Class<IndexedReference> |
getTarget()
Get the type of the returned object as far as it is known.
|
boolean |
groupingIsomorphic()
Is there always a one-to-one mapping between groups and values
|
int |
hashCode() |
IndexedReference<I> |
makeObject(java.sql.ResultSet rs,
int pos)
Extract a result of the expression from a ResultSet into an object of the specified type.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcheckContentsCanGrouppublic ConstIndexedSQLValue(AppContext conn, java.lang.Class<T> clazz, IndexedReference<I> val)
public int add(java.lang.StringBuilder sb,
boolean qualify)
SQLValueadd in interface SQLValue<IndexedReference>sb - StringBuilder to modifyqualify - boolean should fields be qualified with the table namepublic java.util.List<PatternArgument> getParameters(java.util.List<PatternArgument> list)
SQLValuegetParameters in interface SQLValue<IndexedReference>list - to modifypublic IndexedReference<I> makeObject(java.sql.ResultSet rs, int pos) throws DataException
SQLValuemakeObject in interface SQLValue<IndexedReference>rs - ResultSetDataExceptionpublic SQLFilter getRequiredFilter()
SQLValuegetRequiredFilter in interface SQLValue<IndexedReference>public java.lang.Class<IndexedReference> getTarget()
TargettedgetTarget in interface Targetted<IndexedReference>public SQLFilter<T> getFilter(MatchCondition match, IndexedReference val) throws CannotFilterException, NoSQLFilterException
FilterProviderSQLFilter comparing against the target valuegetFilter in interface FilterProvider<T extends DataObject,IndexedReference>SQLFilterCannotFilterExceptionNoSQLFilterExceptionpublic SQLFilter<T> getNullFilter(boolean is_null) throws CannotFilterException, NoSQLFilterException
FilterProviderSQLFilter checking if the target value is or is not null.getNullFilter in interface FilterProvider<T extends DataObject,IndexedReference>SQLFilterCannotFilterExceptionNoSQLFilterExceptionpublic SQLFilter<T> getOrderFilter(boolean descending) throws CannotFilterException, NoSQLFilterException
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,IndexedReference>SQLFilterCannotFilterExceptionNoSQLFilterExceptionpublic java.lang.Class<T> getFilterType()
FilterProviderSQLFilter.getFilterType in interface FilterProvider<T extends DataObject,IndexedReference>public SQLFilter<T> getSQLFilter(SQLFilter<I> fil) throws CannotFilterException
IndexedSQLValuegetSQLFilter in interface IndexedSQLValue<T extends DataObject,I extends DataObject>SQLFilterCannotFilterExceptionpublic DataObjectFactory<I> getFactory() throws java.lang.Exception
IndexedSQLValueDataObjectFactorygetFactory in interface IndexedSQLValue<T extends DataObject,I extends DataObject>DataObjectFactoryjava.lang.Exceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int addGroup(java.lang.StringBuilder sb,
boolean qualify)
GroupingSQLValueaddGroup in interface GroupingSQLValue<IndexedReference>public java.util.List<PatternArgument> getGroupParameters(java.util.List<PatternArgument> list)
GroupingSQLValuegetGroupParameters in interface GroupingSQLValue<IndexedReference>public final boolean groupingIsomorphic()
GroupingSQLValuegroupingIsomorphic in interface GroupingSQLValue<IndexedReference>public java.lang.String toString()
toString in class java.lang.Objectpublic SQLExpression<java.lang.Integer> getIDExpression()
IndexedSQLValueSQLExpression for the id of the referenced value.
This is used to provide match filters for two references.getIDExpression in interface IndexedSQLValue<T extends DataObject,I extends DataObject>SQLExpression