Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa.jdbc » sql » [javadoc | source]
org.apache.openjpa.jdbc.sql
public final class: SQLBuffer [javadoc | source]
java.lang.Object
   org.apache.openjpa.jdbc.sql.SQLBuffer

All Implemented Interfaces:
    Cloneable, Serializable

Buffer for SQL statements that can be used to create java.sql.PreparedStatements.
Constructor:
 public SQLBuffer(DBDictionary dict) 
    Default constructor.
 public SQLBuffer(SQLBuffer buf) 
    Copy constructor.
Method from org.apache.openjpa.jdbc.sql.SQLBuffer Summary:
addCastForParam,   append,   append,   append,   append,   append,   append,   appendCount,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   appendValue,   clone,   equals,   getColumns,   getParameters,   getSQL,   getSQL,   hashCode,   isEmpty,   prepareCall,   prepareCall,   prepareCall,   prepareStatement,   prepareStatement,   prepareStatement,   replace,   replaceSqlString,   setParameters,   setParameters,   sqlEquals
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.jdbc.sql.SQLBuffer Detail:
 public  void addCastForParam(String oper,
    Val val) 
    Replace SQL '?' with CAST string if required by DB platform
 public SQLBuffer append(SQLBuffer buf) 
    Append all SQL and parameters of the given buffer.
 public SQLBuffer append(Table table) 
 public SQLBuffer append(Sequence seq) 
 public SQLBuffer append(Column col) 
 public SQLBuffer append(String s) 
 public SQLBuffer append(Select sel,
    JDBCFetchConfiguration fetch) 
    Append a subselect. This delays resolution of the select SQL.
 public SQLBuffer appendCount(Select sel,
    JDBCFetchConfiguration fetch) 
    Append a subselect count. This delays resolution of the select SQL.
 public SQLBuffer appendValue(Object o) 
    Append a parameter value.
 public SQLBuffer appendValue(boolean b) 
    Append a parameter value.
 public SQLBuffer appendValue(byte b) 
    Append a parameter value.
 public SQLBuffer appendValue(char c) 
    Append a parameter value.
 public SQLBuffer appendValue(double d) 
    Append a parameter value.
 public SQLBuffer appendValue(float f) 
    Append a parameter value.
 public SQLBuffer appendValue(int i) 
    Append a parameter value.
 public SQLBuffer appendValue(long l) 
    Append a parameter value.
 public SQLBuffer appendValue(short s) 
    Append a parameter value.
 public SQLBuffer appendValue(Object o,
    Column col) 
    Append a parameter value for a specific column.
 public SQLBuffer appendValue(boolean b,
    Column col) 
    Append a parameter value.
 public SQLBuffer appendValue(byte b,
    Column col) 
    Append a parameter value.
 public SQLBuffer appendValue(char c,
    Column col) 
    Append a parameter value.
 public SQLBuffer appendValue(double d,
    Column col) 
    Append a parameter value.
 public SQLBuffer appendValue(float f,
    Column col) 
    Append a parameter value.
 public SQLBuffer appendValue(int i,
    Column col) 
    Append a parameter value.
 public SQLBuffer appendValue(long l,
    Column col) 
    Append a parameter value.
 public SQLBuffer appendValue(short s,
    Column col) 
    Append a parameter value.
 public Object clone() 
    Perform a shallow clone of this SQL Buffer.
 public boolean equals(Object other) 
 public List getColumns() 
 public List getParameters() 
    Return the list of parameter values.
 public String getSQL() 
    Return the SQL for this buffer.
 public String getSQL(boolean replaceParams) 
    Returns the SQL for this buffer.
 public int hashCode() 
 public boolean isEmpty() 
    Return true if the buffer is emtpy.
 public CallableStatement prepareCall(Connection conn) throws SQLException 
    Create and populate the parameters of a prepared statement using the SQL in this buffer.
 public CallableStatement prepareCall(Connection conn,
    int rsType,
    int rsConcur) throws SQLException 
    Create and populate the parameters of a prepared statement using the SQL in this buffer.
 public CallableStatement prepareCall(Connection conn,
    JDBCFetchConfiguration fetch,
    int rsType,
    int rsConcur) throws SQLException 
    Create and populate the parameters of a prepred statement using the SQL in this buffer and the given fetch configuration.
 public PreparedStatement prepareStatement(Connection conn) throws SQLException 
    Create and populate the parameters of a prepared statement using the SQL in this buffer.
 public PreparedStatement prepareStatement(Connection conn,
    int rsType,
    int rsConcur) throws SQLException 
    Create and populate the parameters of a prepared statement using the SQL in this buffer.
 public PreparedStatement prepareStatement(Connection conn,
    JDBCFetchConfiguration fetch,
    int rsType,
    int rsConcur) throws SQLException 
    Create and populate the parameters of a prepred statement using the SQL in this buffer and the given fetch configuration.
 public boolean replace(Select old,
    Select sel) 
    Replace a subselect.
 public  void replaceSqlString(int start,
    int end,
    String newString) 
    Replace current buffer string with the new string
 public  void setParameters(PreparedStatement ps) throws SQLException 
    Populate the parameters of an existing PreparedStatement with values from this buffer.
 public  void setParameters(List params) 
 public boolean sqlEquals(String sql) 
    Compare internal SQL without resolving subselects or stringifying parameters.