|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jet.sql.WebSql
public class WebSql
Field Summary | |
---|---|
(package private) int |
absolute
offset |
private java.lang.Boolean |
autocommitChanged
Indicates if autocommit was changedand holds the old value |
protected java.sql.Connection |
c
Holds the connection |
private static boolean |
debug
Indicates if we run in debug modus |
(package private) int |
limit
max rows returned |
protected static org.apache.log4j.Logger |
log
Logger object for debug |
protected java.sql.PreparedStatement |
p
Holds the current prepared statement |
(package private) int |
pos
helper var for setting values to prepared statement |
protected java.util.List<java.sql.PreparedStatement> |
ps
Holds the prepared statements returned |
protected java.util.List |
rs
Holds the results returned |
protected java.lang.String |
sql
remember the statement for error messages |
Constructor Summary | |
---|---|
WebSql()
Empty constructor |
Method Summary | |
---|---|
void |
commit()
calls Connection.commit() |
int |
executeUpdate()
Executes the prepared statement and returns the amount of effected rows. |
void |
finalize()
closes all database handles if they not null |
java.sql.ResultSet |
getResultSet()
Executes the prepared query and returns a resultset |
RowSetDynaClass |
getRowSetDynaClass()
Executes the prepared query and returns a RowSetDynaClass |
boolean |
hasConnection()
Indicates if the util has already a connection set |
int |
pos()
This method could be used to determine the current position to insert into the prepared statement - but wo have to use it on every set-method if you use it! |
int |
pos(boolean reset)
This method could be used to determine the current position to insert into the prepared statement - but wo have to use it on every set-method if you use it! |
void |
prepareStatement(java.lang.String sql)
Method to prepare a sql statement |
void |
prepareStatement(java.lang.String sql,
int absolute,
int limit)
Method to prepare a sql statement |
void |
rollback()
calls Connection.rollback() |
void |
setAsciiStream(java.io.InputStream x)
|
void |
setAsciiStream(java.io.InputStream x,
int bytes)
|
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x)
|
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x,
int bytes)
|
void |
setAutoCommit(boolean value)
set the auto commit status to the database connection |
void |
setBinaryStream(java.io.InputStream x)
|
void |
setBinaryStream(java.io.InputStream x,
int bytes)
|
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x)
|
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x,
int bytes)
|
void |
setBlob(java.sql.Blob x)
|
void |
setBlob(int parameterIndex,
java.sql.Blob x)
|
void |
setByte(byte x)
|
void |
setByte(int parameterIndex,
byte x)
|
void |
setBytes(byte[] x)
|
void |
setBytes(int parameterIndex,
byte[] x)
|
void |
setCharacterStream(int parameterIndex,
java.io.Reader x)
|
void |
setCharacterStream(int parameterIndex,
java.io.Reader x,
int bytes)
|
void |
setCharacterStream(java.io.Reader x)
|
void |
setCharacterStream(java.io.Reader x,
int bytes)
|
void |
setClob(java.sql.Clob x)
|
void |
setClob(int parameterIndex,
java.sql.Clob x)
|
void |
setConnection(java.sql.Connection conn)
Set the connection to use |
void |
setDate(java.sql.Date x)
|
void |
setDate(int parameterIndex,
java.sql.Date x)
|
void |
setDouble(double x)
|
void |
setDouble(int parameterIndex,
double x)
|
void |
setFloat(float x)
|
void |
setFloat(int parameterIndex,
float x)
|
void |
setInt(int x)
|
void |
setInt(int parameterIndex,
int x)
|
void |
setLong(int parameterIndex,
long x)
|
void |
setLong(long x)
|
void |
setNull(int sqlType)
|
void |
setNull(int parameterIndex,
int sqlType)
|
void |
setObject(int parameterIndex,
java.lang.Object x)
|
void |
setObject(int parameterIndex,
java.lang.Object x,
int type)
|
void |
setObject(java.lang.Object x)
|
void |
setObject(java.lang.Object x,
int type)
|
void |
setString(int parameterIndex,
java.lang.String x)
|
void |
setString(java.lang.String x)
|
void |
setTime(int parameterIndex,
java.sql.Time x)
|
void |
setTime(java.sql.Time x)
|
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x)
|
void |
setTimestamp(java.sql.Timestamp x)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.log4j.Logger log
protected java.sql.PreparedStatement p
protected java.util.List<java.sql.PreparedStatement> ps
protected java.util.List rs
protected java.sql.Connection c
protected java.lang.String sql
int pos
int absolute
int limit
private static boolean debug
private java.lang.Boolean autocommitChanged
Constructor Detail |
---|
public WebSql()
Method Detail |
---|
public void prepareStatement(java.lang.String sql) throws java.sql.SQLException, java.lang.IllegalStateException
sql
- the sql to prepare
java.sql.SQLException
java.lang.IllegalStateException
public void prepareStatement(java.lang.String sql, int absolute, int limit) throws java.sql.SQLException, java.lang.IllegalStateException
sql
- the sql to prepareabsolute
- the position in the resultsetlimit
- maximum count of rows returned
java.sql.SQLException
java.lang.IllegalStateException
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
java.sql.SQLException
public RowSetDynaClass getRowSetDynaClass() throws java.sql.SQLException
java.sql.SQLException
public void setObject(int parameterIndex, java.lang.Object x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setObject(int,Object)
public void setObject(int parameterIndex, java.lang.Object x, int type) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setObject(int,Object,int)
public void setInt(int parameterIndex, int x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setInt(int,int)
public void setLong(int parameterIndex, long x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setLong(int, long)
public void setNull(int parameterIndex, int sqlType) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setNull(int,int)
public void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setDate(int,Date)
public void setDouble(int parameterIndex, double x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setDouble(int,double)
public void setFloat(int parameterIndex, float x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setFloat(int,float)
public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setString(int,String)
public void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setTime(int,Time)
public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setTimestamp(int,Timestamp)
public void setAsciiStream(int parameterIndex, java.io.InputStream x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setAsciiStream(int,InputStream,int)
public void setAsciiStream(int parameterIndex, java.io.InputStream x, int bytes) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setAsciiStream(int,InputStream,int)
public void setBinaryStream(int parameterIndex, java.io.InputStream x, int bytes) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBinaryStream(int,InputStream,int)
public void setBinaryStream(int parameterIndex, java.io.InputStream x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBinaryStream(int,InputStream,int)
public void setCharacterStream(int parameterIndex, java.io.Reader x, int bytes) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setCharacterStream(int,Reader,int)
public void setCharacterStream(int parameterIndex, java.io.Reader x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setCharacterStream(int,Reader,int)
public void setBlob(int parameterIndex, java.sql.Blob x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBlob(int,Blob)
public void setClob(int parameterIndex, java.sql.Clob x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setClob(int,Clob)
public void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBytes(int,byte[])
public void setByte(int parameterIndex, byte x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setByte(int,byte)
public void setObject(java.lang.Object x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setObject(int,Object)
public void setObject(java.lang.Object x, int type) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setObject(int,Object,int)
public void setInt(int x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setInt(int,int)
public void setLong(long x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setLong(int, long)
public void setNull(int sqlType) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setNull(int,int)
public void setDate(java.sql.Date x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setDate(int,Date)
public void setDouble(double x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setDouble(int,double)
public void setFloat(float x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setFloat(int,float)
public void setString(java.lang.String x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setString(int,String)
public void setTime(java.sql.Time x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setTime(int,Time)
public void setTimestamp(java.sql.Timestamp x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setTimestamp(int,Timestamp)
public void setAsciiStream(java.io.InputStream x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setAsciiStream(int,InputStream,int)
public void setAsciiStream(java.io.InputStream x, int bytes) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setAsciiStream(int,InputStream,int)
public void setBinaryStream(java.io.InputStream x, int bytes) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBinaryStream(int,InputStream,int)
public void setBinaryStream(java.io.InputStream x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBinaryStream(int,InputStream,int)
public void setCharacterStream(java.io.Reader x, int bytes) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setCharacterStream(int,Reader,int)
public void setCharacterStream(java.io.Reader x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setCharacterStream(int,Reader,int)
public void setBlob(java.sql.Blob x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBlob(int,Blob)
public void setClob(java.sql.Clob x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBlob(int,Blob)
public void setBytes(byte[] x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setBytes(int,byte[])
public void setByte(byte x) throws java.sql.SQLException
java.sql.SQLException
PreparedStatement.setByte(int,byte)
public void setConnection(java.sql.Connection conn) throws java.sql.SQLException
conn
- connection object
java.sql.SQLException
public boolean hasConnection()
public int pos()
public int pos(boolean reset)
reset
- indicates if the counter should be resettedpublic int executeUpdate() throws java.sql.SQLException
java.sql.SQLException
public void finalize()
finalize
in class java.lang.Object
public void setAutoCommit(boolean value) throws java.sql.SQLException
java.sql.SQLException
public void commit() throws java.sql.SQLException
java.sql.SQLException
public void rollback() throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |