|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Base interface of real actions.
Based on an example of book Code Notes for J2EE, Edited by GREGORY BRILL,
e-ISBN 0-679-64727-9
Last modified $Date: 2004/05/18 10:50:13 $
Field Summary | |
---|---|
static int |
CALL_FUNCTION
|
static int |
CALL_PROCEDURE
|
static int |
DDL
|
static int |
NO_OUT_PARAM
|
static int |
QUERY
|
static int |
UPDATE
|
Method Summary | |
---|---|
void |
cachPreparedStatement(java.sql.PreparedStatement pstmt)
|
int[] |
getDataTypesForOutParams()
This method is called when this action is of type CALL_PROCEDURE or CALL_FUNCTION. |
int[] |
getDataTypesForParams()
This method retuns the SQL Type for parameters to be setted to sql statement. |
java.lang.Object[] |
getParameters()
This method retuns the parameters to be setted to sql statement. |
java.sql.PreparedStatement |
getPreparedStatement()
|
java.lang.String |
getSQL()
This method define the sql statement to be executed. |
int |
getStmtType()
Return of statemnt's type. |
void |
handleResults(java.sql.CallableStatement cstmt)
Handle the results of call statements. If the statement is of type CALL_PROCEDURE or CALL_FUNCTION, then when the execution of the statement finalize and no exception occurs, this method is call for handle the results. |
void |
handleResults(int rowsAffected)
Handle the results of update statements. If the statement is of type UPDATE (insert, update or delete), then when the execution of the statement finalize and no exception occurs, this method is call for handle the results. |
void |
handleResults(java.sql.ResultSet rs)
Handle the results of query statements. If the statement is of type QUERY (select), then when the execution of the statement finalize and no exception occurs, this method is call for handle the results. |
boolean |
isCaching()
|
boolean |
isCall()
Returs true if this action is a CALL statement |
boolean |
isQuery()
Returs true if this action is a QUERY statement |
boolean |
isUpdate()
Returs true if this action is an UPDATE statement |
void |
setCaching(boolean caching)
|
void |
setStmtType(int stmtType)
Set of statemnt's type. |
Methods inherited from interface org.j2ee.dao.DAOAction |
---|
execute, getTO, setErrorHandler, setTO |
Field Detail |
public static final int QUERY
public static final int UPDATE
public static final int CALL_PROCEDURE
public static final int CALL_FUNCTION
public static final int DDL
public static final int NO_OUT_PARAM
Method Detail |
public java.lang.String getSQL()
public java.lang.Object[] getParameters()
public int[] getDataTypesForParams()
Types
public int[] getDataTypesForOutParams()
return new int[] = {NO_OUT_PARAM, Types.VARCHAR};
Types
public void handleResults(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- ResultSet returned by query.
java.sql.SQLException
public void handleResults(int rowsAffected) throws java.sql.SQLException
rowsAffected
- Rows affecteds by execution of this action.
java.sql.SQLException
public void handleResults(java.sql.CallableStatement cstmt) throws java.sql.SQLException
cstmt
- CallableStatement used for execute this call.
java.sql.SQLException
public int getStmtType()
public void setStmtType(int stmtType)
stmtType
- one of this (QUERY,UPDATE,CALL_PROCEDURE,CALL_FUNCTION).public boolean isQuery()
public boolean isUpdate()
public boolean isCall()
public boolean isCaching()
public void setCaching(boolean caching)
public void cachPreparedStatement(java.sql.PreparedStatement pstmt)
public java.sql.PreparedStatement getPreparedStatement()
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |