Top Description Methods
org.hibernate.loader.custom

public Interface CustomQuery

Known Direct Implementers
org.hibernate.loader.custom.sql.SQLCustomQuery
Imports
java.util.Map, .Set, .List

Extension point allowing any SQL query with named and positional parameters to be executed by Hibernate, returning managed entities, collections and simple scalar values.
Authors
Gavin King, Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public List<E>

Returns:

List of return descriptors.
getCustomQueryReturns
()

A collection of descriptors describing the JDBC result set to be expected and how to map this result set.

public Map<K, V>
getNamedParameterBindPoints()

A map representing positions within the supplied query to which we need to bind named parameters.

public Set<E>

Returns:

The query spaces
getQuerySpaces
()

Any query spaces to apply to the query execution.

public String

Returns:

The SQL statement string.
getSQL
()

The SQL query string to be performed.

Method Detail

getCustomQueryReturnsback to summary
public List<E> getCustomQueryReturns()

A collection of descriptors describing the JDBC result set to be expected and how to map this result set.

Returns:List<E>

List of return descriptors.

getNamedParameterBindPointsback to summary
public Map<K, V> getNamedParameterBindPoints()

A map representing positions within the supplied query to which we need to bind named parameters.

Optional, may return null if no named parameters.

The structure of the returned map (if one) as follows:

  1. The keys into the map are the named parameter names
  2. The corresponding value is either an Integer if the parameter occurs only once in the query; or a List of Integers if the parameter occurs more than once
getQuerySpacesback to summary
public Set<E> getQuerySpaces()

Any query spaces to apply to the query execution. Query spaces are used in Hibernate's auto-flushing mechanism to determine which entities need to be checked for pending changes.

Returns:Set<E>

The query spaces

getSQLback to summary
public String getSQL()

The SQL query string to be performed.

Returns:String

The SQL statement string.