|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.util.sql.DAOUtil
public class DAOUtil
Prepared statement util class
| Field Summary | |
|---|---|
static java.lang.String |
MSG_EXCEPTION_SELECT_ERROR
|
| Constructor Summary | |
|---|---|
DAOUtil(java.lang.String sql)
Creates a new DAOUtil object. |
|
DAOUtil(java.lang.String strSQL,
Plugin plugin)
Creates a new DAOUtil object. |
|
| Method Summary | |
|---|---|
void |
executeQuery()
Executes a query |
void |
executeUpdate()
Executes the update request and throws an error if the result is not 1 |
protected void |
finalize()
finalize implementation |
boolean |
first()
Deprecated. |
void |
free()
Free connection |
java.io.InputStream |
getBinaryStream(int nIndex)
Gets a binary stream from a resultSet |
java.sql.Blob |
getBlob(int nIndex)
Gets a blob from a resultset |
java.sql.Blob |
getBlob(java.lang.String strColumnName)
Gets a blob from a resultset |
boolean |
getBoolean(int nIndex)
Gets the value of the designated column in the current row of this ResultSet object as a Boolean |
boolean |
getBoolean(java.lang.String strColumnName)
Gets the value of the designated column in the current row of this ResultSet object as a Boolean |
byte[] |
getBytes(int nIndex)
Gets a byte array from a resultset |
byte[] |
getBytes(java.lang.String strColumnName)
Gets a byte array from a resultset |
java.sql.Date |
getDate(int nIndex)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. |
java.sql.Date |
getDate(java.lang.String strColumnName)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. |
double |
getDouble(int nIndex)
Gets the value of the designated column in the current row of this ResultSet object as a double |
double |
getDouble(java.lang.String strColumnName)
Gets the value of the designated column in the current row of this ResultSet object as a double |
int |
getInt(int nIndex)
Gets the value of the designated column in the current row of this ResultSet object as a int |
int |
getInt(java.lang.String strColumnName)
Gets the value of the designated column in the current row of this ResultSet object as a int |
long |
getLong(int nIndex)
Gets the long value |
long |
getLong(java.lang.String strColumnName)
Gets the long value |
java.lang.Object |
getObject(int nIndex)
Gets the value of the designated column in the current row of this ResultSet object as a Object |
java.lang.Object |
getObject(java.lang.String strColumnName)
Gets the value of the designated column in the current row of this ResultSet object as an Object |
java.sql.ResultSet |
getResultSet()
Get the ResultSet |
java.lang.String |
getString(int nIndex)
Gets the value of the designated column in the current row of this ResultSet object as a string |
java.lang.String |
getString(java.lang.String strColumnName)
Gets the value of the designated column in the current row of this ResultSet object as a string |
java.sql.Time |
getTime(int nIndex)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. |
java.sql.Time |
getTime(java.lang.String strColumnName)
Gets the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. |
java.sql.Timestamp |
getTimestamp(int nIndex)
Gets the value of the designated column in the current row of this ResultSet object as a timestamp |
java.sql.Timestamp |
getTimestamp(java.lang.String strColumnName)
Gets the value of the designated column in the current row of this ResultSet object as a Timestamp |
boolean |
isLast()
Indicates whether the cursor is on the last row of this ResultSet object. |
boolean |
next()
Moves the cursor down one row from its current position in the ResultSet. |
void |
setBinaryStream(int nIndex,
java.io.InputStream iStream,
int nBlength)
Fills the prepared statement with a binary value stream |
void |
setBoolean(int nIndex,
boolean bValue)
Fills the prepared statement with a Boolean value |
void |
setBytes(int nIndex,
byte[] tbValue)
Fills the prepared statement with a byte array value |
void |
setDate(int nIndex,
java.sql.Date date)
Fills the prepared statement with a date value |
void |
setDouble(int nIndex,
double dValue)
Fills the prepared statement with a double value |
void |
setInt(int nIndex,
int nValue)
Fills the prepared statement with a int value |
void |
setIntNull(int nIndex)
Fills the prepared statement with a int null value |
void |
setLong(int nIndex,
long lValue)
Sets a long value |
void |
setLongNull(int nIndex)
Sets null value for a "long" column |
void |
setString(int nIndex,
java.lang.String strValue)
Fills the prepared statement with a string value |
void |
setTime(int nIndex,
java.sql.Time time)
Fills the prepared statement with a time value |
void |
setTimestamp(int nIndex,
java.sql.Timestamp ts)
Fills the prepared statement with a timestamp value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MSG_EXCEPTION_SELECT_ERROR
| Constructor Detail |
|---|
public DAOUtil(java.lang.String sql)
sql - Sql Query for prepared Statement
public DAOUtil(java.lang.String strSQL,
Plugin plugin)
strSQL - sql query for prepared Statementplugin - The plugin using this database access| Method Detail |
|---|
public void executeUpdate()
public void executeQuery()
public void free()
public boolean first()
public boolean isLast()
public void setDate(int nIndex,
java.sql.Date date)
nIndex - parameter indexdate - date value
public void setTime(int nIndex,
java.sql.Time time)
nIndex - parameter indextime - time value
public void setBinaryStream(int nIndex,
java.io.InputStream iStream,
int nBlength)
nIndex - parameter indexiStream - the java input stream which contains the binary parameter valuenBlength - the number of bytes in the streampublic java.io.InputStream getBinaryStream(int nIndex)
nIndex - column index
public java.sql.Blob getBlob(int nIndex)
nIndex - column index
public java.sql.Blob getBlob(java.lang.String strColumnName)
strColumnName - column name
public byte[] getBytes(int nIndex)
nIndex - column index
public byte[] getBytes(java.lang.String strColumnName)
strColumnName - column name
public void setInt(int nIndex,
int nValue)
nIndex - parameter index in the prepared statementnValue - int value
public void setBoolean(int nIndex,
boolean bValue)
nIndex - parameter index in the prepared statementbValue - Boolean value
public void setBytes(int nIndex,
byte[] tbValue)
nIndex - parameter index in the prepared statementtbValue - byte array value
public void setString(int nIndex,
java.lang.String strValue)
nIndex - parameter index in the prepared statementstrValue - string value
public void setTimestamp(int nIndex,
java.sql.Timestamp ts)
nIndex - parameter index in the prepared statementts - timestamp value
public void setDouble(int nIndex,
double dValue)
nIndex - parameter index in the prepared statementdValue - The valuepublic java.sql.Date getDate(int nIndex)
nIndex - the first column is 1, the second is 2, ...
public java.sql.Date getDate(java.lang.String strColumnName)
strColumnName - name of the column, ...
public java.sql.Time getTime(int nIndex)
nIndex - the first column is 1, the second is 2, ...
public java.sql.Time getTime(java.lang.String strColumnName)
strColumnName - name of the column, ...
public int getInt(int nIndex)
nIndex - the first column is 1, the second is 2, ...
public int getInt(java.lang.String strColumnName)
strColumnName - column name
public boolean getBoolean(int nIndex)
nIndex - the first column is 1, the second is 2, ...
public boolean getBoolean(java.lang.String strColumnName)
strColumnName - column name
public java.lang.String getString(int nIndex)
nIndex - the first column is 1, the second is 2, ...
public java.lang.String getString(java.lang.String strColumnName)
strColumnName - column name
public java.sql.Timestamp getTimestamp(int nIndex)
nIndex - the first column is 1, the second is 2, ...
public java.sql.Timestamp getTimestamp(java.lang.String strColumnName)
strColumnName - column name
public double getDouble(java.lang.String strColumnName)
strColumnName - column name
public double getDouble(int nIndex)
nIndex - the first column is 1, the second is 2, ...
public java.lang.Object getObject(int nIndex)
nIndex - the first column is 1, the second is 2, ...
public java.sql.ResultSet getResultSet()
public java.lang.Object getObject(java.lang.String strColumnName)
strColumnName - column name
public boolean next()
public void setIntNull(int nIndex)
nIndex - parameter indexpublic void setLongNull(int nIndex)
nIndex - the index
public void setLong(int nIndex,
long lValue)
nIndex - the indexlValue - the valuepublic long getLong(int nIndex)
nIndex - the index
public long getLong(java.lang.String strColumnName)
strColumnName - the column name
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - An exceptionObject.finalize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||