Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javatools.db
Class DbCriterion  view DbCriterion download DbCriterion.java

java.lang.Object
  extended byjavatools.db.DbExpr
      extended byjavatools.db.DbCriterion
All Implemented Interfaces:
DbTableUser
Direct Known Subclasses:
DbAndExpr, DbFalseExpr, DbOrExpr, DbTrueExpr

public class DbCriterion
extends DbExpr

It is a class that represents an expression of the type "A op B", where "op" is a generic operator.

Version:
0.7

Field Summary
(package private)  java.lang.Object c1
          The first term.
(package private)  java.lang.Object c2
          The second term.
(package private)  java.lang.String op
          The operator.
 
Fields inherited from class javatools.db.DbExpr
db
 
Constructor Summary
DbCriterion(DbDatabase db, java.lang.Object c1, java.lang.String op, java.lang.Object c2)
          Builds a new DbCriterion object.
 
Method Summary
 java.lang.String getQueryString()
          Returns the query string related to this expression.
 int setSqlValues(java.sql.PreparedStatement ps, int i)
          Sets the real values in the passed statement.
 void usesTables(java.util.Set c)
          Adds to the passed set, the tables used by this expression.
 
Methods inherited from class javatools.db.DbExpr
and, containsAllStrings, containsAllStrings, count, dateTrunc, equal, getString, greaterThan, greaterThanOrEqual, in, in, isNotNull, isNull, lessThan, lessThanOrEqual, like, lower, max, min, notEqual, notIn, notIn, or, setSqlValue, upper, usesTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c1

java.lang.Object c1
The first term.


op

java.lang.String op
The operator.


c2

java.lang.Object c2
The second term.

Constructor Detail

DbCriterion

public DbCriterion(DbDatabase db,
                   java.lang.Object c1,
                   java.lang.String op,
                   java.lang.Object c2)
Builds a new DbCriterion object.

Method Detail

getQueryString

public java.lang.String getQueryString()
                                throws DbException
Returns the query string related to this expression.

Specified by:
getQueryString in class DbExpr

setSqlValues

public int setSqlValues(java.sql.PreparedStatement ps,
                        int i)
                 throws DbException,
                        java.sql.SQLException
Sets the real values in the passed statement. Anyway it is an obscure method, call Chris Bitmead.

Specified by:
setSqlValues in class DbExpr

usesTables

public void usesTables(java.util.Set c)
Adds to the passed set, the tables used by this expression.

Specified by:
usesTables in interface DbTableUser
Overrides:
usesTables in class DbExpr