org.pojava.persistence.query
Class PreparedSql

java.lang.Object
  extended by org.pojava.persistence.query.PreparedSql

public class PreparedSql
extends Object

Prepared Sql holds a normalized SQL statement with positional binding references. This object should be used for SQL that is ready to execute. Note that timeout may be unsupported by a JDBC driver, so it may be ignored by other parts of POJava framework unless it is known to be safe to use.

Author:
John Pile

Constructor Summary
PreparedSql(org.pojava.lang.BoundString sql)
          Create PreparedSql from SQL stored in a BoundString with unlimited maxRows.
PreparedSql(org.pojava.lang.BoundString sql, int maxRows)
          Create PreparedSql from SQL stored in a BoundString with specified maxRows.
 
Method Summary
 int getMaxRows()
          Get Max number of rows returnable by query.
 org.pojava.lang.BoundString getSql()
          Get SQL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreparedSql

public PreparedSql(org.pojava.lang.BoundString sql)
Create PreparedSql from SQL stored in a BoundString with unlimited maxRows.

Parameters:
sql -

PreparedSql

public PreparedSql(org.pojava.lang.BoundString sql,
                   int maxRows)
Create PreparedSql from SQL stored in a BoundString with specified maxRows.

Parameters:
sql -
maxRows -
Method Detail

getSql

public org.pojava.lang.BoundString getSql()
Get SQL.

Returns:
SQL and bindings

getMaxRows

public int getMaxRows()
Get Max number of rows returnable by query.

Returns:
row limit for JDBC driver to return


Copyright © 2011. All Rights Reserved.