站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.3 正式版 API 英文文档

CustomQuery (Hibernate API Documentation) - Hibernate 3.2.3 正式版 API 英文文档


org.hibernate.loader.custom
Interface CustomQuery

All Known Implementing Classes:
SQLCustomQuery

public interface CustomQuery

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

Author:
Gavin King, Steve Ebersole

Method Summary
 List getCustomQueryReturns()
          A collection of descriptors describing the JDBC result set to be expected and how to map this result set.
 Map getNamedParameterBindPoints()
          A map representing positions within the supplied query to which we need to bind named parameters.
 Set getQuerySpaces()
          Any query spaces to apply to the query execution.
 String getSQL()
          The SQL query string to be performed.
 

Method Detail

getSQL

public String getSQL()
The SQL query string to be performed.

Returns:
The SQL statement string.

getQuerySpaces

public Set 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:
The query spaces

getNamedParameterBindPoints

public Map 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


getCustomQueryReturns

public List getCustomQueryReturns()
A collection of descriptors describing the JDBC result set to be expected and how to map this result set.

Returns:
List of return descriptors.