http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/0af753b3/docs/1.2/api/cayenne/org/objectstyle/cayenne/access/DataContext.html ---------------------------------------------------------------------- diff --git a/docs/1.2/api/cayenne/org/objectstyle/cayenne/access/DataContext.html b/docs/1.2/api/cayenne/org/objectstyle/cayenne/access/DataContext.html new file mode 100644 index 0000000..36f0026 --- /dev/null +++ b/docs/1.2/api/cayenne/org/objectstyle/cayenne/access/DataContext.html @@ -0,0 +1,2611 @@ +<!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="unregis
<TRUNCATED>