com.triactive.jdo.store.sql.expr
Class SetLiteral

java.lang.Object
  extended bycom.triactive.jdo.store.sql.expr.AbstractSqlExpression
      extended bycom.triactive.jdo.store.sql.expr.SetExpression
          extended bycom.triactive.jdo.store.sql.expr.SetLiteral
All Implemented Interfaces:
SqlExpression, StatementTextGenerator

public class SetLiteral
extends SetExpression

A SetLiteral is a SQL expression that will test if a column of table falls within the given Set of values. This is used for Querys where a transient Set is passed in as a parameter.

Author:
Kelly Grizzle

Nested Class Summary
 
Nested classes inherited from class com.triactive.jdo.store.sql.expr.AbstractSqlExpression
AbstractSqlExpression.Body, AbstractSqlExpression.CompoundExpression, AbstractSqlExpression.SimpleColumnReference, AbstractSqlExpression.SubqueryExpression
 
Field Summary
 
Fields inherited from class com.triactive.jdo.store.sql.expr.AbstractSqlExpression
body, qs
 
Constructor Summary
SetLiteral(QueryStatement qs, java.util.Set value)
           
 
Method Summary
 SqlExpression containsMethod(SqlExpression expr)
          Return the BooleanExpression that results from SetLiteral.contains(SqlExpression).
 SqlExpression isEmptyMethod()
           
 SqlExpression sizeMethod()
           
 StatementText toStatementText()
          Returns the SQL statement text which this object generates.
 
Methods inherited from class com.triactive.jdo.store.sql.expr.AbstractSqlExpression
accessField, add, and, callMethod, cast, com, div, eor, eq, getColumnMapping, getJavaType, getMapping, getQueryStatement, getReferencedColumns, gt, gteq, innermostQuery, innermostQuery, ior, lt, lteq, mod, mul, neg, newBody, newBody, newBody, newBody, newBody, newBody, newResultExpression, newSubqueryBody, not, noteq, select, setMapping, sub, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetLiteral

public SetLiteral(QueryStatement qs,
                  java.util.Set value)
Method Detail

containsMethod

public SqlExpression containsMethod(SqlExpression expr)
Return the BooleanExpression that results from SetLiteral.contains(SqlExpression).

Overrides:
containsMethod in class SetExpression
Parameters:
expr - The SqlExpression that is checked for membership in the Set.
Returns:
The BooleanExpression that results from SetLiteral.contains(SqlExpression).

isEmptyMethod

public SqlExpression isEmptyMethod()
Specified by:
isEmptyMethod in class SetExpression

sizeMethod

public SqlExpression sizeMethod()
Specified by:
sizeMethod in class SetExpression

toStatementText

public StatementText toStatementText()
Description copied from interface: StatementTextGenerator
Returns the SQL statement text which this object generates.

Specified by:
toStatementText in interface StatementTextGenerator
Overrides:
toStatementText in class AbstractSqlExpression


Copyright 2001-2007 The TJDO Project All Rights Reserved.