Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine.query
Class JRSqlAbstractInClause

    java.lang.Object
      net.sf.jasperreports.engine.query.JRSqlAbstractInClause

All Implemented Interfaces:
  JRClauseFunction

Direct Known Subclasses:
  JRSqlInClause, JRSqlNotInClause

    public abstract class JRSqlAbstractInClause

extends java.lang.Object
implements JRClauseFunction

Base (NOT) IN clause function for SQL queries.

Version:
  $Id: JRSqlAbstractInClause.java 3222 2009-11-30 10:34:21Z lucianc $
Author:
  Lucian Chirita (lucianc@users.sourceforge.net)

Field Summary
`protected static java.lang.String` | `CLAUSE_TRUISM`
`protected static int` | `POSITION_DB_COLUMN`
`protected static int` | `POSITION_PARAMETER`

Constructor Summary
`protected` | `JRSqlAbstractInClause()`

Method Summary
`protected abstract void` | `appendInOperator(java.lang.StringBuffer sBuffer)`
`void` | `apply(JRClauseTokens clauseTokens, JRQueryClauseContext queryContext)` Creates a (NOT) IN SQL clause.
`protected void` | `handleNoValues(JRQueryClauseContext queryContext)`
`protected int` | `valuesCount(java.lang.String paramName, java.lang.Object paramValue)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### POSITION_DB_COLUMN

    protected static final int POSITION_DB_COLUMN

See Also:
  Constant Field Values

### POSITION_PARAMETER

    protected static final int POSITION_PARAMETER

See Also:
  Constant Field Values

### CLAUSE_TRUISM

    protected static final java.lang.String CLAUSE_TRUISM

See Also:
  Constant Field Values

Constructor Detail

### JRSqlAbstractInClause

    protected JRSqlAbstractInClause()

Method Detail

### apply

    public void apply(JRClauseTokens clauseTokens,
                      JRQueryClauseContext queryContext)

  Creates a (NOT) IN SQL clause.

  The function expects two clause tokens (after the ID token):

  - The first token is the SQL column to be used in the clause.
  - The second token is the name of the report parameter that contains the value list.
    The value of this parameter has to be an array, a `java.util.Collection` or `null`.

  The function constructs a `column [NOT] IN (?, ?, .., ?)` clause. If the values list is null or empty, the function generates a SQL clause that will always evaluate to true (e.g. `0 = 0`).

  Specified by:
    `apply` in interface `JRClauseFunction`
  Parameters:
    `clauseTokens` - the clause tokens
    `queryContext` - the query context

### handleNoValues

    protected void handleNoValues(JRQueryClauseContext queryContext)

### valuesCount

    protected int valuesCount(java.lang.String paramName,
                              java.lang.Object paramValue)

### appendInOperator

    protected abstract void appendInOperator(java.lang.StringBuffer sBuffer)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com