org.apache.cayenne.access.trans
Class TrimmingQualifierTranslator
java.lang.Object
org.apache.cayenne.access.trans.QueryAssemblerHelper
org.apache.cayenne.access.trans.QualifierTranslator
org.apache.cayenne.access.trans.TrimmingQualifierTranslator
- All Implemented Interfaces:
- TraversalHandler
- Direct Known Subclasses:
- DB2QualifierTranslator, DerbyQualifierTranslator, OracleQualifierTranslator, PostgresQualifierTranslator
public class TrimmingQualifierTranslator
- extends QualifierTranslator
QualifierTranslator that allows translation of qualifiers that perform comparison with
CHAR columns. Some databases require trimming the values for this to work.
Methods inherited from class org.apache.cayenne.access.trans.QualifierTranslator |
appendLiteral, appendObjectMatch, detectObjectMatch, doAppendPart, doAppendPart, endNode, extractQualifier, finishedChild, objectNode, parenthesisNeeded, processRelTermination, startNode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
trimFunction
protected String trimFunction
TrimmingQualifierTranslator
public TrimmingQualifierTranslator(QueryAssembler queryAssembler,
String trimFunction)
- Constructor for TrimmingQualifierTranslator.
processColumn
protected void processColumn(DbAttribute dbAttr)
throws IOException
- Adds special handling of CHAR columns.
- Overrides:
processColumn
in class QueryAssemblerHelper
- Throws:
IOException
processColumnWithQuoteSqlIdentifiers
protected void processColumnWithQuoteSqlIdentifiers(DbAttribute dbAttr,
Expression pathExp)
throws IOException
- Adds special handling of CHAR columns.
- Overrides:
processColumnWithQuoteSqlIdentifiers
in class QueryAssemblerHelper
- Throws:
IOException
getTrimFunction
public String getTrimFunction()
- Returns the trimFunction.
- Returns:
- String
setTrimFunction
public void setTrimFunction(String trimFunction)
- Sets the trimFunction.
- Parameters:
trimFunction
- The trimFunction to set
Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.