public interface QuerySession
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the session and free any and all associated resources
|
FullTextQuery |
createFullTextQuery()
Create and return a full text query object.
|
Query |
createQuery(java.lang.String queryString)
Create and return a Query object based on the specified query string.
|
QuerySessionContext |
getSessionContext()
A context is used when creating every query session.
|
QuerySessionContext getSessionContext()
Query createQuery(java.lang.String queryString) throws QuerySessionException, QueryException
queryString
- The query to be executed.QueryException
- on if the query could not be constructed.QuerySessionException
- if the session is in an invalid state.FullTextQuery createFullTextQuery() throws QuerySessionException, QueryException, UnsupportedFeatureException
QueryException
- on if the full text query could not be constructed.QuerySessionException
- if the session is in an invalid state.UnsupportedFeatureException
- if full text search is not supported by the query implementation.void close() throws QuerySessionException
close
in interface java.lang.AutoCloseable
QuerySessionException
- if an error occurs while closing the session.