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

SQLLoader (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.loader
Class SQLLoader

java.lang.Object
  extended bynet.sf.hibernate.loader.Loader
      extended bynet.sf.hibernate.loader.OuterJoinLoader
          extended bynet.sf.hibernate.loader.SQLLoader

public class SQLLoader
extends OuterJoinLoader

A loader that uses a native SQL query string provided by the user

Author:
Max Andersen
See Also:
SQLLoadable

Nested Class Summary
 
Nested classes inherited from class net.sf.hibernate.loader.OuterJoinLoader
OuterJoinLoader.OuterJoinableAssociation
 
Field Summary
 
Fields inherited from class net.sf.hibernate.loader.OuterJoinLoader
AUTO, classPersisters, EAGER, LAZY, lockModeArray, owners, sql, suffixes
 
Fields inherited from class net.sf.hibernate.loader.Loader
NO_SUFFIX
 
Constructor Summary
SQLLoader(String[] aliases, SQLLoadable[] persisters, SessionFactoryImplementor factory, String sqlQuery, Collection additionalQuerySpaces)
           
 
Method Summary
protected  int bindNamedParameters(PreparedStatement ps, Map namedParams, int start, SessionImplementor session)
          Bind named parameters to the PreparedStatement.
protected  int[] getNamedParameterLocs(String name)
           
 Set getQuerySpaces()
           
protected  Object getResultColumnOrRow(Object[] row, ResultSet rs, SessionImplementor session)
          Get the actual object that is returned in the user-visible result list.
 List list(SessionImplementor session, QueryParameters queryParameters)
           
 String substituteBrackets()
           
 
Methods inherited from class net.sf.hibernate.loader.OuterJoinLoader
containsCollectionPersister, countClassPersisters, createLockModeArray, generateRootAlias, generateTableAlias, getCollectionPersister, getJoinType, getLockModes, getOwners, getPersisters, getSQLString, getSuffixes, isJoinedFetchEnabled, isJoinedFetchEnabledByDefault, mergeOuterJoins, selectString, toOwner, walkCollectionTree, walkTree, whereString
 
Methods inherited from class net.sf.hibernate.loader.Loader
applyLocks, bindPositionalParameters, doList, generateAlias, generateSuffixes, getCollectionOwner, getResultList, getResultSet, isSingleRowLoader, list, loadCollection, loadCollectionBatch, loadEntity, loadEntityBatch, loadSingleRow, postInstantiate, prepareQueryStatement, upgradeLocks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLLoader

public SQLLoader(String[] aliases,
                 SQLLoadable[] persisters,
                 SessionFactoryImplementor factory,
                 String sqlQuery,
                 Collection additionalQuerySpaces)
          throws HibernateException
Method Detail

getQuerySpaces

public Set getQuerySpaces()

list

public List list(SessionImplementor session,
                 QueryParameters queryParameters)
          throws HibernateException,
                 SQLException
Throws:
HibernateException
SQLException

getResultColumnOrRow

protected Object getResultColumnOrRow(Object[] row,
                                      ResultSet rs,
                                      SessionImplementor session)
                               throws SQLException,
                                      HibernateException
Description copied from class: Loader
Get the actual object that is returned in the user-visible result list. This empty implementation merely returns its first argument. This is overridden by some subclasses.

Overrides:
getResultColumnOrRow in class Loader
Throws:
SQLException
HibernateException

substituteBrackets

public String substituteBrackets()
                          throws QueryException
Throws:
QueryException

getNamedParameterLocs

protected int[] getNamedParameterLocs(String name)
                               throws QueryException
Throws:
QueryException

bindNamedParameters

protected int bindNamedParameters(PreparedStatement ps,
                                  Map namedParams,
                                  int start,
                                  SessionImplementor session)
                           throws SQLException,
                                  HibernateException
Description copied from class: Loader
Bind named parameters to the PreparedStatement. This has an empty implementation on this superclass and should be implemented by subclasses (queries) which allow named parameters.

Overrides:
bindNamedParameters in class Loader
Throws:
SQLException
HibernateException