public class PreparedQueryImpl extends Object implements PreparedQuery
PreparedQuery for SQL queries.
PreparedQuery holds the post-compilation and post-execution state of a kernel Query.
The post-execution internal state of a query is appended as a user object
to the user-visible result to maintain the API contract.| Constructor and Description |
|---|
PreparedQueryImpl(String id,
Query compiled)
Construct.
|
PreparedQueryImpl(String id,
String sql,
Query compiled)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getIdentifier()
Get the immutable identifier of this receiver used for
*
cache. |
String |
getLanguage()
Gets the language in which this query is expressed.
|
String |
getOriginalQuery()
Get the original query string which is same as the identifier of this
receiver.
|
Class[] |
getProjectionTypes() |
QueryExpressions[] |
getQueryExpressions() |
String |
getTargetQuery()
Get the target database query.
|
PreparedQueryCache.Exclusion |
initialize(Object result)
Initialize this receiver with post-execution result.
|
boolean |
isInitialized()
Affirms if this receiver has been initialized.
|
Map<Integer,Object> |
reparametrize(Map user,
Broker broker)
Merge the given user parameters with its own parameter.
|
void |
setInto(Query q)
Pours the post-compilation state held by this receiver to the given
query.
|
String |
toString() |
public PreparedQueryImpl(String id, Query compiled)
id - an identifier for this query to be used as cache keycompiled - a compiled querypublic String getIdentifier()
PreparedQuerycache.getIdentifier in interface PreparedQuerypublic String getLanguage()
PreparedQuerygetLanguage in interface PreparedQuerypublic String getOriginalQuery()
getOriginalQuery in interface PreparedQuerypublic String getTargetQuery()
PreparedQuerygetTargetQuery in interface PreparedQuerypublic boolean isInitialized()
PreparedQueryisInitialized in interface PreparedQuerypublic QueryExpressions[] getQueryExpressions()
public Class[] getProjectionTypes()
public void setInto(Query q)
setInto in interface PreparedQueryq - A Query which has been substituted by this receiver and hence
does not have its post-compilation state.public PreparedQueryCache.Exclusion initialize(Object result)
ResultList with
an attached SelectResultObjectProvider as its
user object.initialize in interface PreparedQueryresult - an opaque instance supposed to carry post-execution data such
as target database query, parameters of the query etc.public Map<Integer,Object> reparametrize(Map user, Broker broker)
initialization.reparametrize in interface PreparedQueryuser - the map of parameter key and value set by the user on the
original query.Copyright © 2006–2018 Apache Software Foundation. All rights reserved.