T - type of reference/repositoryR - type of filterpublic abstract class AbstractSelfSQLValue<T extends DataObject,R> extends java.lang.Object implements SQLAccessor<IndexedReference,R>, FilterProvider<R,IndexedReference>, IndexedSQLValue<R,T>, GroupingSQLValue<IndexedReference>
SelfSQLValue,
TupleSelfSQLValue![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Constructor and Description |
|---|
AbstractSelfSQLValue(DataObjectFactory<T> fac) |
| Modifier and Type | Method and Description |
|---|---|
int |
add(java.lang.StringBuilder sb,
boolean qualify)
Add the expression to a StringBuilder
|
boolean |
canSet()
does this
Accessor support setting values. |
DataObjectFactory<T> |
getFactory()
get the remote
DataObjectFactory |
SQLFilter<R> |
getFilter(MatchCondition match,
IndexedReference val)
Create a
SQLFilter comparing against the target value |
SQLExpression<java.lang.Integer> |
getIDExpression()
Get a Integer valued
SQLExpression for the id of the referenced value. |
SQLFilter<R> |
getNullFilter(boolean is_null)
create a
SQLFilter checking if the target value is or is not null. |
SQLFilter<R> |
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.
|
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
|
IndexedReference<T> |
makeObject(java.sql.ResultSet rs,
int pos)
Extract a result of the expression from a ResultSet into an object of the specified type.
|
IndexedReference<T> |
makeReference(int id) |
void |
setValue(R r,
IndexedReference value)
Set value if supported otherwise throw a
UnsupportedOperationException. |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddGroup, checkContentsCanGroup, getGroupParametersgetSQLFiltergetFilterTypepublic AbstractSelfSQLValue(DataObjectFactory<T> fac)
public 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<R,T extends DataObject>SQLExpressionpublic final 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 final java.util.List<PatternArgument> getParameters(java.util.List<PatternArgument> list)
SQLValuegetParameters in interface SQLValue<IndexedReference>list - to modifypublic final IndexedReference<T> makeObject(java.sql.ResultSet rs, int pos) throws DataException, java.sql.SQLException
SQLValuemakeObject in interface SQLValue<IndexedReference>rs - ResultSetDataExceptionjava.sql.SQLExceptionpublic final IndexedReference<T> makeReference(int id)
public final java.lang.Class<IndexedReference> getTarget()
TargettedgetTarget in interface Targetted<IndexedReference>public java.lang.String toString()
toString in class java.lang.Objectpublic final SQLFilter getRequiredFilter()
SQLValuegetRequiredFilter in interface SQLValue<IndexedReference>public final boolean canSet()
AccessorAccessor support setting values.canSet in interface Accessor<IndexedReference,R>public final void setValue(R r, IndexedReference value)
AccessorUnsupportedOperationException.setValue in interface Accessor<IndexedReference,R>public final SQLFilter<R> getFilter(MatchCondition match, IndexedReference val) throws CannotFilterException
FilterProviderSQLFilter comparing against the target valuegetFilter in interface FilterProvider<R,IndexedReference>SQLFilterCannotFilterExceptionpublic final SQLFilter<R> getNullFilter(boolean is_null) throws CannotFilterException
FilterProviderSQLFilter checking if the target value is or is not null.getNullFilter in interface FilterProvider<R,IndexedReference>SQLFilterCannotFilterExceptionpublic final SQLFilter<R> 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<R,IndexedReference>SQLFilterCannotFilterExceptionpublic final DataObjectFactory<T> getFactory()
IndexedSQLValueDataObjectFactorygetFactory in interface IndexedSQLValue<R,T extends DataObject>DataObjectFactorypublic final boolean groupingIsomorphic()
GroupingSQLValuegroupingIsomorphic in interface GroupingSQLValue<IndexedReference>