|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.util.CStatement
org.compiere.util.CPreparedStatement
public class CPreparedStatement
Adempiere Prepared Statement
| Field Summary |
|---|
| Fields inherited from class org.compiere.util.CStatement |
|---|
executeResult, log, m_conn, p_remoteErrors, p_stmt, p_vo |
| Fields inherited from interface java.sql.Statement |
|---|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| Constructor Summary | |
|---|---|
CPreparedStatement(CStatementVO vo)
Remote Constructor |
|
CPreparedStatement(int resultSetType,
int resultSetConcurrency,
String sql0,
String trxName)
Prepared Statement Constructor |
|
| Method Summary | |
|---|---|
void |
addBatch()
Method addBatch |
void |
clearParameters()
Method clearParameters |
boolean |
execute()
Method execute |
ResultSet |
executeQuery()
Execute Query |
ResultSet |
executeQuery(String sql0)
Execute Query |
int |
executeUpdate()
Execute Update |
int |
executeUpdate(String sql0)
Execute Update |
void |
fillParametersFromVO()
|
ResultSetMetaData |
getMetaData()
Method getMetaData |
ParameterMetaData |
getParameterMetaData()
Method getParameterMetaData |
protected void |
init()
Initialise the prepared statement wrapper object |
protected RowSet |
local_getRowSet()
Get Result as RowSet for local system. |
void |
setArray(int parameterIndex,
Array x)
Method setArray |
void |
setAsciiStream(int parameterIndex,
InputStream x,
int length)
Method setAsciiStream |
void |
setAsciiStream(int parameterIndex,
InputStream x,
long length)
|
void |
setBigDecimal(int parameterIndex,
BigDecimal x)
Method setBigDecimal |
void |
setBinaryStream(int parameterIndex,
InputStream x,
int length)
Method setBinaryStream |
void |
setBlob(int parameterIndex,
Blob x)
Method setBlob |
void |
setBoolean(int parameterIndex,
boolean x)
Method setBoolean |
void |
setByte(int parameterIndex,
byte x)
Method setByte |
void |
setBytes(int parameterIndex,
byte[] x)
Method setBytes |
void |
setCharacterStream(int parameterIndex,
Reader reader,
int length)
Method setCharacterStream |
void |
setClob(int parameterIndex,
Clob x)
Method setClob |
void |
setDate(int parameterIndex,
Date x)
Method setDate |
void |
setDate(int parameterIndex,
Date x,
Calendar cal)
Method setDate |
void |
setDouble(int parameterIndex,
double x)
Method setDouble |
void |
setFloat(int parameterIndex,
float x)
Method setFloat |
void |
setInt(int parameterIndex,
int x)
Method setInt |
void |
setLong(int parameterIndex,
long x)
Method setLong |
void |
setNull(int parameterIndex,
int sqlType)
Set Null |
void |
setNull(int parameterIndex,
int sqlType,
String typeName)
Method setNull |
void |
setObject(int parameterIndex,
Object x)
Method setObject |
void |
setObject(int parameterIndex,
Object x,
int targetSqlType)
Method setObject |
void |
setObject(int parameterIndex,
Object x,
int targetSqlType,
int scale)
Method setObject |
void |
setRef(int parameterIndex,
Ref x)
Method setRef |
void |
setShort(int parameterIndex,
short x)
Method setShort |
void |
setString(int parameterIndex,
String x)
Method setString |
void |
setTime(int parameterIndex,
Time x)
Method setTime |
void |
setTime(int parameterIndex,
Time x,
Calendar cal)
Method setTime |
void |
setTimestamp(int parameterIndex,
Timestamp x)
Method setTimestamp |
void |
setTimestamp(int parameterIndex,
Timestamp x,
Calendar cal)
Method setTimestamp |
void |
setUnicodeStream(int parameterIndex,
InputStream x,
int length)
Deprecated. |
void |
setURL(int parameterIndex,
URL x)
Method setURL |
String |
toString()
String representation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.sql.PreparedStatement |
|---|
setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setCharacterStream, setCharacterStream, setClob, setClob, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setRowId, setSQLXML |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Constructor Detail |
|---|
public CPreparedStatement(int resultSetType,
int resultSetConcurrency,
String sql0,
String trxName)
resultSetType - - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEsql0 - unconverted sql statementtrxName - transaction name or nullpublic CPreparedStatement(CStatementVO vo)
vo - value object| Method Detail |
|---|
protected void init()
init in class CStatement
public ResultSet executeQuery()
throws SQLException
executeQuery in interface PreparedStatementSQLExceptionPreparedStatement.executeQuery()
public ResultSet executeQuery(String sql0)
throws SQLException
executeQuery in interface StatementexecuteQuery in class CStatementsql0 - unconverted SQL to execute
SQLExceptionStatement.executeQuery(String)
public int executeUpdate()
throws SQLException
executeUpdate in interface PreparedStatementSQLExceptionPreparedStatement.executeUpdate()
public int executeUpdate(String sql0)
throws SQLException
executeUpdate in interface StatementexecuteUpdate in class CStatementsql0 - unconverted sql
SQLExceptionStatement.executeUpdate(String)
public boolean execute()
throws SQLException
execute in interface PreparedStatementSQLExceptionPreparedStatement.execute()
public ResultSetMetaData getMetaData()
throws SQLException
getMetaData in interface PreparedStatementSQLExceptionPreparedStatement.getMetaData()
public ParameterMetaData getParameterMetaData()
throws SQLException
getParameterMetaData in interface PreparedStatementSQLExceptionPreparedStatement.getParameterMetaData()
public void addBatch()
throws SQLException
addBatch in interface PreparedStatementSQLExceptionPreparedStatement.addBatch()
public void setNull(int parameterIndex,
int sqlType)
throws SQLException
setNull in interface PreparedStatementparameterIndex - indexsqlType - type
SQLException
public void setNull(int parameterIndex,
int sqlType,
String typeName)
throws SQLException
setNull in interface PreparedStatementparameterIndex - intsqlType - inttypeName - String
SQLExceptionPreparedStatement.setNull(int, int, String)
public void setBoolean(int parameterIndex,
boolean x)
throws SQLException
setBoolean in interface PreparedStatementparameterIndex - intx - boolean
SQLExceptionPreparedStatement.setBoolean(int, boolean)
public void setByte(int parameterIndex,
byte x)
throws SQLException
setByte in interface PreparedStatementparameterIndex - intx - byte
SQLExceptionPreparedStatement.setByte(int, byte)
public void setShort(int parameterIndex,
short x)
throws SQLException
setShort in interface PreparedStatementparameterIndex - intx - short
SQLExceptionPreparedStatement.setShort(int, short)
public void setInt(int parameterIndex,
int x)
throws SQLException
setInt in interface PreparedStatementparameterIndex - intx - int
SQLExceptionPreparedStatement.setInt(int, int)
public void setLong(int parameterIndex,
long x)
throws SQLException
setLong in interface PreparedStatementparameterIndex - intx - long
SQLExceptionPreparedStatement.setLong(int, long)
public void setFloat(int parameterIndex,
float x)
throws SQLException
setFloat in interface PreparedStatementparameterIndex - intx - float
SQLExceptionPreparedStatement.setFloat(int, float)
public void setDouble(int parameterIndex,
double x)
throws SQLException
setDouble in interface PreparedStatementparameterIndex - intx - double
SQLExceptionPreparedStatement.setDouble(int, double)
public void setBigDecimal(int parameterIndex,
BigDecimal x)
throws SQLException
setBigDecimal in interface PreparedStatementparameterIndex - intx - BigDecimal
SQLExceptionPreparedStatement.setBigDecimal(int, BigDecimal)
public void setString(int parameterIndex,
String x)
throws SQLException
setString in interface PreparedStatementparameterIndex - intx - String
SQLExceptionPreparedStatement.setString(int, String)
public void setBytes(int parameterIndex,
byte[] x)
throws SQLException
setBytes in interface PreparedStatementparameterIndex - intx - byte[]
SQLExceptionPreparedStatement.setBytes(int, byte[])
public void setDate(int parameterIndex,
Date x)
throws SQLException
setDate in interface PreparedStatementparameterIndex - intx - java.sql.Date
SQLExceptionPreparedStatement.setDate(int, java.sql.Date)
public void setTime(int parameterIndex,
Time x)
throws SQLException
setTime in interface PreparedStatementparameterIndex - intx - Time
SQLExceptionPreparedStatement.setTime(int, Time)
public void setTimestamp(int parameterIndex,
Timestamp x)
throws SQLException
setTimestamp in interface PreparedStatementparameterIndex - intx - Timestamp
SQLExceptionPreparedStatement.setTimestamp(int, Timestamp)
public void setAsciiStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
setAsciiStream in interface PreparedStatementparameterIndex - intx - InputStreamlength - int
SQLExceptionPreparedStatement.setAsciiStream(int, InputStream, int)
public void setUnicodeStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
setUnicodeStream in interface PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - a java.io.InputStream object that contains the
Unicode parameter value as two-byte Unicode characterslength - the number of bytes in the stream
SQLException - if a database access error occurs
see java.sql.PreparedStatement#setUnicodeStream(int, InputStream, int)
public void setBinaryStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
setBinaryStream in interface PreparedStatementparameterIndex - intx - InputStreamlength - int
SQLExceptionPreparedStatement.setBinaryStream(int, InputStream, int)
public void clearParameters()
throws SQLException
clearParameters in interface PreparedStatementSQLExceptionPreparedStatement.clearParameters()
public void setObject(int parameterIndex,
Object x,
int targetSqlType,
int scale)
throws SQLException
setObject in interface PreparedStatementparameterIndex - intx - ObjecttargetSqlType - intscale - int
SQLExceptionPreparedStatement.setObject(int, Object, int, int)
public void setObject(int parameterIndex,
Object x,
int targetSqlType)
throws SQLException
setObject in interface PreparedStatementparameterIndex - intx - ObjecttargetSqlType - int
SQLExceptionPreparedStatement.setObject(int, Object, int)
public void setObject(int parameterIndex,
Object x)
throws SQLException
setObject in interface PreparedStatementparameterIndex - intx - Object
SQLExceptionPreparedStatement.setObject(int, Object)
public void setCharacterStream(int parameterIndex,
Reader reader,
int length)
throws SQLException
setCharacterStream in interface PreparedStatementparameterIndex - intreader - Readerlength - int
SQLExceptionPreparedStatement.setCharacterStream(int, Reader, int)
public void setRef(int parameterIndex,
Ref x)
throws SQLException
setRef in interface PreparedStatementparameterIndex - intx - Ref
SQLExceptionPreparedStatement.setRef(int, Ref)
public void setBlob(int parameterIndex,
Blob x)
throws SQLException
setBlob in interface PreparedStatementparameterIndex - intx - Blob
SQLExceptionPreparedStatement.setBlob(int, Blob)
public void setClob(int parameterIndex,
Clob x)
throws SQLException
setClob in interface PreparedStatementparameterIndex - intx - Clob
SQLExceptionPreparedStatement.setClob(int, Clob)
public void setArray(int parameterIndex,
Array x)
throws SQLException
setArray in interface PreparedStatementparameterIndex - intx - Array
SQLExceptionPreparedStatement.setArray(int, Array)
public void setDate(int parameterIndex,
Date x,
Calendar cal)
throws SQLException
setDate in interface PreparedStatementparameterIndex - intx - java.sql.Datecal - Calendar
SQLExceptionPreparedStatement.setDate(int, java.sql.Date, Calendar)
public void setTime(int parameterIndex,
Time x,
Calendar cal)
throws SQLException
setTime in interface PreparedStatementparameterIndex - intx - Timecal - Calendar
SQLExceptionPreparedStatement.setTime(int, Time, Calendar)
public void setTimestamp(int parameterIndex,
Timestamp x,
Calendar cal)
throws SQLException
setTimestamp in interface PreparedStatementparameterIndex - intx - Timestampcal - Calendar
SQLExceptionPreparedStatement.setTimestamp(int, Timestamp, Calendar)
public void setURL(int parameterIndex,
URL x)
throws SQLException
setURL in interface PreparedStatementparameterIndex - intx - URL
SQLExceptionPreparedStatement.setURL(int, URL)public String toString()
toString in class Objectpublic void fillParametersFromVO()
protected RowSet local_getRowSet()
local_getRowSet in class CStatement
public void setAsciiStream(int parameterIndex,
InputStream x,
long length)
throws SQLException
setAsciiStream in interface PreparedStatementSQLException
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||