Package org.apache.cayenne.access.translator.select

## Class TrimmingQualifierTranslator

- java.lang.Object
- - org.apache.cayenne.access.translator.select.QueryAssemblerHelper
  - - org.apache.cayenne.access.translator.select.QualifierTranslator
    - - org.apache.cayenne.access.translator.select.TrimmingQualifierTranslator

- All Implemented Interfaces:
    `TraversalHandler`
  Direct Known Subclasses:
    `DB2QualifierTranslator`, `DerbyQualifierTranslator`, `HSQLQualifierTranslator`, `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.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected String` | `trimFunction` |

    - ### Fields inherited from class org.apache.cayenne.access.translator.select.QualifierTranslator

      `caseInsensitive, matchingObject, objectMatchTranslator, qualifier, useAliasForExpressions, waitingForEndNode`

    - ### Fields inherited from class org.apache.cayenne.access.translator.select.QueryAssemblerHelper

      `out, queryAssembler, strategy`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TrimmingQualifierTranslator​(QueryAssembler queryAssembler, String trimFunction)` | Constructor for TrimmingQualifierTranslator.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getTrimFunction()` | Returns the trimFunction.
    `protected void` | `processColumn​(DbAttribute dbAttr)` | Adds special handling of CHAR columns.
    `protected void` | `processColumnWithQuoteSqlIdentifiers​(DbAttribute dbAttr, Expression pathExp)` | Adds special handling of CHAR columns.
    `void` | `setTrimFunction​(String trimFunction)` | Sets the trimFunction.

    - ### Methods inherited from class org.apache.cayenne.access.translator.select.QualifierTranslator

      `appendExtractFunction, appendFunction, appendFunctionArg, appendFunctionArgDivider, appendLiteral, appendObjectMatch, clearLastFunctionArgDivider, detectObjectMatch, doAppendPart, doAppendPart, endNode, extractQualifier, finishedChild, objectNode, operandForBitwiseAnd, operandForBitwiseLeftShift, operandForBitwiseNot, operandForBitwiseOr, operandForBitwiseRightShift, operandForBitwiseXor, parenthesisNeeded, processRelTermination, setCaseInsensitive, setQualifier, setUseAliasForExpressions, startNode`

    - ### Methods inherited from class org.apache.cayenne.access.translator.select.QueryAssemblerHelper

      `appendDbPath, appendLikeEscapeCharacter, appendLiteralDirect, appendObjPath, appendPart, getDbEntity, getObjEntity, paramsDbType, processRelTermination, setForceJoinForRelations`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### trimFunction

          protected String trimFunction

  - ### Constructor Detail

    - #### TrimmingQualifierTranslator

          public TrimmingQualifierTranslator​(QueryAssembler queryAssembler,
                                             String trimFunction)

      Constructor for TrimmingQualifierTranslator.

  - ### Method Detail

    - #### processColumn

          protected void processColumn​(DbAttribute dbAttr)

      Adds special handling of CHAR columns.
      Overrides:
        `processColumn` in class `QueryAssemblerHelper`

    - #### processColumnWithQuoteSqlIdentifiers

          protected void processColumnWithQuoteSqlIdentifiers​(DbAttribute dbAttr,
                                                              Expression pathExp)

      Adds special handling of CHAR columns.
      Overrides:
        `processColumnWithQuoteSqlIdentifiers` in class `QueryAssemblerHelper`

    - #### getTrimFunction

          public String getTrimFunction()

      Returns the trimFunction.
      Returns:
        String

    - #### setTrimFunction

          public void setTrimFunction​(String trimFunction)

      Sets the trimFunction.
      Parameters:
        `trimFunction` - The trimFunction to set