|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.kernel.PreparedQueryImpl
public class PreparedQueryImpl
Implements 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 Summary | |
---|---|
PreparedQueryImpl(String id,
Query compiled)
Construct. |
|
PreparedQueryImpl(String id,
String sql,
Query compiled)
Construct. |
Method Summary | |
---|---|
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()
|
(package private) SelectImpl |
getSelect()
|
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. |
(package private) void |
setParameters(List list)
|
(package private) void |
setTargetQuery(String sql)
|
(package private) void |
setUserParameterPositions(List list)
Marks the positions and keys of user parameters. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PreparedQueryImpl(String id, Query compiled)
id
- an identifier for this query to be used as cache keycompiled
- a compiled querypublic PreparedQueryImpl(String id, String sql, Query compiled)
id
- an identifier for this query to be used as cache keycorresponding
- data store language query stringcompiled
- a compiled queryMethod Detail |
---|
public String getIdentifier()
PreparedQuery
cache
.
getIdentifier
in interface PreparedQuery
public String getLanguage()
PreparedQuery
getLanguage
in interface PreparedQuery
public String getOriginalQuery()
getOriginalQuery
in interface PreparedQuery
public String getTargetQuery()
PreparedQuery
getTargetQuery
in interface PreparedQuery
void setTargetQuery(String sql)
public boolean isInitialized()
PreparedQuery
isInitialized
in interface PreparedQuery
public QueryExpressions[] getQueryExpressions()
public Class[] getProjectionTypes()
public void setInto(Query q)
setInto
in interface PreparedQuery
q
- 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 PreparedQuery
result
- 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 PreparedQuery
user
- the map of parameter key and value set by the user on the
original query.
void setUserParameterPositions(List list)
list
- even elements are numbers representing the position of a
user parameter in the _param list. Odd elements are the user parameter
key. A user parameter key may appear more than once.void setParameters(List list)
SelectImpl getSelect()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |