|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.j2ee.dao.AbstractHibernateDAOAction | +--org.j2ee.dao.util.AbstractPageByPageAction
Limit—with offset Objective: Want to only get n rows in the result set, and we want the first y rows in the result set discarded. Usually only makes sense in connection with an ORDER BY expression. see http://troels.arvin.dk/db/rdbms/#select-limit-offset Last modified $Date: 2004/05/18 10:50:17 $
Field Summary | |
---|---|
protected org.j2ee.dao.HibernateDAOAction |
action
|
Fields inherited from interface org.j2ee.dao.HibernateDAOAction |
---|
DELETE, HQL_QUERY, LOAD, SAVE, SQL_QUERY, UPDATE |
Constructor Summary | |
---|---|
AbstractPageByPageAction()
|
|
AbstractPageByPageAction(int fromNo,
int toNo)
|
Method Summary | |
---|---|
org.j2ee.dao.HibernateDAOAction |
getAction()
|
int |
getFrom()
|
java.util.List |
getList()
|
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()
Alias used into the SQL query with the sintax {alias} |
java.lang.Class[] |
getReturnClassForSqlQuery()
Hibernate requieres a class for every object returned by an SQL query |
abstract java.lang.String |
getSQL()
This method must return a valid SQL query, it will receive all the named parameters defined by the action object plus two aditionals parameters named firstRow and lastRow representing the values for the window to be select. |
int |
getTo()
|
void |
handleResults(java.util.List rs)
Called by the Processor after an SQL or HQL succefull operation |
void |
print()
|
void |
setAction(org.j2ee.dao.HibernateDAOAction action)
|
void |
setFrom(int from)
|
void |
setTo(int to)
|
Methods inherited from class org.j2ee.dao.AbstractHibernateDAOAction |
---|
execute, getHQL, getStmtType, getTO, handleResult, handleResult, isCaching, isDelete, isHqlQuery, isLoad, isSave, isSqlQuery, isUpdate, setCaching, setErrorHandler, setStmtType, setTO |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.j2ee.dao.HibernateDAOAction action
Constructor Detail |
public AbstractPageByPageAction()
public AbstractPageByPageAction(int fromNo, int toNo)
Method Detail |
public org.j2ee.dao.HibernateDAOAction getAction()
public void setAction(org.j2ee.dao.HibernateDAOAction action) throws java.lang.Exception
java.lang.Exception
public java.util.List getList()
public abstract java.lang.String getSQL()
getSQL
in interface HibernateDAOAction
getSQL
in class AbstractHibernateDAOAction
public java.lang.Object[] getParameters()
HibernateDAOAction
getParameters
in interface HibernateDAOAction
getParameters
in class AbstractHibernateDAOAction
public java.lang.String[] getNamesForParams()
HibernateDAOAction
getNamesForParams
in interface HibernateDAOAction
getNamesForParams
in class AbstractHibernateDAOAction
public java.lang.Class[] getReturnClassForSqlQuery()
AbstractHibernateDAOAction
getReturnClassForSqlQuery
in interface HibernateDAOAction
getReturnClassForSqlQuery
in class AbstractHibernateDAOAction
public java.lang.String[] getReturnAliasForSqlQuery()
AbstractHibernateDAOAction
getReturnAliasForSqlQuery
in interface HibernateDAOAction
getReturnAliasForSqlQuery
in class AbstractHibernateDAOAction
public final void handleResults(java.util.List rs) throws java.sql.SQLException
AbstractHibernateDAOAction
handleResults
in interface HibernateDAOAction
handleResults
in class AbstractHibernateDAOAction
rs
- List with the object results
java.sql.SQLException
public void print()
public void setFrom(int from)
public int getFrom()
public void setTo(int to)
public int getTo()
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |