| <!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.5.0_06) on Wed Jul 19 14:42:41 EDT 2006 --> |
| <TITLE> |
| DataContext (Cayenne API Documentation - v.1.2) |
| </TITLE> |
| |
| <META NAME="keywords" CONTENT="org.objectstyle.cayenne.access.DataContext class"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../objectstyle-javadoc.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| parent.document.title="DataContext (Cayenne API Documentation - v.1.2)"; |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| |
| |
| <!-- ========= 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="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-files/index-1.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/objectstyle/cayenne/access/ConnectionLogger.html" title="class in org.objectstyle.cayenne.access"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContextDelegate.html" title="interface in org.objectstyle.cayenne.access"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/objectstyle/cayenne/access/DataContext.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="DataContext.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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.objectstyle.cayenne.access</FONT> |
| <BR> |
| Class DataContext</H2> |
| <PRE> |
| java.lang.Object |
| <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.objectstyle.cayenne.access.DataContext</B> |
| </PRE> |
| <DL> |
| <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, <A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A>, <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A>, <A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE>public class <B>DataContext</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A>, <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A>, <A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A>, java.io.Serializable</DL> |
| </PRE> |
| |
| <P> |
| Class that provides applications with access to Cayenne persistence features. In most |
| cases this is the only access class directly used in the application. |
| <p> |
| Most common DataContext use pattern is to create one DataContext per session. "Session" |
| may be a an HttpSession in a web application, or any other similar concept in a |
| multiuser application. |
| </p> |
| <p> |
| DataObjects are registered with DataContext either implicitly when they are fetched via |
| a query, or read via a relationship from another object, or explicitly via calling |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createAndRegisterNewObject(java.lang.Class)"><CODE>createAndRegisterNewObject(Class)</CODE></A>during new DataObject creation. DataContext |
| tracks changes made to its DataObjects in memory, and flushes them to the database when |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#commitChanges()"><CODE>commitChanges()</CODE></A>is called. Until DataContext is committed, changes made to its |
| objects are not visible in other DataContexts. |
| </p> |
| <p> |
| Each DataObject can belong only to a single DataContext. To create a replica of an |
| object from a different DataContext in a local context, use |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#localObject(org.objectstyle.cayenne.ObjectId, org.objectstyle.cayenne.Persistent)"><CODE>localObject(ObjectId, Persistent)</CODE></A> method. |
| <p> |
| <i>For more information see <a href="../../../../../../userguide/index.html" |
| target="_top">Cayenne User Guide. </a> </i> |
| </p> |
| <p> |
| <i>Note that all QueryEngine interface methods are deprecated in the DataContext. Since |
| 1.2 release DataContext implements ObjectContext and DataChannel interfaces.</i> |
| </p> |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Author:</B></DT> |
| <DD>Andrus Adamchik</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.objectstyle.cayenne.access.DataContext">Serialized Form</A></DL> |
| <HR> |
| |
| <P> |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_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>Field Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#channel">channel</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/objectstyle/cayenne/event/EventSubject.html" title="class in org.objectstyle.cayenne.event">EventSubject</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#DID_COMMIT">DID_COMMIT</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/objectstyle/cayenne/event/EventSubject.html" title="class in org.objectstyle.cayenne.event">EventSubject</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#DID_ROLLBACK">DID_ROLLBACK</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../org/objectstyle/cayenne/map/EntityResolver.html" title="class in org.objectstyle.cayenne.map">EntityResolver</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#entityResolver">entityResolver</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#lazyInitParentDomainName">lazyInitParentDomainName</A></B></CODE> |
| |
| <BR> |
| Stores the name of parent DataDomain.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected org.objectstyle.cayenne.access.DataContextMergeHandler</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#mergeHandler">mergeHandler</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../org/objectstyle/cayenne/access/ObjectStore.html" title="class in org.objectstyle.cayenne.access">ObjectStore</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#objectStore">objectStore</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected static java.lang.ThreadLocal</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#threadDataContext">threadDataContext</A></B></CODE> |
| |
| <BR> |
| A holder of a DataContext bound to the current thread.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.util.Map</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#userProperties">userProperties</A></B></CODE> |
| |
| <BR> |
| Stores user defined properties associated with this DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#usingSharedSnaphsotCache">usingSharedSnaphsotCache</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#validatingObjectsOnCommit">validatingObjectsOnCommit</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/objectstyle/cayenne/event/EventSubject.html" title="class in org.objectstyle.cayenne.event">EventSubject</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#WILL_COMMIT">WILL_COMMIT</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| <A NAME="fields_inherited_from_class_org.objectstyle.cayenne.DataChannel"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Fields inherited from interface org.objectstyle.cayenne.<A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#FLUSH_CASCADE_SYNC">FLUSH_CASCADE_SYNC</A>, <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#FLUSH_NOCASCADE_SYNC">FLUSH_NOCASCADE_SYNC</A>, <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#GRAPH_CHANGED_SUBJECT">GRAPH_CHANGED_SUBJECT</A>, <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#GRAPH_FLUSHED_SUBJECT">GRAPH_FLUSHED_SUBJECT</A>, <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#GRAPH_ROLLEDBACK_SUBJECT">GRAPH_ROLLEDBACK_SUBJECT</A>, <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#ROLLBACK_CASCADE_SYNC">ROLLBACK_CASCADE_SYNC</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_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>Constructor Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#DataContext()">DataContext</A></B>()</CODE> |
| |
| <BR> |
| Creates a new DataContext that is not attached to the Cayenne stack.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#DataContext(org.objectstyle.cayenne.DataChannel, org.objectstyle.cayenne.access.ObjectStore)">DataContext</A></B>(<A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A> channel, |
| <A HREF="../../../../org/objectstyle/cayenne/access/ObjectStore.html" title="class in org.objectstyle.cayenne.access">ObjectStore</A> objectStore)</CODE> |
| |
| <BR> |
| Creates a new DataContext with parent DataChannel and ObjectStore.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#DataContext(org.objectstyle.cayenne.access.QueryEngine, org.objectstyle.cayenne.access.ObjectStore)">DataContext</A></B>(<A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A> parent, |
| <A HREF="../../../../org/objectstyle/cayenne/access/ObjectStore.html" title="class in org.objectstyle.cayenne.access">ObjectStore</A> objectStore)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2 - use <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#DataContext(org.objectstyle.cayenne.DataChannel, org.objectstyle.cayenne.access.ObjectStore)"><CODE>DataContext(DataChannel, ObjectStore)</CODE></A> |
| constructor instead. Note that DataDomain is both a DataChannel and a |
| QueryEngine, so you may need to do a cast: |
| <code>new DataContext((DataChannel) domain, objectStore)</code>.</I></TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== 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>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#bindThreadDataContext(org.objectstyle.cayenne.access.DataContext)">bindThreadDataContext</A></B>(<A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> context)</CODE> |
| |
| <BR> |
| Binds a DataContext to the current thread.</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/objectstyle/cayenne/access/DataContext.html#commitChanges()">commitChanges</A></B>()</CODE> |
| |
| <BR> |
| Synchronizes object graph with the database.</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/objectstyle/cayenne/access/DataContext.html#commitChanges(org.apache.log4j.Level)">commitChanges</A></B>(org.apache.log4j.Level logLevel)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>Since 1.2, use <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#commitChanges()"><CODE>commitChanges()</CODE></A> instead.</I></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/objectstyle/cayenne/access/DataContext.html#commitChangesToParent()">commitChangesToParent</A></B>()</CODE> |
| |
| <BR> |
| "Flushes" the changes to the parent <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne"><CODE>DataChannel</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createAndRegisterNewObject(java.lang.Class)">createAndRegisterNewObject</A></B>(java.lang.Class objectClass)</CODE> |
| |
| <BR> |
| Instantiates new object and registers it with itself.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createAndRegisterNewObject(java.lang.String)">createAndRegisterNewObject</A></B>(java.lang.String objEntityName)</CODE> |
| |
| <BR> |
| Instantiates new object and registers it with itself.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createChildDataContext()">createChildDataContext</A></B>()</CODE> |
| |
| <BR> |
| Creates and returns a new child DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createDataContext()">createDataContext</A></B>()</CODE> |
| |
| <BR> |
| Factory method that creates and returns a new instance of DataContext based on |
| default domain.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createDataContext(boolean)">createDataContext</A></B>(boolean useSharedCache)</CODE> |
| |
| <BR> |
| Factory method that creates and returns a new instance of DataContext based on |
| default domain.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createDataContext(java.lang.String)">createDataContext</A></B>(java.lang.String domainName)</CODE> |
| |
| <BR> |
| Factory method that creates and returns a new instance of DataContext using named |
| domain as its parent.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createDataContext(java.lang.String, boolean)">createDataContext</A></B>(java.lang.String domainName, |
| boolean useSharedCache)</CODE> |
| |
| <BR> |
| Creates and returns new DataContext that will use a named DataDomain as its parent.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/DataRow.html" title="class in org.objectstyle.cayenne">DataRow</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#currentSnapshot(org.objectstyle.cayenne.DataObject)">currentSnapshot</A></B>(<A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> object)</CODE> |
| |
| <BR> |
| Returns a DataRow reflecting current, possibly uncommitted, object state.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.Collection</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#deletedObjects()">deletedObjects</A></B>()</CODE> |
| |
| <BR> |
| Returns a list of objects that are registered with this DataContext and have a |
| state PersistenceState.DELETED</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/objectstyle/cayenne/access/DataContext.html#deleteObject(org.objectstyle.cayenne.Persistent)">deleteObject</A></B>(<A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> object)</CODE> |
| |
| <BR> |
| Schedules an object for deletion on the next commit of this DataContext.</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/objectstyle/cayenne/access/DataContext.html#deleteObjects(java.util.Collection)">deleteObjects</A></B>(java.util.Collection objects)</CODE> |
| |
| <BR> |
| Schedules all objects in the collection for deletion on the next commit of this |
| DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getChannel()">getChannel</A></B>()</CODE> |
| |
| <BR> |
| Returns parent DataChannel, that is normally a DataDomain or another DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.Collection</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getDataMaps()">getDataMaps</A></B>()</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2. Use 'getEntityResolver().getDataMaps()' instead.</I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/access/DataContextDelegate.html" title="interface in org.objectstyle.cayenne.access">DataContextDelegate</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getDelegate()">getDelegate</A></B>()</CODE> |
| |
| <BR> |
| Returns a delegate currently associated with this DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/map/EntityResolver.html" title="class in org.objectstyle.cayenne.map">EntityResolver</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getEntityResolver()">getEntityResolver</A></B>()</CODE> |
| |
| <BR> |
| Returns EntityResolver.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/event/EventManager.html" title="class in org.objectstyle.cayenne.event">EventManager</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getEventManager()">getEventManager</A></B>()</CODE> |
| |
| <BR> |
| Returns EventManager associated with the ObjectStore.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/graph/GraphManager.html" title="interface in org.objectstyle.cayenne.graph">GraphManager</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getGraphManager()">getGraphManager</A></B>()</CODE> |
| |
| <BR> |
| Returns this context's ObjectStore.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/access/ObjectStore.html" title="class in org.objectstyle.cayenne.access">ObjectStore</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getObjectStore()">getObjectStore</A></B>()</CODE> |
| |
| <BR> |
| Returns ObjectStore associated with this DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getParent()">getParent</A></B>()</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2. Use 'getParentDataDomain()' or 'getChannel()' instead.</I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/access/DataDomain.html" title="class in org.objectstyle.cayenne.access">DataDomain</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getParentDataDomain()">getParentDataDomain</A></B>()</CODE> |
| |
| <BR> |
| Returns a DataDomain used by this DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getThreadDataContext()">getThreadDataContext</A></B>()</CODE> |
| |
| <BR> |
| Returns the DataContext bound to the current thread.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.util.Map</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getUserProperties()">getUserProperties</A></B>()</CODE> |
| |
| <BR> |
| Returns a map of user-defined properties associated with this DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getUserProperty(java.lang.String)">getUserProperty</A></B>(java.lang.String key)</CODE> |
| |
| <BR> |
| Returns a user-defined property previously set via 'setUserProperty'.</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/objectstyle/cayenne/access/DataContext.html#hasChanges()">hasChanges</A></B>()</CODE> |
| |
| <BR> |
| Returns <code>true</code> if there are any modified, deleted or new objects |
| registered with this DataContext, <code>false</code> otherwise.</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/objectstyle/cayenne/access/DataContext.html#invalidateObjects(java.util.Collection)">invalidateObjects</A></B>(java.util.Collection dataObjects)</CODE> |
| |
| <BR> |
| "Invalidates" a Collection of DataObject.</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/objectstyle/cayenne/access/DataContext.html#isTransactionEventsEnabled()">isTransactionEventsEnabled</A></B>()</CODE> |
| |
| <BR> |
| </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/objectstyle/cayenne/access/DataContext.html#isUsingSharedSnapshotCache()">isUsingSharedSnapshotCache</A></B>()</CODE> |
| |
| <BR> |
| Returns <code>true</code> if the ObjectStore uses shared cache of a parent |
| DataDomain.</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/objectstyle/cayenne/access/DataContext.html#isValidatingObjectsOnCommit()">isValidatingObjectsOnCommit</A></B>()</CODE> |
| |
| <BR> |
| Returns whether this DataContext performs object validation before commit is |
| executed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#localObject(org.objectstyle.cayenne.ObjectId, org.objectstyle.cayenne.Persistent)">localObject</A></B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectId.html" title="class in org.objectstyle.cayenne">ObjectId</A> id, |
| <A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> prototype)</CODE> |
| |
| <BR> |
| Returns an object local to this DataContext and matching the ObjectId.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.List</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#localObjects(java.util.List)">localObjects</A></B>(java.util.List objects)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2 - use <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#localObject(org.objectstyle.cayenne.ObjectId, org.objectstyle.cayenne.Persistent)"><CODE>localObject(ObjectId, Persistent)</CODE></A> to specify |
| how each local object should be handled.</I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/access/DataNode.html" title="class in org.objectstyle.cayenne.access">DataNode</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#lookupDataNode(org.objectstyle.cayenne.map.DataMap)">lookupDataNode</A></B>(<A HREF="../../../../org/objectstyle/cayenne/map/DataMap.html" title="class in org.objectstyle.cayenne.map">DataMap</A> dataMap)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2 DataContext's QueryEngine implementation is replaced by |
| DataChannel. Use "getParentDataDomain().lookupDataNode(..)".</I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.Collection</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#modifiedObjects()">modifiedObjects</A></B>()</CODE> |
| |
| <BR> |
| Returns a list of objects that are registered with this DataContext and have a |
| state PersistenceState.MODIFIED</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#newObject(java.lang.Class)">newObject</A></B>(java.lang.Class persistentClass)</CODE> |
| |
| <BR> |
| Creates and registers new persistent object.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.Collection</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#newObjects()">newObjects</A></B>()</CODE> |
| |
| <BR> |
| Returns a list of objects that are registered with this DataContext and have a |
| state PersistenceState.NEW</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#objectFromDataRow(java.lang.Class, org.objectstyle.cayenne.DataRow, boolean)">objectFromDataRow</A></B>(java.lang.Class objectClass, |
| <A HREF="../../../../org/objectstyle/cayenne/DataRow.html" title="class in org.objectstyle.cayenne">DataRow</A> dataRow, |
| boolean refresh)</CODE> |
| |
| <BR> |
| Creates a DataObject from DataRow.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.List</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#objectsFromDataRows(java.lang.Class, java.util.List, boolean, boolean)">objectsFromDataRows</A></B>(java.lang.Class objectClass, |
| java.util.List dataRows, |
| boolean refresh, |
| boolean resolveInheritanceHierarchy)</CODE> |
| |
| <BR> |
| Converts a list of DataRows to a List of DataObject registered with this |
| DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.List</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#objectsFromDataRows(org.objectstyle.cayenne.map.ObjEntity, java.util.List, boolean, boolean)">objectsFromDataRows</A></B>(<A HREF="../../../../org/objectstyle/cayenne/map/ObjEntity.html" title="class in org.objectstyle.cayenne.map">ObjEntity</A> entity, |
| java.util.List dataRows, |
| boolean refresh, |
| boolean resolveInheritanceHierarchy)</CODE> |
| |
| <BR> |
| Converts a list of data rows to a list of DataObjects.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/QueryResponse.html" title="interface in org.objectstyle.cayenne">QueryResponse</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#onQuery(org.objectstyle.cayenne.ObjectContext, org.objectstyle.cayenne.query.Query)">onQuery</A></B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A> context, |
| <A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</CODE> |
| |
| <BR> |
| An implementation of a <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne"><CODE>DataChannel</CODE></A> method that is used by child contexts to |
| execute queries.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/graph/GraphDiff.html" title="interface in org.objectstyle.cayenne.graph">GraphDiff</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#onSync(org.objectstyle.cayenne.ObjectContext, org.objectstyle.cayenne.graph.GraphDiff, int)">onSync</A></B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A> originatingContext, |
| <A HREF="../../../../org/objectstyle/cayenne/graph/GraphDiff.html" title="interface in org.objectstyle.cayenne.graph">GraphDiff</A> changes, |
| int syncType)</CODE> |
| |
| <BR> |
| An implementation of a <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne"><CODE>DataChannel</CODE></A> method that is used by child contexts to |
| synchronize state with this context.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/QueryResponse.html" title="interface in org.objectstyle.cayenne">QueryResponse</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#performGenericQuery(org.objectstyle.cayenne.query.Query)">performGenericQuery</A></B>(<A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</CODE> |
| |
| <BR> |
| Executes a query returning a generic response.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/access/ResultIterator.html" title="interface in org.objectstyle.cayenne.access">ResultIterator</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#performIteratedQuery(org.objectstyle.cayenne.query.Query)">performIteratedQuery</A></B>(<A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</CODE> |
| |
| <BR> |
| Performs a single database select query returning result as a ResultIterator.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int[]</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#performNonSelectingQuery(org.objectstyle.cayenne.query.Query)">performNonSelectingQuery</A></B>(<A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</CODE> |
| |
| <BR> |
| Performs a single database query that does not select rows.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int[]</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#performNonSelectingQuery(java.lang.String)">performNonSelectingQuery</A></B>(java.lang.String queryName)</CODE> |
| |
| <BR> |
| Performs a named mapped query that does not select rows.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int[]</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#performNonSelectingQuery(java.lang.String, java.util.Map)">performNonSelectingQuery</A></B>(java.lang.String queryName, |
| java.util.Map parameters)</CODE> |
| |
| <BR> |
| Performs a named mapped non-selecting query using a map of 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/objectstyle/cayenne/access/DataContext.html#performQueries(java.util.Collection, org.objectstyle.cayenne.access.OperationObserver)">performQueries</A></B>(java.util.Collection queries, |
| <A HREF="../../../../org/objectstyle/cayenne/access/OperationObserver.html" title="interface in org.objectstyle.cayenne.access">OperationObserver</A> callback)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2 DataContext's QueryEngine implementation is replaced by |
| DataChannel.</I></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/objectstyle/cayenne/access/DataContext.html#performQueries(java.util.Collection, org.objectstyle.cayenne.access.OperationObserver, org.objectstyle.cayenne.access.Transaction)">performQueries</A></B>(java.util.Collection queries, |
| <A HREF="../../../../org/objectstyle/cayenne/access/OperationObserver.html" title="interface in org.objectstyle.cayenne.access">OperationObserver</A> callback, |
| <A HREF="../../../../org/objectstyle/cayenne/access/Transaction.html" title="class in org.objectstyle.cayenne.access">Transaction</A> transaction)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2. Use Transaction.bindThreadTransaction(..) to provide custom |
| transactions, besides DataContext's QueryEngine implementation is |
| replaced by DataChannel.</I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.List</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#performQuery(org.objectstyle.cayenne.query.Query)">performQuery</A></B>(<A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</CODE> |
| |
| <BR> |
| Performs a single selecting query.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.List</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#performQuery(java.lang.String, boolean)">performQuery</A></B>(java.lang.String queryName, |
| boolean expireCachedLists)</CODE> |
| |
| <BR> |
| Returns a list of objects or DataRows for a named query stored in one of the |
| DataMaps.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.List</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#performQuery(java.lang.String, java.util.Map, boolean)">performQuery</A></B>(java.lang.String queryName, |
| java.util.Map parameters, |
| boolean expireCachedLists)</CODE> |
| |
| <BR> |
| Returns a list of objects or DataRows for a named query stored in one of the |
| DataMaps.</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/objectstyle/cayenne/access/DataContext.html#prefetchRelationships(org.objectstyle.cayenne.query.SelectQuery, java.util.List)">prefetchRelationships</A></B>(<A HREF="../../../../org/objectstyle/cayenne/query/SelectQuery.html" title="class in org.objectstyle.cayenne.query">SelectQuery</A> query, |
| java.util.List objects)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>Since 1.2. This is a utility method that handles a very specific case. |
| It shouldn't be in DataContext.</I></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/objectstyle/cayenne/access/DataContext.html#prepareForAccess(org.objectstyle.cayenne.Persistent, java.lang.String)">prepareForAccess</A></B>(<A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> object, |
| java.lang.String property)</CODE> |
| |
| <BR> |
| Resolves object fault if needed.</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/objectstyle/cayenne/access/DataContext.html#propertyChanged(org.objectstyle.cayenne.Persistent, java.lang.String, java.lang.Object, java.lang.Object)">propertyChanged</A></B>(<A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> object, |
| java.lang.String property, |
| java.lang.Object oldValue, |
| java.lang.Object newValue)</CODE> |
| |
| <BR> |
| Retains DataObject snapshot and changes its state if needed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#refetchObject(org.objectstyle.cayenne.ObjectId)">refetchObject</A></B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectId.html" title="class in org.objectstyle.cayenne">ObjectId</A> oid)</CODE> |
| |
| <BR> |
| Refetches object data for ObjectId.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#registeredObject(org.objectstyle.cayenne.ObjectId)">registeredObject</A></B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectId.html" title="class in org.objectstyle.cayenne">ObjectId</A> id)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2 use 'localObject(id, null)'</I></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/objectstyle/cayenne/access/DataContext.html#registerNewObject(org.objectstyle.cayenne.DataObject)">registerNewObject</A></B>(<A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> object)</CODE> |
| |
| <BR> |
| Registers a transient object with the context, recursively registering all |
| transient DataObjects attached to this object via relationships.</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/objectstyle/cayenne/access/DataContext.html#rollbackChanges()">rollbackChanges</A></B>()</CODE> |
| |
| <BR> |
| Reverts any changes that have occurred to objects registered with DataContext; also |
| performs cascading rollback of all parent DataContexts.</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/objectstyle/cayenne/access/DataContext.html#rollbackChangesLocally()">rollbackChangesLocally</A></B>()</CODE> |
| |
| <BR> |
| If the parent channel is a DataContext, reverts local changes to make this context |
| look like the parent, if the parent channel is a DataDomain, reverts all changes.</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/objectstyle/cayenne/access/DataContext.html#setChannel(org.objectstyle.cayenne.DataChannel)">setChannel</A></B>(<A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A> channel)</CODE> |
| |
| <BR> |
| </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/objectstyle/cayenne/access/DataContext.html#setDelegate(org.objectstyle.cayenne.access.DataContextDelegate)">setDelegate</A></B>(<A HREF="../../../../org/objectstyle/cayenne/access/DataContextDelegate.html" title="interface in org.objectstyle.cayenne.access">DataContextDelegate</A> delegate)</CODE> |
| |
| <BR> |
| Sets a DataContextDelegate for this context.</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/objectstyle/cayenne/access/DataContext.html#setParent(org.objectstyle.cayenne.access.QueryEngine)">setParent</A></B>(<A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A> parent)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>since 1.2, use setChannel instead.</I></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/objectstyle/cayenne/access/DataContext.html#setTransactionEventsEnabled(boolean)">setTransactionEventsEnabled</A></B>(boolean flag)</CODE> |
| |
| <BR> |
| Enables or disables posting of transaction events by this DataContext.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#setTransactionEventsEnabledDefault(boolean)">setTransactionEventsEnabledDefault</A></B>(boolean flag)</CODE> |
| |
| <BR> |
| Sets default for posting transaction events by new DataContexts.</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/objectstyle/cayenne/access/DataContext.html#setUserProperty(java.lang.String, java.lang.Object)">setUserProperty</A></B>(java.lang.String key, |
| java.lang.Object value)</CODE> |
| |
| <BR> |
| Sets a user-defined property.</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/objectstyle/cayenne/access/DataContext.html#setValidatingObjectsOnCommit(boolean)">setValidatingObjectsOnCommit</A></B>(boolean flag)</CODE> |
| |
| <BR> |
| Sets the property defining whether this DataContext should perform object |
| validation before commit is executed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.util.Collection</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#uncommittedObjects()">uncommittedObjects</A></B>()</CODE> |
| |
| <BR> |
| Returns a collection of all uncommitted registered objects.</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/objectstyle/cayenne/access/DataContext.html#unregisterObjects(java.util.Collection)">unregisterObjects</A></B>(java.util.Collection dataObjects)</CODE> |
| |
| <BR> |
| Unregisters a Collection of DataObjects from the DataContext and the underlying |
| ObjectStore.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_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>Field Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="WILL_COMMIT"><!-- --></A><H3> |
| WILL_COMMIT</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/objectstyle/cayenne/event/EventSubject.html" title="class in org.objectstyle.cayenne.event">EventSubject</A> <B>WILL_COMMIT</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="DID_COMMIT"><!-- --></A><H3> |
| DID_COMMIT</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/objectstyle/cayenne/event/EventSubject.html" title="class in org.objectstyle.cayenne.event">EventSubject</A> <B>DID_COMMIT</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="DID_ROLLBACK"><!-- --></A><H3> |
| DID_ROLLBACK</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/objectstyle/cayenne/event/EventSubject.html" title="class in org.objectstyle.cayenne.event">EventSubject</A> <B>DID_ROLLBACK</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="threadDataContext"><!-- --></A><H3> |
| threadDataContext</H3> |
| <PRE> |
| protected static final java.lang.ThreadLocal <B>threadDataContext</B></PRE> |
| <DL> |
| <DD>A holder of a DataContext bound to the current thread. |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="usingSharedSnaphsotCache"><!-- --></A><H3> |
| usingSharedSnaphsotCache</H3> |
| <PRE> |
| protected boolean <B>usingSharedSnaphsotCache</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="validatingObjectsOnCommit"><!-- --></A><H3> |
| validatingObjectsOnCommit</H3> |
| <PRE> |
| protected boolean <B>validatingObjectsOnCommit</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="objectStore"><!-- --></A><H3> |
| objectStore</H3> |
| <PRE> |
| protected <A HREF="../../../../org/objectstyle/cayenne/access/ObjectStore.html" title="class in org.objectstyle.cayenne.access">ObjectStore</A> <B>objectStore</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="channel"><!-- --></A><H3> |
| channel</H3> |
| <PRE> |
| protected transient <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A> <B>channel</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="entityResolver"><!-- --></A><H3> |
| entityResolver</H3> |
| <PRE> |
| protected transient <A HREF="../../../../org/objectstyle/cayenne/map/EntityResolver.html" title="class in org.objectstyle.cayenne.map">EntityResolver</A> <B>entityResolver</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="mergeHandler"><!-- --></A><H3> |
| mergeHandler</H3> |
| <PRE> |
| protected transient org.objectstyle.cayenne.access.DataContextMergeHandler <B>mergeHandler</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="userProperties"><!-- --></A><H3> |
| userProperties</H3> |
| <PRE> |
| protected java.util.Map <B>userProperties</B></PRE> |
| <DL> |
| <DD>Stores user defined properties associated with this DataContext. |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="lazyInitParentDomainName"><!-- --></A><H3> |
| lazyInitParentDomainName</H3> |
| <PRE> |
| protected transient java.lang.String <B>lazyInitParentDomainName</B></PRE> |
| <DL> |
| <DD>Stores the name of parent DataDomain. Used to defer initialization of the parent |
| QueryEngine after deserialization. This helps avoid an issue with certain servlet |
| engines (e.g. Tomcat) where HttpSessions with DataContext's are deserialized at |
| startup before Cayenne stack is fully initialized. |
| <P> |
| <DL> |
| </DL> |
| </DL> |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_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>Constructor Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="DataContext()"><!-- --></A><H3> |
| DataContext</H3> |
| <PRE> |
| public <B>DataContext</B>()</PRE> |
| <DL> |
| <DD>Creates a new DataContext that is not attached to the Cayenne stack. |
| <P> |
| </DL> |
| <HR> |
| |
| <A NAME="DataContext(org.objectstyle.cayenne.access.QueryEngine, org.objectstyle.cayenne.access.ObjectStore)"><!-- --></A><H3> |
| DataContext</H3> |
| <PRE> |
| public <B>DataContext</B>(<A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A> parent, |
| <A HREF="../../../../org/objectstyle/cayenne/access/ObjectStore.html" title="class in org.objectstyle.cayenne.access">ObjectStore</A> objectStore)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2 - use <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#DataContext(org.objectstyle.cayenne.DataChannel, org.objectstyle.cayenne.access.ObjectStore)"><CODE>DataContext(DataChannel, ObjectStore)</CODE></A> |
| constructor instead. Note that DataDomain is both a DataChannel and a |
| QueryEngine, so you may need to do a cast: |
| <code>new DataContext((DataChannel) domain, objectStore)</code>.</I> |
| <P> |
| <DD>Creates a DataContext with parent QueryEngine and a DataRowStore that should be |
| used by the ObjectStore. |
| <P> |
| <DL> |
| <DT><B>Parameters:</B><DD><CODE>parent</CODE> - parent QueryEngine used to communicate with the data source.<DD><CODE>objectStore</CODE> - ObjectStore used by DataContext.<DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="DataContext(org.objectstyle.cayenne.DataChannel, org.objectstyle.cayenne.access.ObjectStore)"><!-- --></A><H3> |
| DataContext</H3> |
| <PRE> |
| public <B>DataContext</B>(<A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A> channel, |
| <A HREF="../../../../org/objectstyle/cayenne/access/ObjectStore.html" title="class in org.objectstyle.cayenne.access">ObjectStore</A> objectStore)</PRE> |
| <DL> |
| <DD>Creates a new DataContext with parent DataChannel and ObjectStore. |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DL> |
| |
| <!-- ============ 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="getThreadDataContext()"><!-- --></A><H3> |
| getThreadDataContext</H3> |
| <PRE> |
| public static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> <B>getThreadDataContext</B>() |
| throws java.lang.IllegalStateException</PRE> |
| <DL> |
| <DD>Returns the DataContext bound to the current thread. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the DataContext associated with caller thread. |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.IllegalStateException</CODE> - if there is no DataContext bound to the current |
| thread.<DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/objectstyle/cayenne/conf/WebApplicationContextFilter.html" title="class in org.objectstyle.cayenne.conf"><CODE>WebApplicationContextFilter</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="bindThreadDataContext(org.objectstyle.cayenne.access.DataContext)"><!-- --></A><H3> |
| bindThreadDataContext</H3> |
| <PRE> |
| public static void <B>bindThreadDataContext</B>(<A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> context)</PRE> |
| <DL> |
| <DD>Binds a DataContext to the current thread. DataContext can later be retrieved by |
| users in the same thread by calling <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#getThreadDataContext()"><CODE>getThreadDataContext()</CODE></A>. |
| Using null parameter will unbind currently bound DataContext. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createDataContext()"><!-- --></A><H3> |
| createDataContext</H3> |
| <PRE> |
| public static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> <B>createDataContext</B>()</PRE> |
| <DL> |
| <DD>Factory method that creates and returns a new instance of DataContext based on |
| default domain. If more than one domain exists in the current configuration, |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createDataContext(java.lang.String)"><CODE>createDataContext(String)</CODE></A> must be used instead. ObjectStore |
| associated with created DataContext will have a cache stack configured using parent |
| domain settings. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createDataContext(boolean)"><!-- --></A><H3> |
| createDataContext</H3> |
| <PRE> |
| public static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> <B>createDataContext</B>(boolean useSharedCache)</PRE> |
| <DL> |
| <DD>Factory method that creates and returns a new instance of DataContext based on |
| default domain. If more than one domain exists in the current configuration, |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createDataContext(java.lang.String, boolean)"><CODE>createDataContext(String, boolean)</CODE></A> must be used instead. |
| ObjectStore associated with newly created DataContext will have a cache stack |
| configured according to the specified policy, overriding a parent domain setting. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createDataContext(java.lang.String)"><!-- --></A><H3> |
| createDataContext</H3> |
| <PRE> |
| public static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> <B>createDataContext</B>(java.lang.String domainName)</PRE> |
| <DL> |
| <DD>Factory method that creates and returns a new instance of DataContext using named |
| domain as its parent. If there is no domain matching the name argument, an |
| exception is thrown. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createDataContext(java.lang.String, boolean)"><!-- --></A><H3> |
| createDataContext</H3> |
| <PRE> |
| public static <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> <B>createDataContext</B>(java.lang.String domainName, |
| boolean useSharedCache)</PRE> |
| <DL> |
| <DD>Creates and returns new DataContext that will use a named DataDomain as its parent. |
| ObjectStore associated with newly created DataContext will have a cache stack |
| configured according to the specified policy, overriding a parent domain setting. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getUserProperties()"><!-- --></A><H3> |
| getUserProperties</H3> |
| <PRE> |
| protected java.util.Map <B>getUserProperties</B>()</PRE> |
| <DL> |
| <DD>Returns a map of user-defined properties associated with this DataContext. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createChildDataContext()"><!-- --></A><H3> |
| createChildDataContext</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> <B>createChildDataContext</B>()</PRE> |
| <DL> |
| <DD>Creates and returns a new child DataContext. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getUserProperty(java.lang.String)"><!-- --></A><H3> |
| getUserProperty</H3> |
| <PRE> |
| public java.lang.Object <B>getUserProperty</B>(java.lang.String key)</PRE> |
| <DL> |
| <DD>Returns a user-defined property previously set via 'setUserProperty'. Note that it |
| is a caller responsibility to synchronize access to properties. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setUserProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3> |
| setUserProperty</H3> |
| <PRE> |
| public void <B>setUserProperty</B>(java.lang.String key, |
| java.lang.Object value)</PRE> |
| <DL> |
| <DD>Sets a user-defined property. Note that it is a caller responsibility to |
| synchronize access to properties. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getParent()"><!-- --></A><H3> |
| getParent</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A> <B>getParent</B>()</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2. Use 'getParentDataDomain()' or 'getChannel()' instead.</I> |
| <P> |
| <DD>Returns parent QueryEngine object. In most cases returned object is an instance of |
| DataDomain. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setParent(org.objectstyle.cayenne.access.QueryEngine)"><!-- --></A><H3> |
| setParent</H3> |
| <PRE> |
| public void <B>setParent</B>(<A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A> parent)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2, use setChannel instead.</I> |
| <P> |
| <DD>Sets direct parent of this DataContext. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getChannel()"><!-- --></A><H3> |
| getChannel</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A> <B>getChannel</B>()</PRE> |
| <DL> |
| <DD>Returns parent DataChannel, that is normally a DataDomain or another DataContext. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#getChannel()">getChannel</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setChannel(org.objectstyle.cayenne.DataChannel)"><!-- --></A><H3> |
| setChannel</H3> |
| <PRE> |
| public void <B>setChannel</B>(<A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A> channel)</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getParentDataDomain()"><!-- --></A><H3> |
| getParentDataDomain</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/access/DataDomain.html" title="class in org.objectstyle.cayenne.access">DataDomain</A> <B>getParentDataDomain</B>()</PRE> |
| <DL> |
| <DD>Returns a DataDomain used by this DataContext. DataDomain is looked up in the |
| DataChannel hierarchy. If a channel is not a DataDomain or a DataContext, null is |
| returned. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>DataDomain that is a direct or indirect parent of this DataContext in the |
| DataChannel hierarchy.<DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setDelegate(org.objectstyle.cayenne.access.DataContextDelegate)"><!-- --></A><H3> |
| setDelegate</H3> |
| <PRE> |
| public void <B>setDelegate</B>(<A HREF="../../../../org/objectstyle/cayenne/access/DataContextDelegate.html" title="interface in org.objectstyle.cayenne.access">DataContextDelegate</A> delegate)</PRE> |
| <DL> |
| <DD>Sets a DataContextDelegate for this context. Delegate is notified of certain events |
| in the DataContext lifecycle and can customize DataContext behavior. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getDelegate()"><!-- --></A><H3> |
| getDelegate</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/access/DataContextDelegate.html" title="interface in org.objectstyle.cayenne.access">DataContextDelegate</A> <B>getDelegate</B>()</PRE> |
| <DL> |
| <DD>Returns a delegate currently associated with this DataContext. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getObjectStore()"><!-- --></A><H3> |
| getObjectStore</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/access/ObjectStore.html" title="class in org.objectstyle.cayenne.access">ObjectStore</A> <B>getObjectStore</B>()</PRE> |
| <DL> |
| <DD>Returns ObjectStore associated with this DataContext. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="hasChanges()"><!-- --></A><H3> |
| hasChanges</H3> |
| <PRE> |
| public boolean <B>hasChanges</B>()</PRE> |
| <DL> |
| <DD>Returns <code>true</code> if there are any modified, deleted or new objects |
| registered with this DataContext, <code>false</code> otherwise. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="newObjects()"><!-- --></A><H3> |
| newObjects</H3> |
| <PRE> |
| public java.util.Collection <B>newObjects</B>()</PRE> |
| <DL> |
| <DD>Returns a list of objects that are registered with this DataContext and have a |
| state PersistenceState.NEW |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#newObjects()">newObjects</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="deletedObjects()"><!-- --></A><H3> |
| deletedObjects</H3> |
| <PRE> |
| public java.util.Collection <B>deletedObjects</B>()</PRE> |
| <DL> |
| <DD>Returns a list of objects that are registered with this DataContext and have a |
| state PersistenceState.DELETED |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#deletedObjects()">deletedObjects</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="modifiedObjects()"><!-- --></A><H3> |
| modifiedObjects</H3> |
| <PRE> |
| public java.util.Collection <B>modifiedObjects</B>()</PRE> |
| <DL> |
| <DD>Returns a list of objects that are registered with this DataContext and have a |
| state PersistenceState.MODIFIED |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#modifiedObjects()">modifiedObjects</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="uncommittedObjects()"><!-- --></A><H3> |
| uncommittedObjects</H3> |
| <PRE> |
| public java.util.Collection <B>uncommittedObjects</B>()</PRE> |
| <DL> |
| <DD>Returns a collection of all uncommitted registered objects. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#uncommittedObjects()">uncommittedObjects</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="registeredObject(org.objectstyle.cayenne.ObjectId)"><!-- --></A><H3> |
| registeredObject</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> <B>registeredObject</B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectId.html" title="class in org.objectstyle.cayenne">ObjectId</A> id)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2 use 'localObject(id, null)'</I> |
| <P> |
| <DD>Returns an object for a given ObjectId. When an object is not yet registered with |
| this context's ObjectStore, the behavior of this method depends on whether ObjectId |
| is permanent or temporary and whether a DataContext is a part of a nested context |
| hierarchy or not. More specifically the following rules are applied in order: |
| <ul> |
| <li>If a matching registered object is found in this DataContext, it is |
| immediately returned.</li> |
| <li>If a context is nested (i.e. it has another DataContext as its parent |
| channel), an attempt is made to locate a registered object up the hierarchy chain, |
| until it is found. Such object is transferred to this DataContext and returned to |
| the caller.</li> |
| <li>If the ObjectId is temporary, null is returned; if it is permanent, a HOLLOW |
| object (aka fault) is created and returned.</li> |
| </ul> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="currentSnapshot(org.objectstyle.cayenne.DataObject)"><!-- --></A><H3> |
| currentSnapshot</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/DataRow.html" title="class in org.objectstyle.cayenne">DataRow</A> <B>currentSnapshot</B>(<A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> object)</PRE> |
| <DL> |
| <DD>Returns a DataRow reflecting current, possibly uncommitted, object state. |
| <p> |
| <strong>Warning:</strong> This method will return a partial snapshot if an object |
| or one of its related objects that propagate their keys to this object have |
| temporary ids. DO NOT USE this method if you expect a DataRow to represent a |
| complete object state. |
| </p> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="localObjects(java.util.List)"><!-- --></A><H3> |
| localObjects</H3> |
| <PRE> |
| public java.util.List <B>localObjects</B>(java.util.List objects)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2 - use <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#localObject(org.objectstyle.cayenne.ObjectId, org.objectstyle.cayenne.Persistent)"><CODE>localObject(ObjectId, Persistent)</CODE></A> to specify |
| how each local object should be handled.</I> |
| <P> |
| <DD>Creates a list of DataObjects local to this DataContext from a list of DataObjects |
| coming from a different DataContext. This method is a way to <b>map</b> objects |
| from one context into the other (as opposed to "synchronize"). This means that the |
| state of modified objects will be reflected only if this context is a child of an |
| original DataObject context. If it is a peer or parent, you won't see any |
| uncommitted changes from the original context. |
| <p> |
| Note that the objects in the list do not have to be of the same type or even from |
| the same DataContext. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.0.3</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="objectsFromDataRows(org.objectstyle.cayenne.map.ObjEntity, java.util.List, boolean, boolean)"><!-- --></A><H3> |
| objectsFromDataRows</H3> |
| <PRE> |
| public java.util.List <B>objectsFromDataRows</B>(<A HREF="../../../../org/objectstyle/cayenne/map/ObjEntity.html" title="class in org.objectstyle.cayenne.map">ObjEntity</A> entity, |
| java.util.List dataRows, |
| boolean refresh, |
| boolean resolveInheritanceHierarchy)</PRE> |
| <DL> |
| <DD>Converts a list of data rows to a list of DataObjects. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="objectsFromDataRows(java.lang.Class, java.util.List, boolean, boolean)"><!-- --></A><H3> |
| objectsFromDataRows</H3> |
| <PRE> |
| public java.util.List <B>objectsFromDataRows</B>(java.lang.Class objectClass, |
| java.util.List dataRows, |
| boolean refresh, |
| boolean resolveInheritanceHierarchy)</PRE> |
| <DL> |
| <DD>Converts a list of DataRows to a List of DataObject registered with this |
| DataContext. Internally calls |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#objectsFromDataRows(org.objectstyle.cayenne.map.ObjEntity, java.util.List, boolean, boolean)"><CODE>objectsFromDataRows(ObjEntity,List,boolean,boolean)</CODE></A>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/objectstyle/cayenne/DataRow.html" title="class in org.objectstyle.cayenne"><CODE>DataRow</CODE></A>, |
| <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne"><CODE>DataObject</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="objectFromDataRow(java.lang.Class, org.objectstyle.cayenne.DataRow, boolean)"><!-- --></A><H3> |
| objectFromDataRow</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> <B>objectFromDataRow</B>(java.lang.Class objectClass, |
| <A HREF="../../../../org/objectstyle/cayenne/DataRow.html" title="class in org.objectstyle.cayenne">DataRow</A> dataRow, |
| boolean refresh)</PRE> |
| <DL> |
| <DD>Creates a DataObject from DataRow. This is a convenience shortcut to |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#objectsFromDataRows(java.lang.Class, java.util.List, boolean, boolean)"><CODE>objectsFromDataRows(Class,java.util.List,boolean,boolean)</CODE></A>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/objectstyle/cayenne/DataRow.html" title="class in org.objectstyle.cayenne"><CODE>DataRow</CODE></A>, |
| <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne"><CODE>DataObject</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createAndRegisterNewObject(java.lang.String)"><!-- --></A><H3> |
| createAndRegisterNewObject</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> <B>createAndRegisterNewObject</B>(java.lang.String objEntityName)</PRE> |
| <DL> |
| <DD>Instantiates new object and registers it with itself. Object class is determined |
| from ObjEntity. Object class must have a default constructor. |
| <p> |
| <i>Note: preferred way to create new objects is via |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createAndRegisterNewObject(java.lang.Class)"><CODE>createAndRegisterNewObject(Class)</CODE></A>method. It works exactly the same way, |
| but makes the application type-safe. </i> |
| </p> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#createAndRegisterNewObject(java.lang.Class)"><CODE>createAndRegisterNewObject(Class)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="newObject(java.lang.Class)"><!-- --></A><H3> |
| newObject</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> <B>newObject</B>(java.lang.Class persistentClass)</PRE> |
| <DL> |
| <DD>Creates and registers new persistent object. This is an ObjectContext version of |
| 'createAndRegisterNewObject'. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#newObject(java.lang.Class)">newObject</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createAndRegisterNewObject(java.lang.Class)"><!-- --></A><H3> |
| createAndRegisterNewObject</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> <B>createAndRegisterNewObject</B>(java.lang.Class objectClass)</PRE> |
| <DL> |
| <DD>Instantiates new object and registers it with itself. Object class must have a |
| default constructor. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="registerNewObject(org.objectstyle.cayenne.DataObject)"><!-- --></A><H3> |
| registerNewObject</H3> |
| <PRE> |
| public void <B>registerNewObject</B>(<A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> object)</PRE> |
| <DL> |
| <DD>Registers a transient object with the context, recursively registering all |
| transient DataObjects attached to this object via relationships. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>object</CODE> - new object that needs to be made persistent.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unregisterObjects(java.util.Collection)"><!-- --></A><H3> |
| unregisterObjects</H3> |
| <PRE> |
| public void <B>unregisterObjects</B>(java.util.Collection dataObjects)</PRE> |
| <DL> |
| <DD>Unregisters a Collection of DataObjects from the DataContext and the underlying |
| ObjectStore. This operation also unsets DataContext and ObjectId for each object |
| and changes its state to TRANSIENT. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#invalidateObjects(java.util.Collection)"><CODE>invalidateObjects(Collection)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="invalidateObjects(java.util.Collection)"><!-- --></A><H3> |
| invalidateObjects</H3> |
| <PRE> |
| public void <B>invalidateObjects</B>(java.util.Collection dataObjects)</PRE> |
| <DL> |
| <DD>"Invalidates" a Collection of DataObject. This operation would remove each object's |
| snapshot from cache and change object's state to HOLLOW. On the next access to this |
| object, it will be refetched. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#unregisterObjects(java.util.Collection)"><CODE>unregisterObjects(Collection)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="deleteObjects(java.util.Collection)"><!-- --></A><H3> |
| deleteObjects</H3> |
| <PRE> |
| public void <B>deleteObjects</B>(java.util.Collection objects)</PRE> |
| <DL> |
| <DD>Schedules all objects in the collection for deletion on the next commit of this |
| DataContext. Object's persistence state is changed to PersistenceState.DELETED; |
| objects related to this object are processed according to delete rules, i.e. |
| relationships can be unset ("nullify" rule), deletion operation is cascaded |
| (cascade rule). |
| <p> |
| <i>"Nullify" delete rule side effect: </i> passing a collection representing |
| to-many relationship with nullify delete rule may result in objects being removed |
| from collection. |
| </p> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="deleteObject(org.objectstyle.cayenne.Persistent)"><!-- --></A><H3> |
| deleteObject</H3> |
| <PRE> |
| public void <B>deleteObject</B>(<A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> object) |
| throws <A HREF="../../../../org/objectstyle/cayenne/DeleteDenyException.html" title="class in org.objectstyle.cayenne">DeleteDenyException</A></PRE> |
| <DL> |
| <DD>Schedules an object for deletion on the next commit of this DataContext. Object's |
| persistence state is changed to PersistenceState.DELETED; objects related to this |
| object are processed according to delete rules, i.e. relationships can be unset |
| ("nullify" rule), deletion operation is cascaded (cascade rule). |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#deleteObject(org.objectstyle.cayenne.Persistent)">deleteObject</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>object</CODE> - a persistent object that we want to delete. |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/objectstyle/cayenne/access/DeleteDenyException.html" title="class in org.objectstyle.cayenne.access">DeleteDenyException</A></CODE> - if a DENY delete rule is applicable for object |
| deletion. |
| <DD><CODE>java.lang.NullPointerException</CODE> - if object is null. |
| <DD><CODE><A HREF="../../../../org/objectstyle/cayenne/DeleteDenyException.html" title="class in org.objectstyle.cayenne">DeleteDenyException</A></CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="refetchObject(org.objectstyle.cayenne.ObjectId)"><!-- --></A><H3> |
| refetchObject</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A> <B>refetchObject</B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectId.html" title="class in org.objectstyle.cayenne">ObjectId</A> oid)</PRE> |
| <DL> |
| <DD>Refetches object data for ObjectId. This method is used internally by Cayenne to |
| resolve objects in state <code>PersistenceState.HOLLOW</code>. It can also be |
| used to refresh certain objects. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/objectstyle/cayenne/CayenneRuntimeException.html" title="class in org.objectstyle.cayenne">CayenneRuntimeException</A></CODE> - if object id doesn't match any records, or if there |
| is more than one object is fetched.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="lookupDataNode(org.objectstyle.cayenne.map.DataMap)"><!-- --></A><H3> |
| lookupDataNode</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/access/DataNode.html" title="class in org.objectstyle.cayenne.access">DataNode</A> <B>lookupDataNode</B>(<A HREF="../../../../org/objectstyle/cayenne/map/DataMap.html" title="class in org.objectstyle.cayenne.map">DataMap</A> dataMap)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2 DataContext's QueryEngine implementation is replaced by |
| DataChannel. Use "getParentDataDomain().lookupDataNode(..)".</I> |
| <P> |
| <DD>Returns a DataNode that should handle queries for all DataMap components. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html#lookupDataNode(org.objectstyle.cayenne.map.DataMap)">lookupDataNode</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="rollbackChangesLocally()"><!-- --></A><H3> |
| rollbackChangesLocally</H3> |
| <PRE> |
| public void <B>rollbackChangesLocally</B>()</PRE> |
| <DL> |
| <DD>If the parent channel is a DataContext, reverts local changes to make this context |
| look like the parent, if the parent channel is a DataDomain, reverts all changes. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#rollbackChangesLocally()">rollbackChangesLocally</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="rollbackChanges()"><!-- --></A><H3> |
| rollbackChanges</H3> |
| <PRE> |
| public void <B>rollbackChanges</B>()</PRE> |
| <DL> |
| <DD>Reverts any changes that have occurred to objects registered with DataContext; also |
| performs cascading rollback of all parent DataContexts. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#rollbackChanges()">rollbackChanges</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="commitChangesToParent()"><!-- --></A><H3> |
| commitChangesToParent</H3> |
| <PRE> |
| public void <B>commitChangesToParent</B>()</PRE> |
| <DL> |
| <DD>"Flushes" the changes to the parent <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne"><CODE>DataChannel</CODE></A>. If the parent channel is |
| a DataContext, it updates its objects with this context's changes, without a |
| database update. If it is a DataDomain (the most common case), the changes are |
| written to the database. To cause cascading commit all the way to the database, one |
| must use <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#commitChanges()"><CODE>commitChanges()</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#commitChangesToParent()">commitChangesToParent</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#commitChanges()"><CODE>commitChanges()</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="commitChanges(org.apache.log4j.Level)"><!-- --></A><H3> |
| commitChanges</H3> |
| <PRE> |
| public void <B>commitChanges</B>(org.apache.log4j.Level logLevel) |
| throws <A HREF="../../../../org/objectstyle/cayenne/CayenneRuntimeException.html" title="class in org.objectstyle.cayenne">CayenneRuntimeException</A></PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>Since 1.2, use <A HREF="../../../../org/objectstyle/cayenne/access/DataContext.html#commitChanges()"><CODE>commitChanges()</CODE></A> instead.</I> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/objectstyle/cayenne/CayenneRuntimeException.html" title="class in org.objectstyle.cayenne">CayenneRuntimeException</A></CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="commitChanges()"><!-- --></A><H3> |
| commitChanges</H3> |
| <PRE> |
| public void <B>commitChanges</B>() |
| throws <A HREF="../../../../org/objectstyle/cayenne/CayenneRuntimeException.html" title="class in org.objectstyle.cayenne">CayenneRuntimeException</A></PRE> |
| <DL> |
| <DD>Synchronizes object graph with the database. Executes needed insert, update and |
| delete queries (generated internally). |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#commitChanges()">commitChanges</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/objectstyle/cayenne/CayenneRuntimeException.html" title="class in org.objectstyle.cayenne">CayenneRuntimeException</A></CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getEventManager()"><!-- --></A><H3> |
| getEventManager</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/event/EventManager.html" title="class in org.objectstyle.cayenne.event">EventManager</A> <B>getEventManager</B>()</PRE> |
| <DL> |
| <DD>Returns EventManager associated with the ObjectStore. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#getEventManager()">getEventManager</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="onSync(org.objectstyle.cayenne.ObjectContext, org.objectstyle.cayenne.graph.GraphDiff, int)"><!-- --></A><H3> |
| onSync</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/graph/GraphDiff.html" title="interface in org.objectstyle.cayenne.graph">GraphDiff</A> <B>onSync</B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A> originatingContext, |
| <A HREF="../../../../org/objectstyle/cayenne/graph/GraphDiff.html" title="interface in org.objectstyle.cayenne.graph">GraphDiff</A> changes, |
| int syncType)</PRE> |
| <DL> |
| <DD>An implementation of a <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne"><CODE>DataChannel</CODE></A> method that is used by child contexts to |
| synchronize state with this context. Not intended for direct use. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#onSync(org.objectstyle.cayenne.ObjectContext, org.objectstyle.cayenne.graph.GraphDiff, int)">onSync</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>originatingContext</CODE> - an ObjectContext that initiated the sync. Can be null.<DD><CODE>changes</CODE> - diff from the context that initiated the sync.<DD><CODE>syncType</CODE> - One of <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#FLUSH_NOCASCADE_SYNC"><CODE>DataChannel.FLUSH_NOCASCADE_SYNC</CODE></A>, <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#FLUSH_CASCADE_SYNC"><CODE>DataChannel.FLUSH_CASCADE_SYNC</CODE></A>, |
| <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#ROLLBACK_CASCADE_SYNC"><CODE>DataChannel.ROLLBACK_CASCADE_SYNC</CODE></A>.<DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performIteratedQuery(org.objectstyle.cayenne.query.Query)"><!-- --></A><H3> |
| performIteratedQuery</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/access/ResultIterator.html" title="interface in org.objectstyle.cayenne.access">ResultIterator</A> <B>performIteratedQuery</B>(<A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query) |
| throws <A HREF="../../../../org/objectstyle/cayenne/CayenneException.html" title="class in org.objectstyle.cayenne">CayenneException</A></PRE> |
| <DL> |
| <DD>Performs a single database select query returning result as a ResultIterator. It is |
| caller's responsibility to explicitly close the ResultIterator. A failure to do so |
| will result in a database connection not being released. Another side effect of an |
| open ResultIterator is that an internal Cayenne transaction that originated in this |
| method stays open until the iterator is closed. So users should normally close the |
| iterator within the same thread that opened it. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/objectstyle/cayenne/CayenneException.html" title="class in org.objectstyle.cayenne">CayenneException</A></CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performGenericQuery(org.objectstyle.cayenne.query.Query)"><!-- --></A><H3> |
| performGenericQuery</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/QueryResponse.html" title="interface in org.objectstyle.cayenne">QueryResponse</A> <B>performGenericQuery</B>(<A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</PRE> |
| <DL> |
| <DD>Executes a query returning a generic response. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#performGenericQuery(org.objectstyle.cayenne.query.Query)">performGenericQuery</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performQuery(org.objectstyle.cayenne.query.Query)"><!-- --></A><H3> |
| performQuery</H3> |
| <PRE> |
| public java.util.List <B>performQuery</B>(<A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</PRE> |
| <DL> |
| <DD>Performs a single selecting query. Various query setting control the behavior of |
| this method and the results returned: |
| <ul> |
| <li>Query caching policy defines whether the results are retrieved from cache or |
| fetched from the database. Note that queries that use caching must have a name that |
| is used as a caching key.</li> |
| <li>Query refreshing policy controls whether to refresh existing data objects and |
| ignore any cached values.</li> |
| <li>Query data rows policy defines whether the result should be returned as |
| DataObjects or DataRows.</li> |
| </ul> |
| <p> |
| <i>Since 1.2 takes any Query parameter, not just GenericSelectQuery</i> |
| </p> |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#performQuery(org.objectstyle.cayenne.query.Query)">performQuery</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>A list of DataObjects or a DataRows, depending on the value returned by |
| <A HREF="../../../../org/objectstyle/cayenne/query/QueryMetadata.html#isFetchingDataRows()"><CODE>QueryMetadata.isFetchingDataRows()</CODE></A>.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="onQuery(org.objectstyle.cayenne.ObjectContext, org.objectstyle.cayenne.query.Query)"><!-- --></A><H3> |
| onQuery</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/QueryResponse.html" title="interface in org.objectstyle.cayenne">QueryResponse</A> <B>onQuery</B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A> context, |
| <A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</PRE> |
| <DL> |
| <DD>An implementation of a <A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne"><CODE>DataChannel</CODE></A> method that is used by child contexts to |
| execute queries. Not intended for direct use. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#onQuery(org.objectstyle.cayenne.ObjectContext, org.objectstyle.cayenne.query.Query)">onQuery</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>context</CODE> - an ObjectContext that originated the query, used to |
| register result objects. |
| <DT><B>Returns:</B><DD>a generic response object that encapsulates result of the execution.<DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performNonSelectingQuery(org.objectstyle.cayenne.query.Query)"><!-- --></A><H3> |
| performNonSelectingQuery</H3> |
| <PRE> |
| public int[] <B>performNonSelectingQuery</B>(<A HREF="../../../../org/objectstyle/cayenne/query/Query.html" title="interface in org.objectstyle.cayenne.query">Query</A> query)</PRE> |
| <DL> |
| <DD>Performs a single database query that does not select rows. Returns an array of |
| update counts. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performNonSelectingQuery(java.lang.String)"><!-- --></A><H3> |
| performNonSelectingQuery</H3> |
| <PRE> |
| public int[] <B>performNonSelectingQuery</B>(java.lang.String queryName)</PRE> |
| <DL> |
| <DD>Performs a named mapped query that does not select rows. Returns an array of update |
| counts. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performNonSelectingQuery(java.lang.String, java.util.Map)"><!-- --></A><H3> |
| performNonSelectingQuery</H3> |
| <PRE> |
| public int[] <B>performNonSelectingQuery</B>(java.lang.String queryName, |
| java.util.Map parameters)</PRE> |
| <DL> |
| <DD>Performs a named mapped non-selecting query using a map of parameters. Returns an |
| array of update counts. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performQueries(java.util.Collection, org.objectstyle.cayenne.access.OperationObserver)"><!-- --></A><H3> |
| performQueries</H3> |
| <PRE> |
| public void <B>performQueries</B>(java.util.Collection queries, |
| <A HREF="../../../../org/objectstyle/cayenne/access/OperationObserver.html" title="interface in org.objectstyle.cayenne.access">OperationObserver</A> callback)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2 DataContext's QueryEngine implementation is replaced by |
| DataChannel.</I> |
| <P> |
| <DD>Executes all queries in collection. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html#performQueries(java.util.Collection, org.objectstyle.cayenne.access.OperationObserver)">performQueries</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performQueries(java.util.Collection, org.objectstyle.cayenne.access.OperationObserver, org.objectstyle.cayenne.access.Transaction)"><!-- --></A><H3> |
| performQueries</H3> |
| <PRE> |
| public void <B>performQueries</B>(java.util.Collection queries, |
| <A HREF="../../../../org/objectstyle/cayenne/access/OperationObserver.html" title="interface in org.objectstyle.cayenne.access">OperationObserver</A> callback, |
| <A HREF="../../../../org/objectstyle/cayenne/access/Transaction.html" title="class in org.objectstyle.cayenne.access">Transaction</A> transaction)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2. Use Transaction.bindThreadTransaction(..) to provide custom |
| transactions, besides DataContext's QueryEngine implementation is |
| replaced by DataChannel.</I> |
| <P> |
| <DD>Binds provided transaction to the current thread, and then runs queries. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html#performQueries(java.util.Collection, org.objectstyle.cayenne.access.OperationObserver, org.objectstyle.cayenne.access.Transaction)">performQueries</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="prefetchRelationships(org.objectstyle.cayenne.query.SelectQuery, java.util.List)"><!-- --></A><H3> |
| prefetchRelationships</H3> |
| <PRE> |
| public void <B>prefetchRelationships</B>(<A HREF="../../../../org/objectstyle/cayenne/query/SelectQuery.html" title="class in org.objectstyle.cayenne.query">SelectQuery</A> query, |
| java.util.List objects)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>Since 1.2. This is a utility method that handles a very specific case. |
| It shouldn't be in DataContext.</I> |
| <P> |
| <DD>Performs prefetching. Prefetching would resolve a set of relationships for a list |
| of DataObjects in the most optimized way (preferrably in a single query per |
| relationship). |
| <p> |
| <i>WARNING: Currently supports only "one-step" to one relationships. This is an |
| arbitrary limitation and will be removed eventually. </i> |
| </p> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performQuery(java.lang.String, boolean)"><!-- --></A><H3> |
| performQuery</H3> |
| <PRE> |
| public java.util.List <B>performQuery</B>(java.lang.String queryName, |
| boolean expireCachedLists)</PRE> |
| <DL> |
| <DD>Returns a list of objects or DataRows for a named query stored in one of the |
| DataMaps. Internally Cayenne uses a caching policy defined in the named query. If |
| refresh flag is true, a refresh is forced no matter what the caching policy is. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>queryName</CODE> - a name of a GenericSelectQuery defined in one of the DataMaps. If |
| no such query is defined, this method will throw a |
| CayenneRuntimeException.<DD><CODE>expireCachedLists</CODE> - A flag that determines whether refresh of <b>cached lists</b> |
| is required in case a query uses caching.<DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="performQuery(java.lang.String, java.util.Map, boolean)"><!-- --></A><H3> |
| performQuery</H3> |
| <PRE> |
| public java.util.List <B>performQuery</B>(java.lang.String queryName, |
| java.util.Map parameters, |
| boolean expireCachedLists)</PRE> |
| <DL> |
| <DD>Returns a list of objects or DataRows for a named query stored in one of the |
| DataMaps. Internally Cayenne uses a caching policy defined in the named query. If |
| refresh flag is true, a refresh is forced no matter what the caching policy is. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>queryName</CODE> - a name of a GenericSelectQuery defined in one of the DataMaps. If |
| no such query is defined, this method will throw a |
| CayenneRuntimeException.<DD><CODE>parameters</CODE> - A map of parameters to use with stored query.<DD><CODE>expireCachedLists</CODE> - A flag that determines whether refresh of <b>cached lists</b> |
| is required in case a query uses caching.<DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getEntityResolver()"><!-- --></A><H3> |
| getEntityResolver</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/map/EntityResolver.html" title="class in org.objectstyle.cayenne.map">EntityResolver</A> <B>getEntityResolver</B>()</PRE> |
| <DL> |
| <DD>Returns EntityResolver. EntityResolver can be null if DataContext has not been |
| attached to an DataChannel. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html#getEntityResolver()">getEntityResolver</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html#getEntityResolver()">getEntityResolver</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/DataChannel.html" title="interface in org.objectstyle.cayenne">DataChannel</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#getEntityResolver()">getEntityResolver</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setTransactionEventsEnabledDefault(boolean)"><!-- --></A><H3> |
| setTransactionEventsEnabledDefault</H3> |
| <PRE> |
| public static void <B>setTransactionEventsEnabledDefault</B>(boolean flag)</PRE> |
| <DL> |
| <DD>Sets default for posting transaction events by new DataContexts. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setTransactionEventsEnabled(boolean)"><!-- --></A><H3> |
| setTransactionEventsEnabled</H3> |
| <PRE> |
| public void <B>setTransactionEventsEnabled</B>(boolean flag)</PRE> |
| <DL> |
| <DD>Enables or disables posting of transaction events by this DataContext. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isTransactionEventsEnabled()"><!-- --></A><H3> |
| isTransactionEventsEnabled</H3> |
| <PRE> |
| public boolean <B>isTransactionEventsEnabled</B>()</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isUsingSharedSnapshotCache()"><!-- --></A><H3> |
| isUsingSharedSnapshotCache</H3> |
| <PRE> |
| public boolean <B>isUsingSharedSnapshotCache</B>()</PRE> |
| <DL> |
| <DD>Returns <code>true</code> if the ObjectStore uses shared cache of a parent |
| DataDomain. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isValidatingObjectsOnCommit()"><!-- --></A><H3> |
| isValidatingObjectsOnCommit</H3> |
| <PRE> |
| public boolean <B>isValidatingObjectsOnCommit</B>()</PRE> |
| <DL> |
| <DD>Returns whether this DataContext performs object validation before commit is |
| executed. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setValidatingObjectsOnCommit(boolean)"><!-- --></A><H3> |
| setValidatingObjectsOnCommit</H3> |
| <PRE> |
| public void <B>setValidatingObjectsOnCommit</B>(boolean flag)</PRE> |
| <DL> |
| <DD>Sets the property defining whether this DataContext should perform object |
| validation before commit is executed. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.1</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getDataMaps()"><!-- --></A><H3> |
| getDataMaps</H3> |
| <PRE> |
| public java.util.Collection <B>getDataMaps</B>()</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>since 1.2. Use 'getEntityResolver().getDataMaps()' instead.</I> |
| <P> |
| <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html#getDataMaps()">QueryEngine</A></CODE></B></DD> |
| <DD>Returns a collection of DataMaps associated with this QueryEngine. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html#getDataMaps()">getDataMaps</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/access/QueryEngine.html" title="interface in org.objectstyle.cayenne.access">QueryEngine</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="prepareForAccess(org.objectstyle.cayenne.Persistent, java.lang.String)"><!-- --></A><H3> |
| prepareForAccess</H3> |
| <PRE> |
| public void <B>prepareForAccess</B>(<A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> object, |
| java.lang.String property)</PRE> |
| <DL> |
| <DD>Resolves object fault if needed. If a property is not null, it is assumed that the |
| object will be modified, so object snapshot is retained and object state is |
| changed. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#prepareForAccess(org.objectstyle.cayenne.Persistent, java.lang.String)">prepareForAccess</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="propertyChanged(org.objectstyle.cayenne.Persistent, java.lang.String, java.lang.Object, java.lang.Object)"><!-- --></A><H3> |
| propertyChanged</H3> |
| <PRE> |
| public void <B>propertyChanged</B>(<A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> object, |
| java.lang.String property, |
| java.lang.Object oldValue, |
| java.lang.Object newValue)</PRE> |
| <DL> |
| <DD>Retains DataObject snapshot and changes its state if needed. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#propertyChanged(org.objectstyle.cayenne.Persistent, java.lang.String, java.lang.Object, java.lang.Object)">propertyChanged</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getGraphManager()"><!-- --></A><H3> |
| getGraphManager</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/graph/GraphManager.html" title="interface in org.objectstyle.cayenne.graph">GraphManager</A> <B>getGraphManager</B>()</PRE> |
| <DL> |
| <DD>Returns this context's ObjectStore. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#getGraphManager()">getGraphManager</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="localObject(org.objectstyle.cayenne.ObjectId, org.objectstyle.cayenne.Persistent)"><!-- --></A><H3> |
| localObject</H3> |
| <PRE> |
| public <A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> <B>localObject</B>(<A HREF="../../../../org/objectstyle/cayenne/ObjectId.html" title="class in org.objectstyle.cayenne">ObjectId</A> id, |
| <A HREF="../../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A> prototype)</PRE> |
| <DL> |
| <DD>Returns an object local to this DataContext and matching the ObjectId. If |
| <code>prototype</code> is not null, local object is refreshed with the prototype |
| values. |
| <p> |
| In case you pass a non-null second parameter, you are responsible for setting |
| correct persistence state of the returned local object, as generally there is no |
| way for Cayenne to determine the resulting local object state. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html#localObject(org.objectstyle.cayenne.ObjectId, org.objectstyle.cayenne.Persistent)">localObject</A></CODE> in interface <CODE><A HREF="../../../../org/objectstyle/cayenne/ObjectContext.html" title="interface in org.objectstyle.cayenne">ObjectContext</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>1.2</DD> |
| </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="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-files/index-1.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/objectstyle/cayenne/access/ConnectionLogger.html" title="class in org.objectstyle.cayenne.access"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/objectstyle/cayenne/access/DataContextDelegate.html" title="interface in org.objectstyle.cayenne.access"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/objectstyle/cayenne/access/DataContext.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="DataContext.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| |
| <!--@SFLOGO@--> <i>Copyright © 2001-2006 <a href= |
| "http://objectstyle.org" target="_top">ObjectStyle.org</a> All Rights Reserved.</i> |
| |
| </BODY> |
| </HTML> |