<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.6.0_11) on Wed Jul 20 09:13:18 CDT 2011 --> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<TITLE> | |
PreparedQuery (OpenJPA Parent POM 2.1.1 API) | |
</TITLE> | |
<META NAME="date" CONTENT="2011-07-20"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
if (location.href.indexOf('is-external=true') == -1) { | |
parent.document.title="PreparedQuery (OpenJPA Parent POM 2.1.1 API)"; | |
} | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<HR> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PreparedQuery.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/openjpa/kernel/PNonTransState.html" title="class in org.apache.openjpa.kernel"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html" title="interface in org.apache.openjpa.kernel"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/openjpa/kernel/PreparedQuery.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="PreparedQuery.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.openjpa.kernel</FONT> | |
<BR> | |
Interface PreparedQuery</H2> | |
<DL> | |
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.html" title="class in org.apache.openjpa.jdbc.kernel">PreparedQueryImpl</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public interface <B>PreparedQuery</B></DL> | |
</PRE> | |
<P> | |
A prepared query associates a compiled query to a <em>parsed state</em> that | |
can be executed possibly with more efficiency. An obvious example is to | |
associate a compiled query to an executable SQL string. | |
The query expressed in target language can be executed directly bypassing | |
the critical translation cost to the data store target language on every | |
execution. | |
As the subsequent execution of a cached query will bypass normal query | |
compilation, the post-compilation state of the original query is captured by | |
this receiver to be transferred to the executable query instance. | |
This receiver must not hold any context-sensitive reference or dependency. | |
Because the whole idea of preparing a query (for a cost) is to be able to | |
execute the same logical query in different persistence contexts. However, | |
a prepared query may not be valid when some parameters of execution context | |
such as lock group or fetch plan changes in a way that will change the target | |
query. Refer to <A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html" title="interface in org.apache.openjpa.kernel"><CODE>PreparedQueryCache</CODE></A> for invalidation mechanism on | |
possible actions under such circumstances. | |
The query execution model <em>does</em> account for context changes that do | |
not impact the target query e.g. bind variables. | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>2.0.0</DD> | |
<DT><B>Author:</B></DT> | |
<DD>Pinaki Poddar</DD> | |
</DL> | |
<HR> | |
<P> | |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html#getIdentifier()">getIdentifier</A></B>()</CODE> | |
<BR> | |
Get the immutable identifier of this receiver used for | |
* <A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html" title="interface in org.apache.openjpa.kernel"><CODE>cache</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html#getLanguage()">getLanguage</A></B>()</CODE> | |
<BR> | |
Gets the language in which this query is expressed.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html#getOriginalQuery()">getOriginalQuery</A></B>()</CODE> | |
<BR> | |
Get the original query.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html#getTargetQuery()">getTargetQuery</A></B>()</CODE> | |
<BR> | |
Get the target database query.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html#initialize(java.lang.Object)">initialize</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> o)</CODE> | |
<BR> | |
Initialize from the given argument.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html#isInitialized()">isInitialized</A></B>()</CODE> | |
<BR> | |
Affirms if this receiver has been initialized.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html#reparametrize(java.util.Map, org.apache.openjpa.kernel.Broker)">reparametrize</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A> user, | |
<A HREF="../../../../org/apache/openjpa/kernel/Broker.html" title="interface in org.apache.openjpa.kernel">Broker</A> broker)</CODE> | |
<BR> | |
Get the list of parameters in a map where an entry represents a parameter | |
key and value after replacing with the given user parameters.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/kernel/PreparedQuery.html#setInto(org.apache.openjpa.kernel.Query)">setInto</A></B>(<A HREF="../../../../org/apache/openjpa/kernel/Query.html" title="interface in org.apache.openjpa.kernel">Query</A> q)</CODE> | |
<BR> | |
Fill in the post-compilation state of the given Query.</TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="getIdentifier()"><!-- --></A><H3> | |
getIdentifier</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getIdentifier</B>()</PRE> | |
<DL> | |
<DD>Get the immutable identifier of this receiver used for | |
* <A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html" title="interface in org.apache.openjpa.kernel"><CODE>cache</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getTargetQuery()"><!-- --></A><H3> | |
getTargetQuery</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getTargetQuery</B>()</PRE> | |
<DL> | |
<DD>Get the target database query. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getOriginalQuery()"><!-- --></A><H3> | |
getOriginalQuery</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getOriginalQuery</B>()</PRE> | |
<DL> | |
<DD>Get the original query. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getLanguage()"><!-- --></A><H3> | |
getLanguage</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getLanguage</B>()</PRE> | |
<DL> | |
<DD>Gets the language in which this query is expressed. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setInto(org.apache.openjpa.kernel.Query)"><!-- --></A><H3> | |
setInto</H3> | |
<PRE> | |
void <B>setInto</B>(<A HREF="../../../../org/apache/openjpa/kernel/Query.html" title="interface in org.apache.openjpa.kernel">Query</A> q)</PRE> | |
<DL> | |
<DD>Fill in the post-compilation state of the given Query. This must be | |
called when a original query is substituted by this receiver and hence | |
the original query is not parsed or compiled. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>q</CODE> - A Query which has been substituted by this receiver and hence | |
does not have its post-compilation state.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="initialize(java.lang.Object)"><!-- --></A><H3> | |
initialize</H3> | |
<PRE> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.Exclusion.html" title="interface in org.apache.openjpa.kernel">PreparedQueryCache.Exclusion</A> <B>initialize</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> o)</PRE> | |
<DL> | |
<DD>Initialize from the given argument. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>o</CODE> - an opaque instance supposed to carry post-execution data such | |
as target database query, parameters of the query etc. | |
<DT><B>Returns:</B><DD>Exclusion if this receiver can initialize itself from the given | |
argument. false otherwise.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isInitialized()"><!-- --></A><H3> | |
isInitialized</H3> | |
<PRE> | |
boolean <B>isInitialized</B>()</PRE> | |
<DL> | |
<DD>Affirms if this receiver has been initialized. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="reparametrize(java.util.Map, org.apache.openjpa.kernel.Broker)"><!-- --></A><H3> | |
reparametrize</H3> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A> <B>reparametrize</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A> user, | |
<A HREF="../../../../org/apache/openjpa/kernel/Broker.html" title="interface in org.apache.openjpa.kernel">Broker</A> broker)</PRE> | |
<DL> | |
<DD>Get the list of parameters in a map where an entry represents a parameter | |
key and value after replacing with the given user parameters. | |
Must be invoked after initialize(). | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>user</CODE> - the map of parameter key and value set by the user on the | |
original query.</DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PreparedQuery.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/openjpa/kernel/PNonTransState.html" title="class in org.apache.openjpa.kernel"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/openjpa/kernel/PreparedQueryCache.html" title="interface in org.apache.openjpa.kernel"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/openjpa/kernel/PreparedQuery.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="PreparedQuery.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright © 2006-2011 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. | |
</BODY> | |
</HTML> |