javatools.db
Class DbLiteral

java.lang.Object
  |
  +--javatools.db.DbExpr
        |
        +--javatools.db.DbLiteral
All Implemented Interfaces:
DbTableUser

public class DbLiteral
extends DbExpr

Inserts a piece of literal text within the SQL expression. This can be useful for non-portable hacks into the SQL code.


Constructor Summary
DbLiteral(DbDatabase db, java.lang.String s)
          Constructor for the DbLiteral object
 
Method Summary
 java.lang.String getQueryString()
          Gets the queryString attribute of the DbLiteral object
 int setSqlValues(java.sql.PreparedStatement ps, int i)
          Sets the sqlValues attribute of the DbLiteral object
 
Methods inherited from class javatools.db.DbExpr
and, containsAllStrings, containsAllStrings, count, dateTrunc, equal, greaterThan, greaterThanOrEqual, in, in, isNotNull, isNull, lessThan, lessThanOrEqual, like, lower, max, min, notEqual, notIn, notIn, or, upper, usesTables, usesTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbLiteral

public DbLiteral(DbDatabase db,
                 java.lang.String s)
Constructor for the DbLiteral object

Parameters:
db - The database that will be used.
s - The string representing the expression.
Method Detail

setSqlValues

public int setSqlValues(java.sql.PreparedStatement ps,
                        int i)
                 throws java.sql.SQLException,
                        DbException
Sets the sqlValues attribute of the DbLiteral object

Specified by:
setSqlValues in class DbExpr
Parameters:
ps - The statement.
i - The new sqlValues value
Returns:
An index (obscure)
Throws:
java.sql.SQLException - If something goes wrong.
DbException - If something goes wrong.

getQueryString

public java.lang.String getQueryString()
Gets the queryString attribute of the DbLiteral object

Specified by:
getQueryString in class DbExpr
Returns:
The queryString value