blob: a3a845673b2127f02965ff993906b928df52bcdb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Mon Oct 14 11:36:11 MSK 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DataContext (cayenne-doc: Cayenne Documentation 4.0.2 API)</title>
<meta name="date" content="2019-10-14">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DataContext (cayenne-doc: Cayenne Documentation 4.0.2 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":42,"i36":10,"i37":10,"i38":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DataContext.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/cayenne/access/ClientServerChannel.html" title="class in org.apache.cayenne.access"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/cayenne/access/DataContextDelegate.html" title="interface in org.apache.cayenne.access"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cayenne/access/DataContext.html" target="_top">Frames</a></li>
<li><a href="DataContext.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.cayenne.access</div>
<h2 title="Class DataContext" class="title">Class DataContext</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">org.apache.cayenne.BaseContext</a></li>
<li>
<ul class="inheritance">
<li>org.apache.cayenne.access.DataContext</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a>, <a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">DataContext</span>
extends <a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></pre>
<div class="block">The most common implementation of <a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne"><code>ObjectContext</code></a>. DataContext is an
isolated container of an object graph, in a sense that any uncommitted
changes to persistent objects that are registered with the context, are not
visible to the users of other contexts.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../serialized-form.html#org.apache.cayenne.access.DataContext">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected org.apache.cayenne.access.DataContextMergeHandler</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#mergeHandler">mergeHandler</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/cayenne/access/ObjectStore.html" title="class in org.apache.cayenne.access">ObjectStore</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#objectStore">objectStore</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/cayenne/tx/TransactionFactory.html" title="interface in org.apache.cayenne.tx">TransactionFactory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#transactionFactory">transactionFactory</a></span></code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">since 4.0 used in a method that itself should be deprecated,
so this is a temp code</span></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#usingSharedSnaphsotCache">usingSharedSnaphsotCache</a></span></code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.cayenne.BaseContext">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.cayenne.<a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></h3>
<code><a href="../../../../org/apache/cayenne/BaseContext.html#channel">channel</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#entityResolver">entityResolver</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#graphAction">graphAction</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#queryCache">queryCache</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#threadObjectContext">threadObjectContext</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#userProperties">userProperties</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#validatingObjectsOnCommit">validatingObjectsOnCommit</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.cayenne.DataChannel">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.apache.cayenne.<a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a></h3>
<code><a href="../../../../org/apache/cayenne/DataChannel.html#FLUSH_CASCADE_SYNC">FLUSH_CASCADE_SYNC</a>, <a href="../../../../org/apache/cayenne/DataChannel.html#FLUSH_NOCASCADE_SYNC">FLUSH_NOCASCADE_SYNC</a>, <a href="../../../../org/apache/cayenne/DataChannel.html#GRAPH_CHANGED_SUBJECT">GRAPH_CHANGED_SUBJECT</a>, <a href="../../../../org/apache/cayenne/DataChannel.html#GRAPH_FLUSHED_SUBJECT">GRAPH_FLUSHED_SUBJECT</a>, <a href="../../../../org/apache/cayenne/DataChannel.html#GRAPH_ROLLEDBACK_SUBJECT">GRAPH_ROLLEDBACK_SUBJECT</a>, <a href="../../../../org/apache/cayenne/DataChannel.html#ROLLBACK_CASCADE_SYNC">ROLLBACK_CASCADE_SYNC</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#DataContext--">DataContext</a></span>()</code>
<div class="block">Creates a new DataContext that is not attached to the Cayenne stack.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#DataContext-org.apache.cayenne.DataChannel-org.apache.cayenne.access.ObjectStore-">DataContext</a></span>(<a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a>&nbsp;channel,
<a href="../../../../org/apache/cayenne/access/ObjectStore.html" title="class in org.apache.cayenne.access">ObjectStore</a>&nbsp;objectStore)</code>
<div class="block">Creates a new DataContext with parent DataChannel and ObjectStore.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#attachToChannel-org.apache.cayenne.DataChannel-">attachToChannel</a></span>(<a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a>&nbsp;channel)</code>
<div class="block">Attaches to a provided DataChannel.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#attachToRuntime-org.apache.cayenne.di.Injector-">attachToRuntime</a></span>(<a href="../../../../org/apache/cayenne/di/Injector.html" title="interface in org.apache.cayenne.di">Injector</a>&nbsp;injector)</code>
<div class="block">Attaches this context to the CayenneRuntime whose Injector is passed as
an argument to this method.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#commitChanges--">commitChanges</a></span>()</code>
<div class="block">Synchronizes object graph with the database.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#commitChangesToParent--">commitChangesToParent</a></span>()</code>
<div class="block">"Flushes" the changes to the parent <a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne"><code>DataChannel</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne">DataRow</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#currentSnapshot-org.apache.cayenne.Persistent-">currentSnapshot</a></span>(<a href="../../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&nbsp;object)</code>
<div class="block">Returns a DataRow reflecting current, possibly uncommitted, object state.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#deletedObjects--">deletedObjects</a></span>()</code>
<div class="block">Returns a list of objects that are registered with this DataContext and
have a state PersistenceState.DELETED</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#fireDataChannelChanged-java.lang.Object-org.apache.cayenne.graph.GraphDiff-">fireDataChannelChanged</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;postedBy,
<a href="../../../../org/apache/cayenne/graph/GraphDiff.html" title="interface in org.apache.cayenne.graph">GraphDiff</a>&nbsp;changes)</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/access/DataContextDelegate.html" title="interface in org.apache.cayenne.access">DataContextDelegate</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#getDelegate--">getDelegate</a></span>()</code>
<div class="block">Returns a delegate currently associated with this DataContext.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/graph/GraphManager.html" title="interface in org.apache.cayenne.graph">GraphManager</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#getGraphManager--">getGraphManager</a></span>()</code>
<div class="block">Returns this context's ObjectStore.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/access/ObjectStore.html" title="class in org.apache.cayenne.access">ObjectStore</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#getObjectStore--">getObjectStore</a></span>()</code>
<div class="block">Returns ObjectStore associated with this DataContext.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/access/DataDomain.html" title="class in org.apache.cayenne.access">DataDomain</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#getParentDataDomain--">getParentDataDomain</a></span>()</code>
<div class="block">Returns a DataDomain used by this DataContext.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#hasChanges--">hasChanges</a></span>()</code>
<div class="block">Returns <code>true</code> if there are any modified, deleted or new
objects registered with this DataContext, <code>false</code> otherwise.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#isUsingSharedSnapshotCache--">isUsingSharedSnapshotCache</a></span>()</code>
<div class="block">Returns <code>true</code> if the ObjectStore uses shared cache of a
parent DataDomain.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../org/apache/cayenne/ResultIterator.html" title="interface in org.apache.cayenne">ResultIterator</a>&lt;T&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#iterator-org.apache.cayenne.query.Select-">iterator</a></span>(<a href="../../../../org/apache/cayenne/query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</code>
<div class="block">Creates a ResultIterator based on the provided query.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#modifiedObjects--">modifiedObjects</a></span>()</code>
<div class="block">Returns a list of objects that are registered with this DataContext and
have a state PersistenceState.MODIFIED</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#newObject-java.lang.Class-">newObject</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;persistentClass)</code>
<div class="block">Creates and registers a new persistent object.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#newObject-java.lang.String-">newObject</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;entityName)</code>
<div class="block">Instantiates a new object and registers it with this context.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#newObjects--">newObjects</a></span>()</code>
<div class="block">Returns a list of objects that are registered with this DataContext and
have a state PersistenceState.NEW</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&gt;<br>T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#objectFromDataRow-java.lang.Class-org.apache.cayenne.DataRow-">objectFromDataRow</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;objectClass,
<a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne">DataRow</a>&nbsp;dataRow)</code>
<div class="block">Creates a DataObject from DataRow.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne">DataObject</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#objectFromDataRow-java.lang.String-org.apache.cayenne.DataRow-">objectFromDataRow</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;entityName,
<a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne">DataRow</a>&nbsp;dataRow)</code>
<div class="block">Creates a DataObject from DataRow.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#objectsFromDataRows-org.apache.cayenne.reflect.ClassDescriptor-java.util.List-">objectsFromDataRows</a></span>(<a href="../../../../org/apache/cayenne/reflect/ClassDescriptor.html" title="interface in org.apache.cayenne.reflect">ClassDescriptor</a>&nbsp;descriptor,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne">DataRow</a>&gt;&nbsp;dataRows)</code>
<div class="block">Converts a list of DataRows to a List of DataObject registered with this
DataContext.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/cayenne/graph/GraphDiff.html" title="interface in org.apache.cayenne.graph">GraphDiff</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#onContextFlush-org.apache.cayenne.ObjectContext-org.apache.cayenne.graph.GraphDiff-boolean-">onContextFlush</a></span>(<a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a>&nbsp;originatingContext,
<a href="../../../../org/apache/cayenne/graph/GraphDiff.html" title="interface in org.apache.cayenne.graph">GraphDiff</a>&nbsp;changes,
boolean&nbsp;cascade)</code>&nbsp;</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/QueryResponse.html" title="interface in org.apache.cayenne">QueryResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#onQuery-org.apache.cayenne.ObjectContext-org.apache.cayenne.query.Query-">onQuery</a></span>(<a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a>&nbsp;context,
<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</code>
<div class="block">An implementation of a <a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne"><code>DataChannel</code></a> method that is used by child
contexts to execute queries.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/QueryResponse.html" title="interface in org.apache.cayenne">QueryResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#performGenericQuery-org.apache.cayenne.query.Query-">performGenericQuery</a></span>(<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</code>
<div class="block">Executes a query returning a generic response.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/ResultIterator.html" title="interface in org.apache.cayenne">ResultIterator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#performIteratedQuery-org.apache.cayenne.query.Query-">performIteratedQuery</a></span>(<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</code>
<div class="block">Performs a single database select query returning result as a
ResultIterator.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>int[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#performNonSelectingQuery-org.apache.cayenne.query.Query-">performNonSelectingQuery</a></span>(<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</code>
<div class="block">Performs a single database query that does not select rows.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>int[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#performNonSelectingQuery-java.lang.String-">performNonSelectingQuery</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;queryName)</code>
<div class="block">Performs a named mapped query that does not select rows.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>int[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#performNonSelectingQuery-java.lang.String-java.util.Map-">performNonSelectingQuery</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;queryName,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,?&gt;&nbsp;parameters)</code>
<div class="block">Performs a named mapped non-selecting query using a map of parameters.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#performQuery-org.apache.cayenne.query.Query-">performQuery</a></span>(<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</code>
<div class="block">Performs a single selecting query.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#performQuery-java.lang.String-boolean-">performQuery</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;queryName,
boolean&nbsp;expireCachedLists)</code>
<div class="block">Returns a list of objects or DataRows for a named query stored in one of
the DataMaps.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#performQuery-java.lang.String-java.util.Map-boolean-">performQuery</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;queryName,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;parameters,
boolean&nbsp;expireCachedLists)</code>
<div class="block">Returns a list of objects or DataRows for a named query stored in one of
the DataMaps.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#registerNewObject-java.lang.Object-">registerNewObject</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">Registers a transient object with the context, recursively registering
all transient persistent objects attached to this object via
relationships.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#rollbackChanges--">rollbackChanges</a></span>()</code>
<div class="block">Reverts any changes that have occurred to objects registered with
DataContext; also performs cascading rollback of all parent DataContexts.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#rollbackChangesLocally--">rollbackChangesLocally</a></span>()</code>
<div class="block">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.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#setDelegate-org.apache.cayenne.access.DataContextDelegate-">setDelegate</a></span>(<a href="../../../../org/apache/cayenne/access/DataContextDelegate.html" title="interface in org.apache.cayenne.access">DataContextDelegate</a>&nbsp;delegate)</code>
<div class="block">Sets a DataContextDelegate for this context.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#setTransactionFactory-org.apache.cayenne.tx.TransactionFactory-">setTransactionFactory</a></span>(<a href="../../../../org/apache/cayenne/tx/TransactionFactory.html" title="interface in org.apache.cayenne.tx">TransactionFactory</a>&nbsp;transactionFactory)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">since 4.0 avoid using this directly. Transaction management
at this level will be eventually removed</span></div>
</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#setUsingSharedSnapshotCache-boolean-">setUsingSharedSnapshotCache</a></span>(boolean&nbsp;flag)</code>&nbsp;</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#uncommittedObjects--">uncommittedObjects</a></span>()</code>
<div class="block">Returns a collection of all uncommitted registered objects.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/access/DataContext.html#unregisterObjects-java.util.Collection-">unregisterObjects</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;dataObjects)</code>
<div class="block">Unregisters a Collection of DataObjects from the DataContext and the
underlying ObjectStore.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.cayenne.BaseContext">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.cayenne.<a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></h3>
<code><a href="../../../../org/apache/cayenne/BaseContext.html#attachToRuntimeIfNeeded--">attachToRuntimeIfNeeded</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#batchIterator-org.apache.cayenne.query.Select-int-">batchIterator</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#bindThreadObjectContext-org.apache.cayenne.ObjectContext-">bindThreadObjectContext</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#deleteObject-java.lang.Object-">deleteObject</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#deleteObjects-java.util.Collection-">deleteObjects</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#deleteObjects-T...-">deleteObjects</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#fireDataChannelCommitted-java.lang.Object-org.apache.cayenne.graph.GraphDiff-">fireDataChannelCommitted</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#fireDataChannelRolledback-java.lang.Object-org.apache.cayenne.graph.GraphDiff-">fireDataChannelRolledback</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#getChannel--">getChannel</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#getEntityResolver--">getEntityResolver</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#getEventManager--">getEventManager</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#getQueryCache--">getQueryCache</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#getThreadObjectContext--">getThreadObjectContext</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#getUserProperties--">getUserProperties</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#getUserProperty-java.lang.String-">getUserProperty</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#injectInitialValue-java.lang.Object-">injectInitialValue</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#invalidateObjects-java.util.Collection-">invalidateObjects</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#invalidateObjects-T...-">invalidateObjects</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#isValidatingObjectsOnCommit--">isValidatingObjectsOnCommit</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#iterate-org.apache.cayenne.query.Select-org.apache.cayenne.ResultIteratorCallback-">iterate</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#localObject-T-">localObject</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#onSync-org.apache.cayenne.ObjectContext-org.apache.cayenne.graph.GraphDiff-int-">onSync</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#prepareForAccess-org.apache.cayenne.Persistent-java.lang.String-boolean-">prepareForAccess</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#propertyChanged-org.apache.cayenne.Persistent-java.lang.String-java.lang.Object-java.lang.Object-">propertyChanged</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#select-org.apache.cayenne.query.Select-">select</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#selectFirst-org.apache.cayenne.query.Select-">selectFirst</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#selectOne-org.apache.cayenne.query.Select-">selectOne</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#setChannel-org.apache.cayenne.DataChannel-">setChannel</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#setEntityResolver-org.apache.cayenne.map.EntityResolver-">setEntityResolver</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#setQueryCache-org.apache.cayenne.cache.QueryCache-">setQueryCache</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#setUserProperty-java.lang.String-java.lang.Object-">setUserProperty</a>, <a href="../../../../org/apache/cayenne/BaseContext.html#setValidatingObjectsOnCommit-boolean-">setValidatingObjectsOnCommit</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="usingSharedSnaphsotCache">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>usingSharedSnaphsotCache</h4>
<pre>protected&nbsp;boolean usingSharedSnaphsotCache</pre>
</li>
</ul>
<a name="objectStore">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>objectStore</h4>
<pre>protected&nbsp;<a href="../../../../org/apache/cayenne/access/ObjectStore.html" title="class in org.apache.cayenne.access">ObjectStore</a> objectStore</pre>
</li>
</ul>
<a name="transactionFactory">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transactionFactory</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
protected transient&nbsp;<a href="../../../../org/apache/cayenne/tx/TransactionFactory.html" title="interface in org.apache.cayenne.tx">TransactionFactory</a> transactionFactory</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">since 4.0 used in a method that itself should be deprecated,
so this is a temp code</span></div>
</li>
</ul>
<a name="mergeHandler">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>mergeHandler</h4>
<pre>protected transient&nbsp;org.apache.cayenne.access.DataContextMergeHandler mergeHandler</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DataContext--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DataContext</h4>
<pre>public&nbsp;DataContext()</pre>
<div class="block">Creates a new DataContext that is not attached to the Cayenne stack.</div>
</li>
</ul>
<a name="DataContext-org.apache.cayenne.DataChannel-org.apache.cayenne.access.ObjectStore-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DataContext</h4>
<pre>public&nbsp;DataContext(<a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a>&nbsp;channel,
<a href="../../../../org/apache/cayenne/access/ObjectStore.html" title="class in org.apache.cayenne.access">ObjectStore</a>&nbsp;objectStore)</pre>
<div class="block">Creates a new DataContext with parent DataChannel and ObjectStore.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="attachToRuntime-org.apache.cayenne.di.Injector-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>attachToRuntime</h4>
<pre>protected&nbsp;void&nbsp;attachToRuntime(<a href="../../../../org/apache/cayenne/di/Injector.html" title="interface in org.apache.cayenne.di">Injector</a>&nbsp;injector)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html#attachToRuntime-org.apache.cayenne.di.Injector-">BaseContext</a></code></span></div>
<div class="block">Attaches this context to the CayenneRuntime whose Injector is passed as
an argument to this method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#attachToRuntime-org.apache.cayenne.di.Injector-">attachToRuntime</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
</dl>
</li>
</ul>
<a name="attachToChannel-org.apache.cayenne.DataChannel-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>attachToChannel</h4>
<pre>protected&nbsp;void&nbsp;attachToChannel(<a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a>&nbsp;channel)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html#attachToChannel-org.apache.cayenne.DataChannel-">BaseContext</a></code></span></div>
<div class="block">Attaches to a provided DataChannel.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#attachToChannel-org.apache.cayenne.DataChannel-">attachToChannel</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.1</dd>
</dl>
</li>
</ul>
<a name="getParentDataDomain--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParentDataDomain</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/access/DataDomain.html" title="class in org.apache.cayenne.access">DataDomain</a>&nbsp;getParentDataDomain()</pre>
<div class="block">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.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>DataDomain that is a direct or indirect parent of this
DataContext in the DataChannel hierarchy.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="setDelegate-org.apache.cayenne.access.DataContextDelegate-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDelegate</h4>
<pre>public&nbsp;void&nbsp;setDelegate(<a href="../../../../org/apache/cayenne/access/DataContextDelegate.html" title="interface in org.apache.cayenne.access">DataContextDelegate</a>&nbsp;delegate)</pre>
<div class="block">Sets a DataContextDelegate for this context. Delegate is notified of
certain events in the DataContext lifecycle and can customize DataContext
behavior.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="getDelegate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDelegate</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/access/DataContextDelegate.html" title="interface in org.apache.cayenne.access">DataContextDelegate</a>&nbsp;getDelegate()</pre>
<div class="block">Returns a delegate currently associated with this DataContext.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="getObjectStore--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getObjectStore</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/access/ObjectStore.html" title="class in org.apache.cayenne.access">ObjectStore</a>&nbsp;getObjectStore()</pre>
<div class="block">Returns ObjectStore associated with this DataContext.</div>
</li>
</ul>
<a name="hasChanges--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasChanges</h4>
<pre>public&nbsp;boolean&nbsp;hasChanges()</pre>
<div class="block">Returns <code>true</code> if there are any modified, deleted or new
objects registered with this DataContext, <code>false</code> otherwise.</div>
</li>
</ul>
<a name="newObjects--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newObjects</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;newObjects()</pre>
<div class="block">Returns a list of objects that are registered with this DataContext and
have a state PersistenceState.NEW</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#newObjects--">newObjects</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#newObjects--">newObjects</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
</dl>
</li>
</ul>
<a name="deletedObjects--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deletedObjects</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;deletedObjects()</pre>
<div class="block">Returns a list of objects that are registered with this DataContext and
have a state PersistenceState.DELETED</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#deletedObjects--">deletedObjects</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#deletedObjects--">deletedObjects</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
</dl>
</li>
</ul>
<a name="modifiedObjects--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>modifiedObjects</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;modifiedObjects()</pre>
<div class="block">Returns a list of objects that are registered with this DataContext and
have a state PersistenceState.MODIFIED</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#modifiedObjects--">modifiedObjects</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#modifiedObjects--">modifiedObjects</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
</dl>
</li>
</ul>
<a name="uncommittedObjects--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uncommittedObjects</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;uncommittedObjects()</pre>
<div class="block">Returns a collection of all uncommitted registered objects.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#uncommittedObjects--">uncommittedObjects</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#uncommittedObjects--">uncommittedObjects</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="currentSnapshot-org.apache.cayenne.Persistent-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>currentSnapshot</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne">DataRow</a>&nbsp;currentSnapshot(<a href="../../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&nbsp;object)</pre>
<div class="block">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></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="objectsFromDataRows-org.apache.cayenne.reflect.ClassDescriptor-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>objectsFromDataRows</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;objectsFromDataRows(<a href="../../../../org/apache/cayenne/reflect/ClassDescriptor.html" title="interface in org.apache.cayenne.reflect">ClassDescriptor</a>&nbsp;descriptor,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne">DataRow</a>&gt;&nbsp;dataRows)</pre>
<div class="block">Converts a list of DataRows to a List of DataObject registered with this
DataContext.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="objectFromDataRow-java.lang.Class-org.apache.cayenne.DataRow-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>objectFromDataRow</h4>
<pre>public&nbsp;&lt;T extends <a href="../../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&gt;&nbsp;T&nbsp;objectFromDataRow(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;objectClass,
<a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne">DataRow</a>&nbsp;dataRow)</pre>
<div class="block">Creates a DataObject from DataRow.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne"><code>DataRow</code></a></dd>
</dl>
</li>
</ul>
<a name="objectFromDataRow-java.lang.String-org.apache.cayenne.DataRow-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>objectFromDataRow</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne">DataObject</a>&nbsp;objectFromDataRow(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;entityName,
<a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne">DataRow</a>&nbsp;dataRow)</pre>
<div class="block">Creates a DataObject from DataRow. This variety of the
'objectFromDataRow' method is normally used for generic classes.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.1</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/cayenne/DataRow.html" title="class in org.apache.cayenne"><code>DataRow</code></a></dd>
</dl>
</li>
</ul>
<a name="newObject-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newObject</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;T&nbsp;newObject(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;persistentClass)</pre>
<div class="block">Creates and registers a new persistent object.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#newObject-java.lang.Class-">newObject</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#newObject-java.lang.Class-">newObject</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="newObject-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newObject</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&nbsp;newObject(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;entityName)</pre>
<div class="block">Instantiates a new object and registers it with this context. Object
class is determined from the mapped entity. Object class must have a
default constructor.
<p>
<i>Note: in most cases <a href="../../../../org/apache/cayenne/access/DataContext.html#newObject-java.lang.Class-"><code>newObject(Class)</code></a> method should be used,
however this method is helpful when generic persistent classes are
used.</i></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="registerNewObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerNewObject</h4>
<pre>public&nbsp;void&nbsp;registerNewObject(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">Registers a transient object with the context, recursively registering
all transient persistent objects attached to this object via
relationships.
<p>
<i>Note that since 3.0 this method takes Object as an argument instead of
a <a href="../../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne"><code>DataObject</code></a>.</i></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#registerNewObject-java.lang.Object-">registerNewObject</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#registerNewObject-java.lang.Object-">registerNewObject</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - new object that needs to be made persistent.</dd>
</dl>
</li>
</ul>
<a name="unregisterObjects-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unregisterObjects</h4>
<pre>public&nbsp;void&nbsp;unregisterObjects(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;dataObjects)</pre>
<div class="block">Unregisters a Collection of DataObjects from the DataContext and the
underlying ObjectStore. This operation also unsets DataContext for
each object and changes its state to TRANSIENT.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/cayenne/BaseContext.html#invalidateObjects-java.util.Collection-"><code>BaseContext.invalidateObjects(Collection)</code></a></dd>
</dl>
</li>
</ul>
<a name="rollbackChangesLocally--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rollbackChangesLocally</h4>
<pre>public&nbsp;void&nbsp;rollbackChangesLocally()</pre>
<div class="block">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.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#rollbackChangesLocally--">rollbackChangesLocally</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#rollbackChangesLocally--">rollbackChangesLocally</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="rollbackChanges--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rollbackChanges</h4>
<pre>public&nbsp;void&nbsp;rollbackChanges()</pre>
<div class="block">Reverts any changes that have occurred to objects registered with
DataContext; also performs cascading rollback of all parent DataContexts.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#rollbackChanges--">rollbackChanges</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#rollbackChanges--">rollbackChanges</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
</dl>
</li>
</ul>
<a name="commitChangesToParent--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>commitChangesToParent</h4>
<pre>public&nbsp;void&nbsp;commitChangesToParent()</pre>
<div class="block">"Flushes" the changes to the parent <a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.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/apache/cayenne/access/DataContext.html#commitChanges--"><code>commitChanges()</code></a>
.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#commitChangesToParent--">commitChangesToParent</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#commitChangesToParent--">commitChangesToParent</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/cayenne/access/DataContext.html#commitChanges--"><code>commitChanges()</code></a></dd>
</dl>
</li>
</ul>
<a name="commitChanges--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>commitChanges</h4>
<pre>public&nbsp;void&nbsp;commitChanges()
throws <a href="../../../../org/apache/cayenne/CayenneRuntimeException.html" title="class in org.apache.cayenne">CayenneRuntimeException</a></pre>
<div class="block">Synchronizes object graph with the database. Executes needed insert,
update and delete queries (generated internally).</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#commitChanges--">commitChanges</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#commitChanges--">commitChanges</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/CayenneRuntimeException.html" title="class in org.apache.cayenne">CayenneRuntimeException</a></code></dd>
</dl>
</li>
</ul>
<a name="onContextFlush-org.apache.cayenne.ObjectContext-org.apache.cayenne.graph.GraphDiff-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onContextFlush</h4>
<pre>protected&nbsp;<a href="../../../../org/apache/cayenne/graph/GraphDiff.html" title="interface in org.apache.cayenne.graph">GraphDiff</a>&nbsp;onContextFlush(<a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a>&nbsp;originatingContext,
<a href="../../../../org/apache/cayenne/graph/GraphDiff.html" title="interface in org.apache.cayenne.graph">GraphDiff</a>&nbsp;changes,
boolean&nbsp;cascade)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#onContextFlush-org.apache.cayenne.ObjectContext-org.apache.cayenne.graph.GraphDiff-boolean-">onContextFlush</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
</dl>
</li>
</ul>
<a name="iterator-org.apache.cayenne.query.Select-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/cayenne/ResultIterator.html" title="interface in org.apache.cayenne">ResultIterator</a>&lt;T&gt;&nbsp;iterator(<a href="../../../../org/apache/cayenne/query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html#iterator-org.apache.cayenne.query.Select-">ObjectContext</a></code></span></div>
<div class="block">Creates a ResultIterator based on the provided query. It is usually
backed by an open result set and is useful for processing of large data
sets, preserving a constant memory footprint. The caller must wrap
iteration in try/finally (or try-with-resources for Java 1.7 and higher) and
close the ResultIterator explicitly.
Or use <a href="../../../../org/apache/cayenne/ObjectContext.html#iterate-org.apache.cayenne.query.Select-org.apache.cayenne.ResultIteratorCallback-"><code>ObjectContext.iterate(Select, ResultIteratorCallback)</code></a> as an alternative.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#iterator-org.apache.cayenne.query.Select-">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#iterator-org.apache.cayenne.query.Select-">iterator</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
</dl>
</li>
</ul>
<a name="performIteratedQuery-org.apache.cayenne.query.Query-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performIteratedQuery</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/ResultIterator.html" title="interface in org.apache.cayenne">ResultIterator</a>&nbsp;performIteratedQuery(<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</pre>
<div class="block">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>
Note that 'performIteratedQuery' always returns ResultIterator over
DataRows. Use
<a href="../../../../org/apache/cayenne/BaseContext.html#iterate-org.apache.cayenne.query.Select-org.apache.cayenne.ResultIteratorCallback-"><code>BaseContext.iterate(Select, org.apache.cayenne.ResultIteratorCallback)</code></a> to
get access to objects.</div>
</li>
</ul>
<a name="performGenericQuery-org.apache.cayenne.query.Query-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performGenericQuery</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/QueryResponse.html" title="interface in org.apache.cayenne">QueryResponse</a>&nbsp;performGenericQuery(<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</pre>
<div class="block">Executes a query returning a generic response.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#performGenericQuery-org.apache.cayenne.query.Query-">performGenericQuery</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#performGenericQuery-org.apache.cayenne.query.Query-">performGenericQuery</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="performQuery-org.apache.cayenne.query.Query-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performQuery</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;performQuery(<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</pre>
<div class="block">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></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#performQuery-org.apache.cayenne.query.Query-">performQuery</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#performQuery-org.apache.cayenne.query.Query-">performQuery</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A list of DataObjects or a DataRows, depending on the value
returned by <a href="../../../../org/apache/cayenne/query/QueryMetadata.html#isFetchingDataRows--"><code>QueryMetadata.isFetchingDataRows()</code></a>.</dd>
</dl>
</li>
</ul>
<a name="onQuery-org.apache.cayenne.ObjectContext-org.apache.cayenne.query.Query-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onQuery</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/QueryResponse.html" title="interface in org.apache.cayenne">QueryResponse</a>&nbsp;onQuery(<a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a>&nbsp;context,
<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</pre>
<div class="block">An implementation of a <a href="../../../../org/apache/cayenne/DataChannel.html" title="interface in org.apache.cayenne"><code>DataChannel</code></a> method that is used by child
contexts to execute queries. Not intended for direct use.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - an ObjectContext that originated the query, used to
register result objects.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a generic response object that encapsulates result of the execution.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="performNonSelectingQuery-org.apache.cayenne.query.Query-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performNonSelectingQuery</h4>
<pre>public&nbsp;int[]&nbsp;performNonSelectingQuery(<a href="../../../../org/apache/cayenne/query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</pre>
<div class="block">Performs a single database query that does not select rows. Returns an
array of update counts.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="performNonSelectingQuery-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performNonSelectingQuery</h4>
<pre>public&nbsp;int[]&nbsp;performNonSelectingQuery(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;queryName)</pre>
<div class="block">Performs a named mapped query that does not select rows. Returns an array
of update counts.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="performNonSelectingQuery-java.lang.String-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performNonSelectingQuery</h4>
<pre>public&nbsp;int[]&nbsp;performNonSelectingQuery(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;queryName,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,?&gt;&nbsp;parameters)</pre>
<div class="block">Performs a named mapped non-selecting query using a map of parameters.
Returns an array of update counts.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="performQuery-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performQuery</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;?&gt;&nbsp;performQuery(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;queryName,
boolean&nbsp;expireCachedLists)</pre>
<div class="block">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.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<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>
<dd><code>expireCachedLists</code> - A flag that determines whether refresh of <b>cached lists</b>
is required in case a query uses caching.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="performQuery-java.lang.String-java.util.Map-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performQuery</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;?&gt;&nbsp;performQuery(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;queryName,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;parameters,
boolean&nbsp;expireCachedLists)</pre>
<div class="block">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.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<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>
<dd><code>parameters</code> - A map of parameters to use with stored query.</dd>
<dd><code>expireCachedLists</code> - A flag that determines whether refresh of <b>cached lists</b>
is required in case a query uses caching.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="isUsingSharedSnapshotCache--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isUsingSharedSnapshotCache</h4>
<pre>public&nbsp;boolean&nbsp;isUsingSharedSnapshotCache()</pre>
<div class="block">Returns <code>true</code> if the ObjectStore uses shared cache of a
parent DataDomain.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="setUsingSharedSnapshotCache-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUsingSharedSnapshotCache</h4>
<pre>public&nbsp;void&nbsp;setUsingSharedSnapshotCache(boolean&nbsp;flag)</pre>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.1</dd>
</dl>
</li>
</ul>
<a name="getGraphManager--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGraphManager</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/graph/GraphManager.html" title="interface in org.apache.cayenne.graph">GraphManager</a>&nbsp;getGraphManager()</pre>
<div class="block">Returns this context's ObjectStore.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/ObjectContext.html#getGraphManager--">getGraphManager</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/ObjectContext.html" title="interface in org.apache.cayenne">ObjectContext</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#getGraphManager--">getGraphManager</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="fireDataChannelChanged-java.lang.Object-org.apache.cayenne.graph.GraphDiff-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fireDataChannelChanged</h4>
<pre>protected&nbsp;void&nbsp;fireDataChannelChanged(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;postedBy,
<a href="../../../../org/apache/cayenne/graph/GraphDiff.html" title="interface in org.apache.cayenne.graph">GraphDiff</a>&nbsp;changes)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/BaseContext.html#fireDataChannelChanged-java.lang.Object-org.apache.cayenne.graph.GraphDiff-">fireDataChannelChanged</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code></dd>
</dl>
</li>
</ul>
<a name="setTransactionFactory-org.apache.cayenne.tx.TransactionFactory-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setTransactionFactory</h4>
<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setTransactionFactory(<a href="../../../../org/apache/cayenne/tx/TransactionFactory.html" title="interface in org.apache.cayenne.tx">TransactionFactory</a>&nbsp;transactionFactory)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">since 4.0 avoid using this directly. Transaction management
at this level will be eventually removed</span></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>4.0</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DataContext.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/cayenne/access/ClientServerChannel.html" title="class in org.apache.cayenne.access"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/cayenne/access/DataContextDelegate.html" title="interface in org.apache.cayenne.access"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cayenne/access/DataContext.html" target="_top">Frames</a></li>
<li><a href="DataContext.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2019 <a href="http://cayenne.apache.org/">Apache Cayenne</a>. All rights reserved.</small></p>
</body>
</html>