Package org.apache.torque.sql.whereclausebuilder

# Klasse LikeBuilder

java.lang.Object
org.apache.torque.sql.whereclausebuilder.AbstractWhereClausePsPartBuilder
org.apache.torque.sql.whereclausebuilder.LikeBuilder

Alle implementierten Schnittstellen:
  `WhereClausePsPartBuilder`

public class LikeBuilder extends AbstractWhereClausePsPartBuilder
Builds a PreparedStatementPart from a WhereClauseExpression containing a Like operator.

Version:
  $Id: LikeBuilder.java 1896195 2021-12-20 17:41:20Z gk $

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `LikeBuilder()`

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `PreparedStatementPart`
  `buildPs(WhereClauseExpression whereClausePart, boolean ignoreCase, Query query, Adapter adapter)`
  Builds the PS part for a WhereClauseExpression with a LIKE operator.
  `boolean`
  `isApplicable(WhereClauseExpression whereClauseExpression, Adapter adapter)`
  Returns whether this WhereClausePsPartBuilder is applicable for a given WhereClauseExpression.

  ### Von Klasse geerbte Methoden org.apache.torque.sql.whereclausebuilder.AbstractWhereClausePsPartBuilder

  `getObjectOrColumnPsPartBuilder, setObjectOrColumnPsPartBuilder`

  ### Von Klasse geerbte Methoden java.lang.Object

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

- ## Konstruktordetails

  - ### LikeBuilder

    public LikeBuilder()

- ## Methodendetails

  - ### buildPs

    public PreparedStatementPart buildPs(WhereClauseExpression whereClausePart, boolean ignoreCase, Query query, Adapter adapter) throws TorqueException
    Builds the PS part for a WhereClauseExpression with a LIKE operator. Multicharacter wildcards % and * may be used as well as single character wildcards, _ and ?. These characters can be escaped with \. e.g. criteria = "fre%" -> columnName LIKE 'fre%' -> UPPER(columnName) LIKE UPPER('fre%') criteria = "50\%" -> columnName = '50%'
    Parameter:
      `whereClausePart` - the part of the where clause to build. Can be modified in this method.
      `ignoreCase` - If true and columns represent Strings, the appropriate function defined for the database will be used to ignore differences in case.
      `query` - the query which is currently built
      `adapter` - The adapter for the database for which the SQL should be created, not null.
    Gibt zurück:
      the rendered SQL for the WhereClauseExpression
    Löst aus:
      `TorqueException` - when rendering fails.

  - ### isApplicable

    public boolean isApplicable(WhereClauseExpression whereClauseExpression, Adapter adapter)
    Returns whether this WhereClausePsPartBuilder is applicable for a given WhereClauseExpression.
    Parameter:
      `whereClauseExpression` - the WhereClauseExpression in question.
      `adapter` - The adapter for the database for which the SQL should be created, not null.
    Gibt zurück:
      true if applicable, false otherwise.