|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jasperreports.engine.query.JRAbstractQueryExecuter net.sf.jasperreports.engine.query.JRHibernateQueryExecuter
public class JRHibernateQueryExecuter
HQL query executer that uses Hibernate 3.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.query.JRAbstractQueryExecuter |
---|
JRAbstractQueryExecuter.QueryParameter |
Field Summary |
---|
Fields inherited from class net.sf.jasperreports.engine.query.JRAbstractQueryExecuter |
---|
CLAUSE_POSITION_ID, clauseFunctions, dataset |
Constructor Summary | |
---|---|
JRHibernateQueryExecuter(JasperReportsContext jasperReportsContext,
JRDataset dataset,
java.util.Map<java.lang.String,? extends JRValueParameter> parameters)
|
|
JRHibernateQueryExecuter(JRDataset dataset,
java.util.Map<java.lang.String,? extends JRValueParameter> parameters)
Deprecated. Replaced by JRHibernateQueryExecuter(JasperReportsContext, JRDataset, Map) . |
Method Summary | |
---|---|
boolean |
cancelQuery()
Cancels the query if it's currently running. |
void |
clearCache()
|
void |
close()
Closes the scrollable result when scroll execution type is used. |
void |
closeScrollableResults()
Closes the scrollable results of the query. |
JRDataSource |
createDatasource()
Creates an instance of JRHibernateListDataSource ,
JRHibernateIterateDataSource or
JRHibernateScrollDataSource , depending on the |
protected void |
createQuery(java.lang.String queryString)
Creates the Hibernate query object. |
protected JRDataSource |
createResultDatasource()
Creates a data source out of the query result. |
JRDataset |
getDataset()
Returns the dataset for which the query executer has been created. |
protected java.lang.String |
getHqlParameterName(java.lang.String parameterName)
|
protected java.lang.String |
getParameterReplacement(java.lang.String parameterName)
Returns the replacement text for a query parameter. |
java.lang.String[] |
getReturnAliases()
Returns the aliases of the HQL query. |
org.hibernate.type.Type[] |
getReturnTypes()
Returns the return types of the HQL query. |
java.util.Iterator<?> |
iterate()
Runs the query by calling org.hibernate.Query.iterate() . |
java.util.List<?> |
list()
Runs the query by calling org.hibernate.Query.list() . |
java.util.List<?> |
list(int firstIndex,
int resultCount)
Returns a page of the query results by calling org.hibernate.Query.iterate() . |
org.hibernate.ScrollableResults |
scroll()
Runs the query by calling org.hibernate.Query.scroll() . |
protected void |
setParameter(JRValueParameter parameter)
Binds a parameter value to a query parameter. |
protected void |
setParameters()
Binds values for all the query parameters. |
protected void |
setQueryRunning(boolean queryRunning)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JRHibernateQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, java.util.Map<java.lang.String,? extends JRValueParameter> parameters)
public JRHibernateQueryExecuter(JRDataset dataset, java.util.Map<java.lang.String,? extends JRValueParameter> parameters)
JRHibernateQueryExecuter(JasperReportsContext, JRDataset, Map)
.
Method Detail |
---|
public JRDataSource createDatasource() throws JRException
JRHibernateListDataSource
,
JRHibernateIterateDataSource
or
JRHibernateScrollDataSource
, depending on the
JRDataSource
wrapping the query execution result.
JRException
protected JRDataSource createResultDatasource()
protected void createQuery(java.lang.String queryString)
PARAMETER_HIBERNATE_FILTER_COLLECTION
is not null, then a filter query is created using the value of the parameter as the collection.
queryString
- the query stringprotected void setParameters()
protected void setParameter(JRValueParameter parameter)
parameter
- the report parameterpublic void close()
public void closeScrollableResults()
public boolean cancelQuery() throws JRException
JRQueryExecuter
true
if and only if the query was running and it has been canceled
JRException
protected java.lang.String getParameterReplacement(java.lang.String parameterName)
JRAbstractQueryExecuter
getParameterReplacement
in class JRAbstractQueryExecuter
parameterName
- the parameter name
JRQueryChunk.TYPE_PARAMETER
protected java.lang.String getHqlParameterName(java.lang.String parameterName)
public org.hibernate.type.Type[] getReturnTypes()
public java.lang.String[] getReturnAliases()
public JRDataset getDataset()
public java.util.List<?> list()
org.hibernate.Query.list()
.
All the result rows are returned.
protected void setQueryRunning(boolean queryRunning)
public java.util.List<?> list(int firstIndex, int resultCount)
org.hibernate.Query.iterate()
.
firstIndex
- the index of the first row to returnresultCount
- the number of rows to return
public java.util.Iterator<?> iterate()
org.hibernate.Query.iterate()
.
public org.hibernate.ScrollableResults scroll()
org.hibernate.Query.scroll()
.
public void clearCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |