2.17.2: 2011-06-17

net.sf.basedb.core.query
Interface HqlQuery

All Superinterfaces:
Query
All Known Subinterfaces:
EntityQuery
All Known Implementing Classes:
AbstractEntityQuery, AbstractHqlQuery, DataQuery, ItemQuery, ReporterScoreQuery

public interface HqlQuery
extends Query

This is a query that is using HQL (Hibernate Query Language) as the query language. All implementors of this interface must return QueryType.HQL from the Query.getQueryType() method.

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2011-02-04 09:25:16 +0100 (Fri, 04 Feb 2011) $

Method Summary
 boolean isCachingResult()
          If the query results are cached or not.
 void setCacheResult(boolean flag)
          Specify if the query results should be cached or not.
 void setEntityParameter(String name, BasicItem value)
          Set the value of an entity parameter.
 void setPermanentEntityParameter(String name, BasicItem value)
          Permanently set the value of an entity parameter.
 
Methods inherited from interface net.sf.basedb.core.query.Query
addAutoJoiner, count, getFirstResult, getMaxResults, getParameterNames, getQueryParameter, getQuerySection, getQueryType, getRootAlias, group, groupPermanent, hasParameterValue, having, havingPermanent, isCounting, isDistinct, isReadonly, isReturningTotalCount, join, joinPermanent, order, orderPermanent, reset, restrict, restrictPermanent, select, selectPermanent, setDistinct, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, toQl
 

Method Detail

setCacheResult

void setCacheResult(boolean flag)
Specify if the query results should be cached or not.

Parameters:
flag - TRUE if the query results should be cached, FALSE otherwise
Throws:
UnsupportedOperationException - If this operation isn't supported by the implementation
Developer info
This option requires that a secondary cache that supports query results are used (ie. EHCache).

isCachingResult

boolean isCachingResult()
If the query results are cached or not.

See Also:
setCacheResult(boolean)

setEntityParameter

void setEntityParameter(String name,
                        BasicItem value)
Set the value of an entity parameter. If the value of this parameter has already been set permanently, an InvalidDataException is thrown.

Parameters:
name - The name of the parameter
value - The value of the parameter
Throws:
UnsupportedOperationException - If this operation isn't supported by the implementation
InvalidDataException - If the value of the parameter has already been permanently set
Since:
2.17

setPermanentEntityParameter

void setPermanentEntityParameter(String name,
                                 BasicItem value)
Permanently set the value of an entity parameter. If the value of this parameter has already been set permanently, an InvalidDataException is thrown.

Parameters:
name - The name of the parameter
value - The value of the parameter
Throws:
UnsupportedOperationException - If this operation isn't supported by the implementation
InvalidDataException - If the value of the parameter has already been permanently set
Since:
2.17

2.17.2: 2011-06-17