SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

kodo.jdbc.sql
Class SQLBuffer

java.lang.Object
  |
  +--kodo.jdbc.sql.SQLBuffer
All Implemented Interfaces:
Serializable

public class SQLBuffer
extends Object
implements Serializable

Buffer for SQL statements that can be used to create java.sql.PreparedStatements.

Since:
2.4
See Also:
Serialized Form

Constructor Summary
SQLBuffer(DBDictionary dict)
          Default constructor.
SQLBuffer(SQLBuffer buf)
          Copy constructor.
 
Method Summary
 SQLBuffer append(Column col)
           
 SQLBuffer append(SQLBuffer buf)
          Append all SQL and parameters of the given buffer.
 SQLBuffer append(String s)
           
 SQLBuffer append(Table table)
           
 SQLBuffer appendValue(boolean b)
          Append a parameter value.
 SQLBuffer appendValue(boolean b, Column col)
          Append a parameter value.
 SQLBuffer appendValue(byte b)
          Append a parameter value.
 SQLBuffer appendValue(byte b, Column col)
          Append a parameter value.
 SQLBuffer appendValue(char c)
          Append a parameter value.
 SQLBuffer appendValue(char c, Column col)
          Append a parameter value.
 SQLBuffer appendValue(double d)
          Append a parameter value.
 SQLBuffer appendValue(double d, Column col)
          Append a parameter value.
 SQLBuffer appendValue(float f)
          Append a parameter value.
 SQLBuffer appendValue(float f, Column col)
          Append a parameter value.
 SQLBuffer appendValue(int i)
          Append a parameter value.
 SQLBuffer appendValue(int i, Column col)
          Append a parameter value.
 SQLBuffer appendValue(long l)
          Append a parameter value.
 SQLBuffer appendValue(long l, Column col)
          Append a parameter value.
 SQLBuffer appendValue(Object o)
          Append a parameter value.
 SQLBuffer appendValue(Object o, Column col)
          Append a parameter value for a specific column.
 SQLBuffer appendValue(short s)
          Append a parameter value.
 SQLBuffer appendValue(short s, Column col)
          Append a parameter value.
 Object clone()
          Perform a shallow clone of this SQL Buffer.
 List getParameters()
          Return the list of parameter values.
 String getSQL()
          Return the SQL for this buffer.
 String getSQL(boolean replaceParams)
          Returns the SQL for this buffer.
 boolean isEmpty()
          Return true if the buffer is emtpy.
 CallableStatement prepareCall(Connection conn)
          Create and populate the parameters of a prepared statement using the SQL in this buffer.
 CallableStatement prepareCall(Connection conn, int rsType, int rsConcur)
          Create and populate the parameters of a prepared statement using the SQL in this buffer.
 CallableStatement prepareCall(Connection conn, JDBCFetchConfiguration fetch, int rsType, int rsConcur)
          Create and populate the parameters of a prepred statement using the SQL in this buffer and the given fetch configuration.
 PreparedStatement prepareStatement(Connection conn)
          Create and populate the parameters of a prepared statement using the SQL in this buffer.
 PreparedStatement prepareStatement(Connection conn, int rsType, int rsConcur)
          Create and populate the parameters of a prepared statement using the SQL in this buffer.
 PreparedStatement prepareStatement(Connection conn, JDBCFetchConfiguration fetch, int rsType, int rsConcur)
          Create and populate the parameters of a prepred statement using the SQL in this buffer and the given fetch configuration.
 void setParameters(PreparedStatement ps)
          Populate the parameters of an existing PreparedStatement with values from this buffer.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLBuffer

public SQLBuffer(DBDictionary dict)
Default constructor.

SQLBuffer

public SQLBuffer(SQLBuffer buf)
Copy constructor.
Method Detail

clone

public Object clone()
Perform a shallow clone of this SQL Buffer.
Overrides:
clone in class Object

isEmpty

public boolean isEmpty()
Return true if the buffer is emtpy.

append

public SQLBuffer append(SQLBuffer buf)
Append all SQL and parameters of the given buffer.

append

public SQLBuffer append(Table table)

append

public SQLBuffer append(Column col)

append

public SQLBuffer append(String s)

appendValue

public SQLBuffer appendValue(Object o)
Append a parameter value.

appendValue

public SQLBuffer appendValue(Object o,
                             Column col)
Append a parameter value for a specific column.

appendValue

public SQLBuffer appendValue(boolean b)
Append a parameter value.

appendValue

public SQLBuffer appendValue(boolean b,
                             Column col)
Append a parameter value.

appendValue

public SQLBuffer appendValue(byte b)
Append a parameter value.

appendValue

public SQLBuffer appendValue(byte b,
                             Column col)
Append a parameter value.

appendValue

public SQLBuffer appendValue(char c)
Append a parameter value.

appendValue

public SQLBuffer appendValue(char c,
                             Column col)
Append a parameter value.

appendValue

public SQLBuffer appendValue(double d)
Append a parameter value.

appendValue

public SQLBuffer appendValue(double d,
                             Column col)
Append a parameter value.

appendValue

public SQLBuffer appendValue(float f)
Append a parameter value.

appendValue

public SQLBuffer appendValue(float f,
                             Column col)
Append a parameter value.

appendValue

public SQLBuffer appendValue(int i)
Append a parameter value.

appendValue

public SQLBuffer appendValue(int i,
                             Column col)
Append a parameter value.

appendValue

public SQLBuffer appendValue(long l)
Append a parameter value.

appendValue

public SQLBuffer appendValue(long l,
                             Column col)
Append a parameter value.

appendValue

public SQLBuffer appendValue(short s)
Append a parameter value.

appendValue

public SQLBuffer appendValue(short s,
                             Column col)
Append a parameter value.

getParameters

public List getParameters()
Return the list of parameter values.

getSQL

public String getSQL()
Return the SQL for this buffer.

getSQL

public String getSQL(boolean replaceParams)
Returns the SQL for this buffer.
Parameters:
replaceParams - if true, then replace parameters with the actual parameter values

prepareStatement

public PreparedStatement prepareStatement(Connection conn)
                                   throws SQLException
Create and populate the parameters of a prepared statement using the SQL in this buffer.

prepareStatement

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.

prepareStatement

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.

prepareCall

public CallableStatement prepareCall(Connection conn)
                              throws SQLException
Create and populate the parameters of a prepared statement using the SQL in this buffer.

prepareCall

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.

prepareCall

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.

setParameters

public void setParameters(PreparedStatement ps)
                   throws SQLException
Populate the parameters of an existing PreparedStatement with values from this buffer.

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.