|
||||||||||||
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 |
DELETE
|
static int |
HQL_QUERY
|
static int |
LOAD
|
static int |
SAVE
|
static int |
SQL_QUERY
|
static int |
UPDATE
|
Method Summary | |
---|---|
java.lang.String |
getHQL()
This method define an HQL statement to be executed. |
java.lang.String[] |
getNamesForParams()
This method retuns the names for parameters to be setted to sql/hql statement. |
java.lang.Object[] |
getParameters()
This method retuns the parameters to be setted to SQL/HQL statement. |
java.lang.String[] |
getReturnAliasForSqlQuery()
This method is called when this action is of type SQL_QUERY. |
java.lang.Class[] |
getReturnClassForSqlQuery()
This method is called when this action is of type SQL_QUERY. |
java.lang.String |
getSQL()
This method define an SQL statement to be executed. |
int |
getStmtType()
Return of statemnt's type. |
void |
handleResult()
Handle the results of update statements. If the statement is of type SAVE/UPDATE/DELETE (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 |
handleResult(java.lang.Object to)
Handle the results of load statements. If the statement is of type LOAD (load), then when the execution of the statement finalize and no exception occurs, this method is call for handle the results. |
void |
handleResults(java.util.List rs)
Handle the results of query statements. If the statement is of type SQL_QUERY,HQL_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 |
isDelete()
Returs true if this action is an DELETE statement |
boolean |
isHqlQuery()
Returs true if this action is a HQL_QUERY statement |
boolean |
isLoad()
Returs true if this action is an LOAD statement |
boolean |
isSave()
Returs true if this action is an SAVE statement |
boolean |
isSqlQuery()
Returs true if this action is a SQL_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 SQL_QUERY
public static final int HQL_QUERY
public static final int SAVE
public static final int UPDATE
public static final int DELETE
public static final int LOAD
Method Detail |
public java.lang.String getSQL()
public java.lang.String getHQL()
public java.lang.Object[] getParameters()
public java.lang.String[] getNamesForParams()
public java.lang.Class[] getReturnClassForSqlQuery()
public java.lang.String[] getReturnAliasForSqlQuery()
public void handleResults(java.util.List rs) throws java.lang.Exception
rs
- ResultSet returned by query.
java.lang.Exception
public void handleResult() throws java.lang.Exception
java.lang.Exception
public void handleResult(java.lang.Object to) throws java.lang.Exception
to
- the trasnfer object loaded.
java.lang.Exception
public int getStmtType()
public void setStmtType(int stmtType)
stmtType
- one of this (SQL_QUERY,HQL_QUERY,SAVE,UPDATE,DELETE).public boolean isSqlQuery()
public boolean isHqlQuery()
public boolean isSave()
public boolean isUpdate()
public boolean isDelete()
public boolean isLoad()
public boolean isCaching()
public void setCaching(boolean caching)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |