blob: b07f607d08e26d727b7271b3ad09c5352bccb247 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Fri Jun 14 12:28:32 GET 2024 -->
<title>ObjectContext (cayenne-doc: Cayenne Documentation 4.2.1 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2024-06-14">
<meta name="description" content="declaration: package: org.apache.cayenne, interface: ObjectContext">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<div class="about-language"><a href="https://cayenne.apache.org" target="top">Apache Cayenne</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/ObjectContext.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#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li><a href="#field-summary">Field</a></li>
<li>Constr</li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.cayenne</a></div>
<h1 title="Interface ObjectContext" class="title">Interface ObjectContext</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Superinterfaces:</dt>
<dd><code><a href="DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a></code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code></dd>
</dl>
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="BaseContext.html" title="class in org.apache.cayenne">BaseContext</a></code>, <code><a href="access/DataContext.html" title="class in org.apache.cayenne.access">DataContext</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">ObjectContext</span><span class="extends-implements">
extends <a href="DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></span></div>
<div class="block">A Cayenne object facade to a persistent store. Instances of ObjectContext are
used in the application code to access Cayenne persistence features.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.2</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.cayenne.DataChannel">Fields inherited from interface&nbsp;org.apache.cayenne.<a href="DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a></h3>
<code><a href="DataChannel.html#FLUSH_CASCADE_SYNC">FLUSH_CASCADE_SYNC</a>, <a href="DataChannel.html#FLUSH_NOCASCADE_SYNC">FLUSH_NOCASCADE_SYNC</a>, <a href="DataChannel.html#GRAPH_CHANGED_SUBJECT">GRAPH_CHANGED_SUBJECT</a>, <a href="DataChannel.html#GRAPH_FLUSHED_SUBJECT">GRAPH_FLUSHED_SUBJECT</a>, <a href="DataChannel.html#GRAPH_ROLLEDBACK_SUBJECT">GRAPH_ROLLEDBACK_SUBJECT</a>, <a href="DataChannel.html#ROLLBACK_CASCADE_SYNC">ROLLBACK_CASCADE_SYNC</a></code></div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;<a href="ResultBatchIterator.html" title="class in org.apache.cayenne">ResultBatchIterator</a><wbr>&lt;T&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#batchIterator(org.apache.cayenne.query.Select,int)" class="member-name-link">batchIterator</a><wbr>(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query,
int&nbsp;size)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Creates a ResultBatchIterator based on the provided query and batch size.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#commitChanges()" class="member-name-link">commitChanges</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Flushes all changes to objects in this context to the parent DataChannel,
cascading flush operation all the way through the stack, ultimately
saving data in the database.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#commitChangesToParent()" class="member-name-link">commitChangesToParent</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Flushes all changes to objects in this context to the parent DataChannel.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deletedObjects()" class="member-name-link">deletedObjects</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a collection of objects that are registered with this
ObjectContext and have a state PersistenceState.DELETED</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deleteObject(java.lang.Object)" class="member-name-link">deleteObject</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Schedules deletion of a persistent object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deleteObjects(java.util.Collection)" class="member-name-link">deleteObjects</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;?&gt;&nbsp;objects)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Schedules deletion of a collection of persistent objects.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#deleteObjects(T...)" class="member-name-link">deleteObjects</a><wbr>(T...&nbsp;objects)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Schedules deletion of one or more persistent objects.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getChannel()" class="member-name-link">getChannel</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns an DataChannel used by this context.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="map/EntityResolver.html" title="class in org.apache.cayenne.map">EntityResolver</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getEntityResolver()" class="member-name-link">getEntityResolver</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns EntityResolver that stores all mapping information accessible by
this ObjectContext.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="graph/GraphManager.html" title="interface in org.apache.cayenne.graph">GraphManager</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getGraphManager()" class="member-name-link">getGraphManager</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns GraphManager that manages object graph associated with this
context.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getUserProperty(java.lang.String)" class="member-name-link">getUserProperty</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;key)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a user-defined property previously set via 'setUserProperty'.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#hasChanges()" class="member-name-link">hasChanges</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns <code>true</code> if there are any modified, deleted or new
objects registered with this ObjectContext, <code>false</code> otherwise.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#invalidateObjects(java.util.Collection)" class="member-name-link">invalidateObjects</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;?&gt;&nbsp;objects)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Invalidates a Collection of persistent objects.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#invalidateObjects(T...)" class="member-name-link">invalidateObjects</a><wbr>(T...&nbsp;objects)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Invalidates one or more persistent objects.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#iterate(org.apache.cayenne.query.Select,org.apache.cayenne.ResultIteratorCallback)" class="member-name-link">iterate</a><wbr>(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query,
<a href="ResultIteratorCallback.html" title="interface in org.apache.cayenne">ResultIteratorCallback</a>&lt;T&gt;&nbsp;callback)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Creates a ResultIterator based on the provided query and passes it to a
callback for processing.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;<a href="ResultIterator.html" title="interface in org.apache.cayenne">ResultIterator</a><wbr>&lt;T&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#iterator(org.apache.cayenne.query.Select)" class="member-name-link">iterator</a><wbr>(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Creates a ResultIterator based on the provided query.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T extends <a href="Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&gt;<br>T</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#localObject(T)" class="member-name-link">localObject</a><wbr>(T&nbsp;objectFromAnotherContext)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a local copy of 'objectFromAnotherContext' object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#modifiedObjects()" class="member-name-link">modifiedObjects</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a collection of objects that are registered with this
ObjectContext and have a state PersistenceState.MODIFIED</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;T</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#newObject(java.lang.Class)" class="member-name-link">newObject</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;persistentClass)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Creates a new persistent object of a given class scheduled to be inserted
to the database on next commit.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#newObjects()" class="member-name-link">newObjects</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a collection of objects that are registered with this
ObjectContext and have a state PersistenceState.NEW</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="QueryResponse.html" title="interface in org.apache.cayenne">QueryResponse</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#performGenericQuery(org.apache.cayenne.query.Query)" class="member-name-link">performGenericQuery</a><wbr>(<a href="query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Executes any kind of query providing the result in a form of
QueryResponse.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html" title="class or interface in java.util" class="external-link">List</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#performQuery(org.apache.cayenne.query.Query)" class="member-name-link">performQuery</a><wbr>(<a href="query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Executes a selecting query, returning a list of persistent objects or
data rows.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#prepareForAccess(org.apache.cayenne.Persistent,java.lang.String,boolean)" class="member-name-link">prepareForAccess</a><wbr>(<a href="Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;property,
boolean&nbsp;lazyFaulting)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">A callback method that child Persistent objects are expected to call
before accessing property values.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#propertyChanged(org.apache.cayenne.Persistent,java.lang.String,java.lang.Object,java.lang.Object)" class="member-name-link">propertyChanged</a><wbr>(<a href="Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;property,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;oldValue,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;newValue)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">A callback method that child Persistent objects are expected to call from
inside the setter after modifying a value of a persistent property,
including "simple" and "arc" properties.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#registerNewObject(java.lang.Object)" class="member-name-link">registerNewObject</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Registers a transient object with the context.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#rollbackChanges()" class="member-name-link">rollbackChanges</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Resets all uncommitted changes made to the objects in this ObjectContext,
cascading rollback operation all the way through the stack.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#rollbackChangesLocally()" class="member-name-link">rollbackChangesLocally</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Resets all uncommitted changes made to the objects in this ObjectContext.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><wbr>&lt;T&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#select(org.apache.cayenne.query.Select)" class="member-name-link">select</a><wbr>(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Executes a selecting query, returning a list of persistent objects or
data rows.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;T</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#selectFirst(org.apache.cayenne.query.Select)" class="member-name-link">selectFirst</a><wbr>(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Selects a single object using provided query.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;T&gt;&nbsp;T</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#selectOne(org.apache.cayenne.query.Select)" class="member-name-link">selectOne</a><wbr>(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Executes a selecting query, returning either NULL if query matched no
objects, or a single object.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setUserProperty(java.lang.String,java.lang.Object)" class="member-name-link">setUserProperty</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;key,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets a user-defined property.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#uncommittedObjects()" class="member-name-link">uncommittedObjects</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a collection of MODIFIED, DELETED or NEW objects.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.cayenne.DataChannel">Methods inherited from interface&nbsp;org.apache.cayenne.<a href="DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a></h3>
<code><a href="DataChannel.html#getEventManager()">getEventManager</a>, <a href="DataChannel.html#onQuery(org.apache.cayenne.ObjectContext,org.apache.cayenne.query.Query)">onQuery</a>, <a href="DataChannel.html#onSync(org.apache.cayenne.ObjectContext,org.apache.cayenne.graph.GraphDiff,int)">onSync</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getEntityResolver()">
<h3>getEntityResolver</h3>
<div class="member-signature"><span class="return-type"><a href="map/EntityResolver.html" title="class in org.apache.cayenne.map">EntityResolver</a></span>&nbsp;<span class="element-name">getEntityResolver</span>()</div>
<div class="block">Returns EntityResolver that stores all mapping information accessible by
this ObjectContext.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="DataChannel.html#getEntityResolver()">getEntityResolver</a></code>&nbsp;in interface&nbsp;<code><a href="DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="newObjects()">
<h3>newObjects</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;?&gt;</span>&nbsp;<span class="element-name">newObjects</span>()</div>
<div class="block">Returns a collection of objects that are registered with this
ObjectContext and have a state PersistenceState.NEW</div>
</section>
</li>
<li>
<section class="detail" id="deletedObjects()">
<h3>deletedObjects</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;?&gt;</span>&nbsp;<span class="element-name">deletedObjects</span>()</div>
<div class="block">Returns a collection of objects that are registered with this
ObjectContext and have a state PersistenceState.DELETED</div>
</section>
</li>
<li>
<section class="detail" id="modifiedObjects()">
<h3>modifiedObjects</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;?&gt;</span>&nbsp;<span class="element-name">modifiedObjects</span>()</div>
<div class="block">Returns a collection of objects that are registered with this
ObjectContext and have a state PersistenceState.MODIFIED</div>
</section>
</li>
<li>
<section class="detail" id="uncommittedObjects()">
<h3>uncommittedObjects</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;?&gt;</span>&nbsp;<span class="element-name">uncommittedObjects</span>()</div>
<div class="block">Returns a collection of MODIFIED, DELETED or NEW objects.</div>
</section>
</li>
<li>
<section class="detail" id="localObject(T)">
<h3 id="localObject(org.apache.cayenne.Persistent)">localObject</h3>
<div class="member-signature"><span class="type-parameters">&lt;T extends <a href="Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&gt;</span>&nbsp;<span class="return-type">T</span>&nbsp;<span class="element-name">localObject</span><wbr><span class="parameters">(T&nbsp;objectFromAnotherContext)</span></div>
<div class="block">Returns a local copy of 'objectFromAnotherContext' object. "Local" means
that the returned object is registered in this context. If the local
object hasn't been previously cached in this context, a hollow object is
created and returned to the caller. No DB query is performed to resolve
an object.
<p>
Note that passing an object with a non-existing id, may later result in
FaultFailureException on attempt to read returned object properties.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>3.1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="newObject(java.lang.Class)">
<h3>newObject</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">T</span>&nbsp;<span class="element-name">newObject</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;persistentClass)</span></div>
<div class="block">Creates a new persistent object of a given class scheduled to be inserted
to the database on next commit.</div>
</section>
</li>
<li>
<section class="detail" id="registerNewObject(java.lang.Object)">
<h3>registerNewObject</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">registerNewObject</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</span></div>
<div class="block">Registers a transient object with the context. The difference with
<a href="#newObject(java.lang.Class)"><code>newObject(Class)</code></a> is that a user creates an object herself,
before attaching it to the context, instead of relying on Cayenne to do
that.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>object</code> - new object that needs to be made persistent.</dd>
<dt>Since:</dt>
<dd>3.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deleteObject(java.lang.Object)">
<h3>deleteObject</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">deleteObject</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</span>
throws <span class="exceptions"><a href="DeleteDenyException.html" title="class in org.apache.cayenne">DeleteDenyException</a></span></div>
<div class="block">Schedules deletion of a persistent object.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="DeleteDenyException.html" title="class in org.apache.cayenne">DeleteDenyException</a></code> - if a <a href="map/DeleteRule.html#DENY"><code>DeleteRule.DENY</code></a> delete
rule is applicable for object deletion.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deleteObjects(java.util.Collection)">
<h3>deleteObjects</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">deleteObjects</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;?&gt;&nbsp;objects)</span>
throws <span class="exceptions"><a href="DeleteDenyException.html" title="class in org.apache.cayenne">DeleteDenyException</a></span></div>
<div class="block">Schedules deletion of a collection of persistent objects.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="DeleteDenyException.html" title="class in org.apache.cayenne">DeleteDenyException</a></code> - if a <a href="map/DeleteRule.html#DENY"><code>DeleteRule.DENY</code></a> delete
rule is applicable for object deletion.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deleteObjects(T...)">
<h3 id="deleteObjects(java.lang.Object[])">deleteObjects</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">deleteObjects</span><wbr><span class="parameters">(T...&nbsp;objects)</span>
throws <span class="exceptions"><a href="DeleteDenyException.html" title="class in org.apache.cayenne">DeleteDenyException</a></span></div>
<div class="block">Schedules deletion of one or more persistent objects. Same as
<a href="#deleteObjects(java.util.Collection)"><code>deleteObjects(Collection)</code></a> only with a vararg argument list for
easier deletion of individual objects.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="DeleteDenyException.html" title="class in org.apache.cayenne">DeleteDenyException</a></code> - if a <a href="map/DeleteRule.html#DENY"><code>DeleteRule.DENY</code></a> delete
rule is applicable for object deletion.</dd>
<dt>Since:</dt>
<dd>3.1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="prepareForAccess(org.apache.cayenne.Persistent,java.lang.String,boolean)">
<h3>prepareForAccess</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">prepareForAccess</span><wbr><span class="parameters">(<a href="Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;property,
boolean&nbsp;lazyFaulting)</span></div>
<div class="block">A callback method that child Persistent objects are expected to call
before accessing property values. This callback allows ObjectContext to
"inflate" unresolved objects on demand and also resolve properties that
rely on lazy faulting.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>3.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="propertyChanged(org.apache.cayenne.Persistent,java.lang.String,java.lang.Object,java.lang.Object)">
<h3>propertyChanged</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">propertyChanged</span><wbr><span class="parameters">(<a href="Persistent.html" title="interface in org.apache.cayenne">Persistent</a>&nbsp;object,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;property,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;oldValue,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;newValue)</span></div>
<div class="block">A callback method that child Persistent objects are expected to call from
inside the setter after modifying a value of a persistent property,
including "simple" and "arc" properties.</div>
</section>
</li>
<li>
<section class="detail" id="commitChanges()">
<h3>commitChanges</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">commitChanges</span>()</div>
<div class="block">Flushes all changes to objects in this context to the parent DataChannel,
cascading flush operation all the way through the stack, ultimately
saving data in the database.</div>
</section>
</li>
<li>
<section class="detail" id="commitChangesToParent()">
<h3>commitChangesToParent</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">commitChangesToParent</span>()</div>
<div class="block">Flushes all changes to objects in this context to the parent DataChannel.
Same as <a href="#commitChanges()"><code>commitChanges()</code></a>, but no cascading flush occurs.</div>
</section>
</li>
<li>
<section class="detail" id="rollbackChanges()">
<h3>rollbackChanges</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">rollbackChanges</span>()</div>
<div class="block">Resets all uncommitted changes made to the objects in this ObjectContext,
cascading rollback operation all the way through the stack.</div>
</section>
</li>
<li>
<section class="detail" id="rollbackChangesLocally()">
<h3>rollbackChangesLocally</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">rollbackChangesLocally</span>()</div>
<div class="block">Resets all uncommitted changes made to the objects in this ObjectContext.
Same as <a href="#rollbackChanges()"><code>rollbackChanges()</code></a>, but rollback is local to this
context and no cascading changes undoing occurs.</div>
</section>
</li>
<li>
<section class="detail" id="performQuery(org.apache.cayenne.query.Query)">
<h3>performQuery</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html" title="class or interface in java.util" class="external-link">List</a></span>&nbsp;<span class="element-name">performQuery</span><wbr><span class="parameters">(<a href="query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</span></div>
<div class="block">Executes a selecting query, returning a list of persistent objects or
data rows.</div>
</section>
</li>
<li>
<section class="detail" id="select(org.apache.cayenne.query.Select)">
<h3>select</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;T&gt;</span>&nbsp;<span class="element-name">select</span><wbr><span class="parameters">(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</span></div>
<div class="block">Executes a selecting query, returning a list of persistent objects or
data rows.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>4.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="selectOne(org.apache.cayenne.query.Select)">
<h3>selectOne</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">T</span>&nbsp;<span class="element-name">selectOne</span><wbr><span class="parameters">(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</span></div>
<div class="block">Executes a selecting query, returning either NULL if query matched no
objects, or a single object. If query matches more than one object,
<a href="CayenneRuntimeException.html" title="class in org.apache.cayenne"><code>CayenneRuntimeException</code></a> is thrown.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>4.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="selectFirst(org.apache.cayenne.query.Select)">
<h3>selectFirst</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">T</span>&nbsp;<span class="element-name">selectFirst</span><wbr><span class="parameters">(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</span></div>
<div class="block">Selects a single object using provided query. The query itself can
match any number of objects, but will return only the first one. It
returns null if no objects were matched.
<p>
If it matched more than one object, the first object from the list is
returned. This makes 'selectFirst' different from
<a href="#selectOne(org.apache.cayenne.query.Select)"><code>selectOne(Select)</code></a>, which would throw in this situation.
'selectFirst' is useful e.g. when the query is ordered and we only want
to see the first object (e.g. "most recent news article"), etc.
<p>
Selecting the first object via "Select.selectFirst(ObjectContext)"
is more comprehensible than selecting via "ObjectContext.selectFirst(Select)",
because implementations of "Select" set fetch size limit to one.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>4.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="iterate(org.apache.cayenne.query.Select,org.apache.cayenne.ResultIteratorCallback)">
<h3>iterate</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">iterate</span><wbr><span class="parameters">(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query,
<a href="ResultIteratorCallback.html" title="interface in org.apache.cayenne">ResultIteratorCallback</a>&lt;T&gt;&nbsp;callback)</span></div>
<div class="block">Creates a ResultIterator based on the provided query and passes it to a
callback for processing. The caller does not need to worry about closing
the iterator. This method takes care of it.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>4.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="iterator(org.apache.cayenne.query.Select)">
<h3>iterator</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="ResultIterator.html" title="interface in org.apache.cayenne">ResultIterator</a>&lt;T&gt;</span>&nbsp;<span class="element-name">iterator</span><wbr><span class="parameters">(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query)</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="#iterate(org.apache.cayenne.query.Select,org.apache.cayenne.ResultIteratorCallback)"><code>iterate(Select, ResultIteratorCallback)</code></a> as an alternative.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>4.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="batchIterator(org.apache.cayenne.query.Select,int)">
<h3>batchIterator</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="ResultBatchIterator.html" title="class in org.apache.cayenne">ResultBatchIterator</a>&lt;T&gt;</span>&nbsp;<span class="element-name">batchIterator</span><wbr><span class="parameters">(<a href="query/Select.html" title="interface in org.apache.cayenne.query">Select</a>&lt;T&gt;&nbsp;query,
int&nbsp;size)</span></div>
<div class="block">Creates a ResultBatchIterator based on the provided query and batch size. 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 ResultBatchIterator explicitly.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>4.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="performGenericQuery(org.apache.cayenne.query.Query)">
<h3>performGenericQuery</h3>
<div class="member-signature"><span class="return-type"><a href="QueryResponse.html" title="interface in org.apache.cayenne">QueryResponse</a></span>&nbsp;<span class="element-name">performGenericQuery</span><wbr><span class="parameters">(<a href="query/Query.html" title="interface in org.apache.cayenne.query">Query</a>&nbsp;query)</span></div>
<div class="block">Executes any kind of query providing the result in a form of
QueryResponse.</div>
</section>
</li>
<li>
<section class="detail" id="getGraphManager()">
<h3>getGraphManager</h3>
<div class="member-signature"><span class="return-type"><a href="graph/GraphManager.html" title="interface in org.apache.cayenne.graph">GraphManager</a></span>&nbsp;<span class="element-name">getGraphManager</span>()</div>
<div class="block">Returns GraphManager that manages object graph associated with this
context.</div>
</section>
</li>
<li>
<section class="detail" id="getChannel()">
<h3>getChannel</h3>
<div class="member-signature"><span class="return-type"><a href="DataChannel.html" title="interface in org.apache.cayenne">DataChannel</a></span>&nbsp;<span class="element-name">getChannel</span>()</div>
<div class="block">Returns an DataChannel used by this context.</div>
</section>
</li>
<li>
<section class="detail" id="hasChanges()">
<h3>hasChanges</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">hasChanges</span>()</div>
<div class="block">Returns <code>true</code> if there are any modified, deleted or new
objects registered with this ObjectContext, <code>false</code> otherwise.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>3.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="invalidateObjects(java.util.Collection)">
<h3>invalidateObjects</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">invalidateObjects</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;?&gt;&nbsp;objects)</span></div>
<div class="block">Invalidates a Collection of persistent objects. This operation only
applies to the objects already committed to the database and does nothing
to the NEW objects. It would remove each object's snapshot from caches
and change object's state to HOLLOW. On the next access to this object,
the object will be refetched.</div>
</section>
</li>
<li>
<section class="detail" id="invalidateObjects(T...)">
<h3 id="invalidateObjects(java.lang.Object[])">invalidateObjects</h3>
<div class="member-signature"><span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">invalidateObjects</span><wbr><span class="parameters">(T...&nbsp;objects)</span></div>
<div class="block">Invalidates one or more persistent objects. Same as
<a href="#invalidateObjects(java.util.Collection)"><code>invalidateObjects(Collection)</code></a> only with a vararg argument list
for easier invalidation of individual objects. If no arguments are passed
to this method, it does nothing.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>3.1</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getUserProperty(java.lang.String)">
<h3>getUserProperty</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span>&nbsp;<span class="element-name">getUserProperty</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;key)</span></div>
<div class="block">Returns a user-defined property previously set via 'setUserProperty'.
Concurrent access to properties does not require any special
synchronization</div>
<dl class="notes">
<dt>Since:</dt>
<dd>3.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setUserProperty(java.lang.String,java.lang.Object)">
<h3>setUserProperty</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setUserProperty</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;key,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value)</span></div>
<div class="block">Sets a user-defined property. Concurrent access to properties does not
require any special synchronization</div>
<dl class="notes">
<dt>Since:</dt>
<dd>3.0</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2001&#x2013;2024 <a href="https://cayenne.apache.org/">Apache Cayenne</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>