oracle.jbo.server
Class CriteriaAdapterImpl
java.lang.Object
oracle.jbo.common.CommonCriteriaAdapter
oracle.jbo.server.CriteriaAdapterImpl
- All Implemented Interfaces:
- CriteriaAdapter, ViewCriteriaAdapter
- Direct Known Subclasses:
- BaseSQLBuilderImpl
public class CriteriaAdapterImpl
- extends CommonCriteriaAdapter
- implements ViewCriteriaAdapter
This class provides a concrete implementation of a CriteriaAdapter
interface to be used on the server side of the framework. Users looking to
override the criteria clause generation behavior should extend this class
and pass a reference of that class to ViewObjectImpl.setViewCriteriaAdapter(ViewCriteriaAdapter)
method and override the methods CommonCriteriaAdapter.getCriteriaClause(oracle.jbo.ViewCriteria)
or
CommonCriteriaAdapter.getCriteriaClause(oracle.jbo.AttributeDef[], oracle.jbo.ViewCriteria)
.
Method Summary |
protected java.lang.Object |
formatAttributeValue(ViewCriteria vc,
AttributeDef curDef,
java.lang.String valString)
|
protected java.util.HashMap |
getBindValsForSqlGen(ViewCriteria vc)
|
protected java.lang.String |
getFormattedLHSCompareFragment(ViewCriteria vc,
AttributeDef attrDef,
int sqlType,
java.lang.String lhs,
java.lang.Object rhs)
|
protected java.lang.String |
getFormattedRHSCompareFragment(ViewCriteria vc,
AttributeDef attrDef,
int sqlType,
java.lang.String rhs)
|
protected RowSet |
getRowSetForSqlGen(ViewCriteria vc)
|
protected java.lang.String |
getStringConcatOper(boolean bIncludeSpaces)
|
java.lang.String |
getViewCriteriaClause(ViewObject vo,
ViewCriteria criteria)
|
protected java.lang.String |
getWhereFragmentFromVO(ViewCriteria criteria,
ViewCriteriaItem critItem)
|
protected static boolean |
isCriteriaItemOuterJoined(AttributeDef attrDefViewCriteria)
|
protected boolean |
isLHSFragmentOptional(ViewCriteria vc,
AttributeDef attrDef,
java.lang.String lhs)
|
protected java.lang.String |
setupBindVarExtendedData(ViewCriteria criteria,
java.lang.String criteriaClause)
Subclasses should overwrite this method if it needs to set up extended
data for bind variables for JDBC positional binding style,
and to replace the name bind variables in the where clause if necessary. |
Methods inherited from class oracle.jbo.common.CommonCriteriaAdapter |
cleanUpTemporaryBindVariables, cleanUpTemporaryBindVars, convertCriteriaItemToWhereFragment, convertOpandRHSToWhereFragment, convertValueToWhereFragment, correctOprandLiteral, createTempBindVar, createTemporaryBindVar, getCriteriaClause, getCriteriaClause, getFormattedLHSCompareFragment, getOptionalItemClause, isCharType, isDateType, isNumericType, parseOperatorAndValueFromItemValue, shouldUseTempBindVariableForValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CriteriaAdapterImpl
public CriteriaAdapterImpl()
formatAttributeValue
protected java.lang.Object formatAttributeValue(ViewCriteria vc,
AttributeDef curDef,
java.lang.String valString)
- Specified by:
formatAttributeValue
in class CommonCriteriaAdapter
getWhereFragmentFromVO
protected java.lang.String getWhereFragmentFromVO(ViewCriteria criteria,
ViewCriteriaItem critItem)
- Overrides:
getWhereFragmentFromVO
in class CommonCriteriaAdapter
getRowSetForSqlGen
protected RowSet getRowSetForSqlGen(ViewCriteria vc)
- Overrides:
getRowSetForSqlGen
in class CommonCriteriaAdapter
getBindValsForSqlGen
protected java.util.HashMap getBindValsForSqlGen(ViewCriteria vc)
- Overrides:
getBindValsForSqlGen
in class CommonCriteriaAdapter
getViewCriteriaClause
public java.lang.String getViewCriteriaClause(ViewObject vo,
ViewCriteria criteria)
- Specified by:
getViewCriteriaClause
in interface ViewCriteriaAdapter
isLHSFragmentOptional
protected boolean isLHSFragmentOptional(ViewCriteria vc,
AttributeDef attrDef,
java.lang.String lhs)
- Overrides:
isLHSFragmentOptional
in class CommonCriteriaAdapter
isCriteriaItemOuterJoined
protected static boolean isCriteriaItemOuterJoined(AttributeDef attrDefViewCriteria)
setupBindVarExtendedData
protected java.lang.String setupBindVarExtendedData(ViewCriteria criteria,
java.lang.String criteriaClause)
- Description copied from class:
CommonCriteriaAdapter
- Subclasses should overwrite this method if it needs to set up extended
data for bind variables for JDBC positional binding style,
and to replace the name bind variables in the where clause if necessary.
- Overrides:
setupBindVarExtendedData
in class CommonCriteriaAdapter
- Parameters:
criteria
- The view criteria that we are building the where clause forcriteriaClause
- The where clause that has been generated
- Returns:
- The where clause to be used by the statement
getStringConcatOper
protected java.lang.String getStringConcatOper(boolean bIncludeSpaces)
- Overrides:
getStringConcatOper
in class CommonCriteriaAdapter
getFormattedLHSCompareFragment
protected java.lang.String getFormattedLHSCompareFragment(ViewCriteria vc,
AttributeDef attrDef,
int sqlType,
java.lang.String lhs,
java.lang.Object rhs)
- Overrides:
getFormattedLHSCompareFragment
in class CommonCriteriaAdapter
getFormattedRHSCompareFragment
protected java.lang.String getFormattedRHSCompareFragment(ViewCriteria vc,
AttributeDef attrDef,
int sqlType,
java.lang.String rhs)
- Overrides:
getFormattedRHSCompareFragment
in class CommonCriteriaAdapter
Copyright © 1997, 2010, Oracle. All rights reserved.