Package org.hibernate.engine.spi
Class SubselectFetch
- java.lang.Object
-
- org.hibernate.engine.spi.SubselectFetch
-
public class SubselectFetch extends Object
-
-
Constructor Summary
Constructors Constructor Description SubselectFetch(String subselectFetchQueryFragment, String alias, Loadable loadable, QueryParameters queryParameters, Set resultingEntityKeys, Map namedParameterLocMap)Construct a SubselectFetch instance using the provided subselect fetch query fragment,subselectFetchQueryFragment.SubselectFetch(String alias, Loadable loadable, QueryParameters queryParameters, Set resultingEntityKeys, Map namedParameterLocMap)Construct a SubselectFetch instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcreateSubselectFetchQueryFragment(QueryParameters queryParameters)Create the subselect fetch query fragment for the providedQueryParameterswith SELECT and ORDER BY clauses removed.MapgetNamedParameterLocMap()QueryParametersgetQueryParameters()SetgetResult()Get the Set of EntityKeysStringtoString()StringtoSubselectString(String ukname)
-
-
-
Constructor Detail
-
SubselectFetch
public SubselectFetch(String alias, Loadable loadable, QueryParameters queryParameters, Set resultingEntityKeys, Map namedParameterLocMap)
Construct a SubselectFetch instance. The subselect fetch query fragment is generated bycreateSubselectFetchQueryFragment(org.hibernate.engine.spi.QueryParameters). If the same value forqueryParametersis to be used when constructing multiple SubselectFetch objects, then it is preferable to generate the subselect fetch query fragment usingcreateSubselectFetchQueryFragment(org.hibernate.engine.spi.QueryParameters), and pass the result as an argument to constructorSubselectFetch(String, String, Loadable, QueryParameters, Set, Map).- Parameters:
alias- - the table alias used in the subselect fetch query fragment (to be generated bycreateSubselectFetchQueryFragment(QueryParameters)that corresponds toloadable;loadable- - theLoadablefor the associated entities to be subselect fetched;queryParameters- - the query parameters;resultingEntityKeys- - theEntityKeyobjects for the entities to be subselect fetched;namedParameterLocMap- - mapping from named parameter to the parameter index located in the subselect fetch query fragment.- See Also:
SubselectFetch(String, String, Loadable, QueryParameters, Set, Map)
-
SubselectFetch
public SubselectFetch(String subselectFetchQueryFragment, String alias, Loadable loadable, QueryParameters queryParameters, Set resultingEntityKeys, Map namedParameterLocMap)
Construct a SubselectFetch instance using the provided subselect fetch query fragment,subselectFetchQueryFragment. It is assumed thatsubselectFetchQueryFragmentis the result of callingcreateSubselectFetchQueryFragment(org.hibernate.engine.spi.QueryParameters)with the same value provided forqueryParameters.- Parameters:
subselectFetchQueryFragment- - the subselect fetch query fragment;alias- - the table alias used insubselectFetchQueryFragmentthat corresponds toloadable;loadable- - theLoadablefor the associated entities to be subselect fetched;queryParameters- - the query parameters;resultingEntityKeys- - theEntityKeyobjects for the entities to be subselect fetched;namedParameterLocMap- - mapping from named parameter to the parameter index located in the subselect fetch query fragment.
-
-
Method Detail
-
createSubselectFetchQueryFragment
public static String createSubselectFetchQueryFragment(QueryParameters queryParameters)
Create the subselect fetch query fragment for the providedQueryParameterswith SELECT and ORDER BY clauses removed.- Parameters:
queryParameters- -the query parameters.- Returns:
- the subselect fetch query fragment.
-
getQueryParameters
public QueryParameters getQueryParameters()
-
getResult
public Set getResult()
Get the Set of EntityKeys
-
getNamedParameterLocMap
public Map getNamedParameterLocMap()
-
-