Uses of Interface org.apache.cayenne.ObjectContext (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: use: package: org.apache.cayenne, interface: ObjectContext

# Uses of Interface
org.apache.cayenne.ObjectContext

Packages that use ObjectContext
Package
Description
org.apache.cayenne
Contains persistence APIs directly accessible by users.
org.apache.cayenne.access
Contains classes that make up Cayenne ORM stack.
org.apache.cayenne.commitlog
org.apache.cayenne.configuration
org.apache.cayenne.configuration.runtime
org.apache.cayenne.graph
Contains generic graph management tools used in Cayenne.
org.apache.cayenne.query
Defines standard queries supported by Cayenne and extension mechanism to create custom queries.
org.apache.cayenne.runtime
API related to `CayenneRuntime` creation.
org.apache.cayenne.tx
org.apache.cayenne.util
General utility classes.

- ## Uses of ObjectContext in org.apache.cayenne

  Classes in org.apache.cayenne that implement ObjectContext
  Modifier and Type
  Class
  Description
  `class`
  `BaseContext`
  Deprecated, for removal: This API element is subject to removal in a future version.
  since 5.0, use `DataContext` directly
  Fields in org.apache.cayenne declared as ObjectContext
  Modifier and Type
  Field
  Description
  `protected ObjectContext`
  PersistentObject.`objectContext`
  Methods in org.apache.cayenne that return ObjectContext
  Modifier and Type
  Method
  Description
  `ObjectContext`
  Persistent.`getObjectContext()`
  `ObjectContext`
  PersistentObject.`getObjectContext()`
  Methods in org.apache.cayenne with parameters of type ObjectContext
  Modifier and Type
  Method
  Description
  `static <T> T`
  Cayenne.`objectForPK(ObjectContext context, Class<T> persistentObjectClass, int pk)`
  Returns an object matching an int primary key.
  `static <T> T`
  Cayenne.`objectForPK(ObjectContext context, Class<T> persistentObjectClass, Object pk)`
  Returns an object matching an Object primary key.
  `static <T> T`
  Cayenne.`objectForPK(ObjectContext context, Class<T> persistantObjectClass, Map<String,?> pk)`
  Returns an object matching a primary key.
  `static Object`
  Cayenne.`objectForPK(ObjectContext context, String objEntityName, int pk)`
  Returns an object matching an int primary key.
  `static Object`
  Cayenne.`objectForPK(ObjectContext context, String objEntityName, Object pk)`
  Returns an object matching an Object primary key.
  `static Object`
  Cayenne.`objectForPK(ObjectContext context, String objEntityName, Map<String,?> pk)`
  Returns an object matching a primary key.
  `static Object`
  Cayenne.`objectForPK(ObjectContext context, ObjectId id)`
  Returns an object matching ObjectId.
  `static Object`
  Cayenne.`objectForQuery(ObjectContext context, Query query)`
  Returns an object or a DataRow that is a result of a given query.
  `QueryResponse`
  DataChannel.`onQuery(ObjectContext originatingContext, Query query)`
  Executes a query, using provided context to register persistent objects if query returns any objects.
  `QueryResponse`
  DataChannelQueryFilter.`onQuery(ObjectContext originatingContext, Query query, DataChannelQueryFilterChain filterChain)`
  `QueryResponse`
  DataChannelQueryFilterChain.`onQuery(ObjectContext originatingContext, Query query)`
  `GraphDiff`
  DataChannel.`onSync(ObjectContext originatingContext, GraphDiff changes, int syncType)`
  Processes synchronization request from a child ObjectContext, returning a GraphDiff that describes changes to objects made on the receiving end as a result of synchronization.
  `GraphDiff`
  DataChannelSyncFilter.`onSync(ObjectContext originatingContext, GraphDiff changes, int syncType, DataChannelSyncFilterChain filterChain)`
  `GraphDiff`
  DataChannelSyncFilterChain.`onSync(ObjectContext originatingContext, GraphDiff changes, int syncType)`
  `void`
  Persistent.`setObjectContext(ObjectContext objectContext)`
  `void`
  PersistentObject.`setObjectContext(ObjectContext objectContext)`

- ## Uses of ObjectContext in org.apache.cayenne.access

  Classes in org.apache.cayenne.access that implement ObjectContext
  Modifier and Type
  Class
  Description
  `class`
  `DataContext`
  The most common implementation of `ObjectContext`.
  Fields in org.apache.cayenne.access with type parameters of type ObjectContext
  Modifier and Type
  Field
  Description
  `protected static final ThreadLocal<ObjectContext>`
  DataContext.`threadObjectContext`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Methods in org.apache.cayenne.access that return ObjectContext
  Modifier and Type
  Method
  Description
  `static ObjectContext`
  DataContext.`getThreadObjectContext()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  if you are using thread context, you can create your own ThreadLocal
  Methods in org.apache.cayenne.access with parameters of type ObjectContext
  Modifier and Type
  Method
  Description
  `static void`
  DataContext.`bindThreadObjectContext(ObjectContext context)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  if you are using thread context, you can create your own ThreadLocal
  `Map<?,?>`
  OptimisticLockException.`getFreshSnapshot(ObjectContext context)`
  Retrieves fresh snapshot for the failed row.
  `protected GraphDiff`
  DataContext.`onContextFlush(ObjectContext originatingContext, GraphDiff changes, boolean cascade)`
  `QueryResponse`
  DataContext.`onQuery(ObjectContext context, Query query)`
  An implementation of a `DataChannel` method that is used by child contexts to execute queries.
  `QueryResponse`
  DataDomain.`onQuery(ObjectContext originatingContext, Query query)`
  Runs query returning generic QueryResponse.
  `GraphDiff`
  DataContext.`onSync(ObjectContext originatingContext, GraphDiff changes, int syncType)`
  `GraphDiff`
  DataDomain.`onSync(ObjectContext originatingContext, GraphDiff changes, int syncType)`
  Only handles commit-type synchronization, ignoring any other type.

- ## Uses of ObjectContext in org.apache.cayenne.commitlog

  Methods in org.apache.cayenne.commitlog with parameters of type ObjectContext
  Modifier and Type
  Method
  Description
  `void`
  CommitLogListener.`onPostCommit(ObjectContext originatingContext, ChangeMap changes)`
  `GraphDiff`
  CommitLogFilter.`onSync(ObjectContext originatingContext, GraphDiff beforeDiff, int syncType, DataChannelSyncFilterChain filterChain)`

- ## Uses of ObjectContext in org.apache.cayenne.configuration

  Methods in org.apache.cayenne.configuration that return ObjectContext
  Modifier and Type
  Method
  Description
  `ObjectContext`
  ObjectContextFactory.`createContext()`
  Creates an ObjectContext attached to a default DataChannel.
  `ObjectContext`
  ObjectContextFactory.`createContext(DataChannel parent)`
  Creates an ObjectContext attached to a provided channel.

- ## Uses of ObjectContext in org.apache.cayenne.configuration.runtime

  Methods in org.apache.cayenne.configuration.runtime that return ObjectContext
  Modifier and Type
  Method
  Description
  `ObjectContext`
  DataContextFactory.`createContext()`
  `ObjectContext`
  DataContextFactory.`createContext(DataChannel parent)`
  `protected ObjectContext`
  DataContextFactory.`createdFromDataDomain(DataDomain parent)`
  `protected ObjectContext`
  DataContextFactory.`createFromDataContext(DataContext parent)`
  `protected ObjectContext`
  DataContextFactory.`createFromGenericChannel(DataChannel parent)`

- ## Uses of ObjectContext in org.apache.cayenne.graph

  Fields in org.apache.cayenne.graph declared as ObjectContext
  Modifier and Type
  Field
  Description
  `protected ObjectContext`
  ChildDiffLoader.`context`
  Constructors in org.apache.cayenne.graph with parameters of type ObjectContext
  Modifier
  Constructor
  Description
  ``
  `ChildDiffLoader(ObjectContext context)`

- ## Uses of ObjectContext in org.apache.cayenne.query

  Methods in org.apache.cayenne.query with parameters of type ObjectContext
  Modifier and Type
  Method
  Description
  `ResultBatchIterator<T>`
  FluentSelect.`batchIterator(ObjectContext context, int size)`
  `ResultBatchIterator<T>`
  MappedSelect.`batchIterator(ObjectContext context, int size)`
  `ResultBatchIterator<T>`
  Select.`batchIterator(ObjectContext context, int size)`
  Creates a ResultBatchIterator based on the provided context and batch size.
  `ResultBatchIterator<T>`
  SelectById.`batchIterator(ObjectContext context, int size)`
  `ResultBatchIterator<T>`
  SQLSelect.`batchIterator(ObjectContext context, int size)`
  `int[]`
  ProcedureCall.`batchUpdate(ObjectContext context)`
  `ProcedureResult<T>`
  ProcedureCall.`call(ObjectContext context)`
  `QueryResult`
  MappedExec.`execute(ObjectContext context)`
  `QueryResult`
  SQLExec.`execute(ObjectContext context)`
  `void`
  FluentSelect.`iterate(ObjectContext context, ResultIteratorCallback<T> callback)`
  `void`
  MappedSelect.`iterate(ObjectContext context, ResultIteratorCallback<T> callback)`
  `void`
  Select.`iterate(ObjectContext context, ResultIteratorCallback<T> callback)`
  Creates a ResultIterator based on the provided context and passes it to a callback for processing.
  `void`
  SelectById.`iterate(ObjectContext context, ResultIteratorCallback<T> callback)`
  `void`
  SQLSelect.`iterate(ObjectContext context, ResultIteratorCallback<T> callback)`
  `ResultIterator<T>`
  FluentSelect.`iterator(ObjectContext context)`
  `ResultIterator<T>`
  MappedSelect.`iterator(ObjectContext context)`
  `ResultIterator<T>`
  Select.`iterator(ObjectContext context)`
  Creates a ResultIterator based on the provided context.
  `ResultIterator<T>`
  SelectById.`iterator(ObjectContext context)`
  `ResultIterator<T>`
  SQLSelect.`iterator(ObjectContext context)`
  `List<T>`
  FluentSelect.`select(ObjectContext context)`
  `List<T>`
  MappedSelect.`select(ObjectContext context)`
  `List<T>`
  ProcedureCall.`select(ObjectContext context)`
  `List<T>`
  Select.`select(ObjectContext context)`
  Selects objects using provided context.
  `List<T>`
  SelectById.`select(ObjectContext context)`
  `List<T>`
  SQLSelect.`select(ObjectContext context)`
  `long`
  ObjectSelect.`selectCount(ObjectContext context)`
  Quick way to select count of records
  `T`
  ColumnSelect.`selectFirst(ObjectContext context)`
  `T`
  MappedSelect.`selectFirst(ObjectContext context)`
  `T`
  ObjectSelect.`selectFirst(ObjectContext context)`
  `T`
  Select.`selectFirst(ObjectContext context)`
  Selects a single object using provided context.
  `T`
  SelectById.`selectFirst(ObjectContext context)`
  `T`
  SQLSelect.`selectFirst(ObjectContext context)`
  `T`
  FluentSelect.`selectOne(ObjectContext context)`
  `T`
  MappedSelect.`selectOne(ObjectContext context)`
  `T`
  Select.`selectOne(ObjectContext context)`
  Selects a single object using provided context.
  `T`
  SelectById.`selectOne(ObjectContext context)`
  `T`
  SQLSelect.`selectOne(ObjectContext context)`
  `int[]`
  MappedExec.`update(ObjectContext context)`
  `int`
  ProcedureCall.`update(ObjectContext context)`
  `int`
  SQLExec.`update(ObjectContext context)`
  `int[]`
  SQLExec.`updateBatch(ObjectContext context)`

- ## Uses of ObjectContext in org.apache.cayenne.runtime

  Methods in org.apache.cayenne.runtime that return ObjectContext
  Modifier and Type
  Method
  Description
  `ObjectContext`
  CayenneRuntime.`newContext()`
  Returns a new ObjectContext instance based on the runtime's main DataChannel.
  `ObjectContext`
  CayenneRuntime.`newContext(DataChannel parentChannel)`
  Returns a new ObjectContext which is a child of the specified DataChannel.

- ## Uses of ObjectContext in org.apache.cayenne.tx

  Methods in org.apache.cayenne.tx with parameters of type ObjectContext
  Modifier and Type
  Method
  Description
  `GraphDiff`
  TransactionFilter.`onSync(ObjectContext originatingContext, GraphDiff changes, int syncType, DataChannelSyncFilterChain filterChain)`

- ## Uses of ObjectContext in org.apache.cayenne.util

  Fields in org.apache.cayenne.util declared as ObjectContext
  Modifier and Type
  Field
  Description
  `protected ObjectContext`
  ObjectContextQueryAction.`actingContext`
  `protected ObjectContext`
  ObjectContextGraphAction.`context`
  `protected ObjectContext`
  ObjectContextQueryAction.`targetContext`
  Constructors in org.apache.cayenne.util with parameters of type ObjectContext
  Modifier
  Constructor
  Description
  ``
  `DeepMergeOperation(ObjectContext context)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  ``
  `ObjectContextGraphAction(ObjectContext context)`
  ``
  `ObjectContextQueryAction(ObjectContext actingContext, ObjectContext targetContext, Query query)`
  ``
  `ShallowMergeOperation(ObjectContext context)`