public class DAOUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MSG_EXCEPTION_SELECT_ERROR |
| Constructor and Description |
|---|
DAOUtil(String sql)
Creates a new DAOUtil object.
|
DAOUtil(String strSQL,
Plugin plugin)
Creates a new DAOUtil object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeQuery()
Executes a query
|
void |
executeUpdate()
Executes the update request and throws an error if the result is not 1
|
protected void |
finalize() |
boolean |
first()
Deprecated.
Use
next() instead |
void |
free()
Free connection
|
InputStream |
getBinaryStream(int nIndex)
Gets a binary stream from a resultSet
|
Blob |
getBlob(int nIndex)
Gets a blob from a resultset
|
Blob |
getBlob(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(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(String strColumnName)
Gets a byte array from a resultset
|
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.
|
Date |
getDate(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(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(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(String strColumnName)
Gets the long value
|
Object |
getObject(int nIndex)
Gets the value of the designated column in the current row of this
ResultSet
object as a Object
|
Object |
getObject(String strColumnName)
Gets the value of the designated column in the current row of this
ResultSet
object as an Object
|
ResultSet |
getResultSet()
Get the ResultSet
|
String |
getString(int nIndex)
Gets the value of the designated column in the current row of this
ResultSet
object as a string
|
String |
getString(String strColumnName)
Gets the value of the designated column in the current row of this
ResultSet
object as a string
|
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.
|
Time |
getTime(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.
|
Timestamp |
getTimestamp(int nIndex)
Gets the value of the designated column in the current row of this
ResultSet
object as a timestamp
|
Timestamp |
getTimestamp(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,
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,
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 |
setDoubleNull(int nIndex)
Sets null value for a "double" column
|
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,
String strValue)
Fills the prepared statement with a string value
|
void |
setTime(int nIndex,
Time time)
Fills the prepared statement with a time value
|
void |
setTimestamp(int nIndex,
Timestamp ts)
Fills the prepared statement with a timestamp value
|
public static final String MSG_EXCEPTION_SELECT_ERROR
public DAOUtil(String sql)
sql - Sql Query for prepared Statementpublic void executeUpdate()
public void executeQuery()
public final void free()
@Deprecated public boolean first()
next() insteadpublic boolean isLast()
public void setDate(int nIndex,
Date date)
nIndex - parameter indexdate - date valuepublic void setTime(int nIndex,
Time time)
nIndex - parameter indextime - time valuepublic void setBinaryStream(int nIndex,
InputStream iStream,
int nBlength)
nIndex - parameter indexiStream - the java input stream which contains the binary parameter
valuenBlength - the number of bytes in the streampublic InputStream getBinaryStream(int nIndex)
nIndex - column indexpublic Blob getBlob(int nIndex)
nIndex - column indexpublic Blob getBlob(String strColumnName)
strColumnName - column namepublic byte[] getBytes(int nIndex)
nIndex - column indexpublic byte[] getBytes(String strColumnName)
strColumnName - column namepublic void setInt(int nIndex,
int nValue)
nIndex - parameter index in the prepared statementnValue - int valuepublic void setBoolean(int nIndex,
boolean bValue)
nIndex - parameter index in the prepared statementbValue - Boolean valuepublic void setBytes(int nIndex,
byte[] tbValue)
nIndex - parameter index in the prepared statementtbValue - byte array valuepublic void setString(int nIndex,
String strValue)
nIndex - parameter index in the prepared statementstrValue - string valuepublic void setTimestamp(int nIndex,
Timestamp ts)
nIndex - parameter index in the prepared statementts - timestamp valuepublic void setDouble(int nIndex,
double dValue)
nIndex - parameter index in the prepared statementdValue - The valuepublic void setDoubleNull(int nIndex)
nIndex - the indexpublic Date getDate(int nIndex)
nIndex - the first column is 1, the second is 2, ...public Date getDate(String strColumnName)
strColumnName - name of the column, ...public Time getTime(int nIndex)
nIndex - the first column is 1, the second is 2, ...public Time getTime(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(String strColumnName)
strColumnName - column namepublic boolean getBoolean(int nIndex)
nIndex - the first column is 1, the second is 2, ...public boolean getBoolean(String strColumnName)
strColumnName - column namepublic String getString(int nIndex)
nIndex - the first column is 1, the second is 2, ...public String getString(String strColumnName)
strColumnName - column namepublic Timestamp getTimestamp(int nIndex)
nIndex - the first column is 1, the second is 2, ...public Timestamp getTimestamp(String strColumnName)
strColumnName - column namepublic double getDouble(String strColumnName)
strColumnName - column namepublic double getDouble(int nIndex)
nIndex - the first column is 1, the second is 2, ...public Object getObject(int nIndex)
nIndex - the first column is 1, the second is 2, ...public ResultSet getResultSet()
public Object getObject(String strColumnName)
strColumnName - column namepublic boolean next()
public void setIntNull(int nIndex)
nIndex - parameter indexpublic void setLongNull(int nIndex)
nIndex - the indexpublic void setLong(int nIndex,
long lValue)
nIndex - the indexlValue - the valuepublic long getLong(int nIndex)
nIndex - the indexpublic long getLong(String strColumnName)
strColumnName - the column nameCopyright © 2016 City of Paris. All rights reserved.