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

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


net.sf.hibernate.odmg
Class OQLQuery

java.lang.Object
  extended bynet.sf.hibernate.odmg.OQLQuery
All Implemented Interfaces:
org.odmg.OQLQuery

public class OQLQuery
extends Object
implements org.odmg.OQLQuery

Experimental implementation of the ODMG OQLQuery interface. The supported query language is actually the Hibernate query language and the execute() method returns results in the same format as Session.find().

Warning: this implementation will change significantly as ODMG support matures!


Constructor Summary
OQLQuery()
          Instantiate an OQLQuery for the current transaction.
OQLQuery(Database db)
          Instantiate an OQLQuery for the current transaction.
OQLQuery(Transaction tx)
          Instantiate an OQLQuery for the given transaction.
 
Method Summary
 void bind(Object parameter)
          Bind a value to the next enumerated parameter.
 void create(String queryString)
          Set the Hibernate query string.
 Object execute()
          Get the query results as a collection.
 Query getQuery()
          Get the underlying Hibernate Query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OQLQuery

public OQLQuery(Database db)
Instantiate an OQLQuery for the current transaction.


OQLQuery

public OQLQuery(Transaction tx)
Instantiate an OQLQuery for the given transaction.


OQLQuery

public OQLQuery()
Instantiate an OQLQuery for the current transaction.

Method Detail

getQuery

public Query getQuery()
Get the underlying Hibernate Query.


create

public void create(String queryString)
            throws org.odmg.QueryInvalidException
Set the Hibernate query string. Scalar return values are not supported.

Specified by:
create in interface org.odmg.OQLQuery
Throws:
org.odmg.QueryInvalidException
See Also:
OQLQuery.create(String)

bind

public void bind(Object parameter)
          throws org.odmg.QueryParameterCountInvalidException,
                 org.odmg.QueryParameterTypeInvalidException
Bind a value to the next enumerated parameter. JavaDoc requires a second sentence.

Specified by:
bind in interface org.odmg.OQLQuery
Throws:
org.odmg.QueryParameterCountInvalidException
org.odmg.QueryParameterTypeInvalidException
See Also:
OQLQuery.bind(Object)

execute

public Object execute()
               throws org.odmg.QueryException
Get the query results as a collection. JavaDoc requires a second sentence.

Specified by:
execute in interface org.odmg.OQLQuery
Throws:
org.odmg.QueryException
See Also:
OQLQuery.execute()