ObjectContextFactory (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.configuration, interface: ObjectContextFactory

# Interface ObjectContextFactory

All Known Implementing Classes:
  `DataContextFactory`

public interface ObjectContextFactory
A factory for regular and nested contexts.

Since:
  3.1

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ObjectContext`
  `createContext()`
  Creates an ObjectContext attached to a default DataChannel.
  `ObjectContext`
  `createContext(DataChannel parent)`
  Creates an ObjectContext attached to a provided channel.

- ## Method Details

  - ### createContext

    ObjectContext createContext()
    Creates an ObjectContext attached to a default DataChannel.

  - ### createContext

    ObjectContext createContext(DataChannel parent)
    Creates an ObjectContext attached to a provided channel. This is often used for nested context creation.