# Deprecated API

## Contents

- Terminally Deprecated
- Packages
- Interfaces
- Classes
- Fields
- Methods
- Constructors

- Terminally Deprecated Elements
  Element
  Description
  org.apache.cayenne.access.IncrementalFaultList.fillIn(Query, List<Object>)
  since 5.0, does nothing
  org.apache.cayenne.BaseContext
  since 5.0, use `DataContext` directly
  org.apache.cayenne.BaseDataObject
  since 5.0, use `PersistentObject` directly
  org.apache.cayenne.configuration.Constants.SERVER_ADAPTER_DETECTORS_LIST
  since 5.0, use `Constants.ADAPTER_DETECTORS_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_CONTEXTS_SYNC_PROPERTY
  since 5.0, use `Constants.CONTEXTS_SYNC_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_DEFAULT_TYPES_LIST
  since 5.0, use `Constants.DEFAULT_TYPES_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_DOMAIN_LISTENERS_LIST
  since 5.0, use `Constants.DOMAIN_LISTENERS_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_DOMAIN_NAME_PROPERTY
  since 5.0, use `Constants.DOMAIN_NAME_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_EXTERNAL_TX_PROPERTY
  since 5.0, use `Constants.EXTERNAL_TX_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY
  since 5.0, use `Constants.MAX_ID_QUALIFIER_SIZE_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_OBJECT_RETAIN_STRATEGY_PROPERTY
  since 5.0, use `Constants.CONTEXTS_SYNC_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_PROJECT_LOCATIONS_LIST
  since 5.0, use `Constants.PROJECT_LOCATIONS_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_RESOURCE_LOCATOR
  since 5.0, use `Constants.RESOURCE_LOCATOR`
  org.apache.cayenne.configuration.Constants.SERVER_TYPE_FACTORIES_LIST
  since 5.0, use `Constants.TYPE_FACTORIES_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_USER_TYPES_LIST
  since 5.0, use `Constants.USER_TYPES_LIST`
  org.apache.cayenne.configuration.server.ServerRuntime
  since 5.0, use `CayenneRuntime` class instead
  org.apache.cayenne.configuration.server.ServerRuntime.builder()
  since 5.0, use `CayenneRuntime.builder()` instead
  org.apache.cayenne.configuration.server.ServerRuntime.builder(String)
  since 5.0, use `CayenneRuntime.builder(String)` instead
  org.apache.cayenne.DataObject
  since 5.0, use `Persistent` interface directly
  org.apache.cayenne.exp.property.CollectionProperty.contains(Collection<V>)
  since 5.0 in favour of `CollectionProperty.containsValuesCollection(Collection)`
  org.apache.cayenne.exp.property.CollectionProperty.contains(V)
  since 5.0 in favour of `CollectionProperty.containsValue(V)`
  org.apache.cayenne.exp.property.CollectionProperty.contains(V, V...)
  since 5.0 in favour of `CollectionProperty.containsValues(V...)`
  org.apache.cayenne.exp.property.CollectionProperty.containsId(Object, Object...)
  since 5.0 in favour of `CollectionProperty.containsIds(Object...)`
  org.apache.cayenne.exp.property.CollectionProperty.containsId(Collection<Object>)
  since 5.0 in favour of `CollectionProperty.containsIdsCollection(Collection)`
  org.apache.cayenne.exp.property.CollectionProperty.notContains(Collection<V>)
  since 5.0 in favour of `CollectionProperty.notContainsValuesCollection(Collection)`
  org.apache.cayenne.exp.property.CollectionProperty.notContains(V)
  since 5.0 in favour of `CollectionProperty.notContainsValue(V)`
  org.apache.cayenne.exp.property.CollectionProperty.notContains(V, V...)
  since 5.0 in favour of `CollectionProperty.notContainsValues(V...)`
  org.apache.cayenne.exp.property.CollectionProperty.notContainsId(Object, Object...)
  since 5.0 in favour of `CollectionProperty.notContainsIds(Object...)`
  org.apache.cayenne.exp.property.CollectionProperty.notContainsId(Collection<Object>)
  since 5.0 in favour of `CollectionProperty.notContainsIdsCollection(Collection)`
  org.apache.cayenne.exp.property.EntityProperty.inId(Object, Object...)
  since 5.0 in favour of `EntityProperty.idsIn(Object...)`
  org.apache.cayenne.exp.property.EntityProperty.inId(Collection<Object>)
  since 5.0 in favour of `EntityProperty.idsInCollection(Collection)`
  org.apache.cayenne.exp.property.EntityProperty.ninId(Object, Object...)
  since 5.0 in favour of `EntityProperty.idsNotIn(Object...)`
  org.apache.cayenne.exp.property.EntityProperty.ninId(Collection<Object>)
  since 5.0 in favour of `EntityProperty.idsNotInCollection(Collection)`
  org.apache.cayenne.exp.property.MapProperty.contains(Collection<V>)
  since 5.0 in favour of `MapProperty.containsValuesCollection(Collection)`
  org.apache.cayenne.exp.property.MapProperty.contains(V, V...)
  since 5.0 in favour of `MapProperty.containsValues(V...)`
  org.apache.cayenne.exp.property.MapProperty.containsId(Object, Object...)
  since 5.0 in favour of `MapProperty.containsIds(Object...)`
  org.apache.cayenne.exp.property.MapProperty.containsId(Collection<Object>)
  since 5.0 in favour of `MapProperty.containsIdsCollection(Collection)`
  org.apache.cayenne.exp.property.MapProperty.notContains(Collection<V>)
  since 5.0 in favour of `MapProperty.notContainsValuesCollection(Collection)`
  org.apache.cayenne.exp.property.MapProperty.notContains(V, V...)
  since 5.0 in favour of `MapProperty.notContainsValues(V...)`
  org.apache.cayenne.exp.property.MapProperty.notContainsId(Object, Object...)
  since 5.0 in favour of `MapProperty.notContainsIds(Object...)`
  org.apache.cayenne.exp.property.MapProperty.notContainsId(Collection<Object>)
  since 5.0 in favour of `MapProperty.notContainsIdsCollection(Collection)`
  org.apache.cayenne.exp.TraversalHelper
  since 5.0 as `TraversalHandler` has default no-op implementations for all methods
  org.apache.cayenne.reflect.ClassDescriptor.getSubclassDescriptor(Class<?>)
  since 5.0, will throw UnsupportedOperationException on invocation, use `ClassDescriptor.getSubclassDescriptor(String)`

- Deprecated Packages
  Package
  Description
  org.apache.cayenne.configuration.server
  since 5.0

- Deprecated Interfaces
  Interface
  Description
  org.apache.cayenne.DataObject
  since 5.0, use `Persistent` interface directly

- Deprecated Classes
  Class
  Description
  org.apache.cayenne.access.translator.batch.legacy.DefaultBatchTranslator
  since 4.2
  org.apache.cayenne.BaseContext
  since 5.0, use `DataContext` directly
  org.apache.cayenne.BaseDataObject
  since 5.0, use `PersistentObject` directly
  org.apache.cayenne.configuration.runtime.JNDIDataSourceFactory
  since 5.0, unused by Cayenne
  org.apache.cayenne.configuration.server.ServerRuntime
  since 5.0, use `CayenneRuntime` class instead
  org.apache.cayenne.exp.TraversalHelper
  since 5.0 as `TraversalHandler` has default no-op implementations for all methods

- Deprecated Fields
  Field
  Description
  org.apache.cayenne.access.DataContext.transactionFactory
  since 4.0 used in a method that itself should be deprecated, so this is a temp code
  org.apache.cayenne.configuration.Constants.SERVER_ADAPTER_DETECTORS_LIST
  since 5.0, use `Constants.ADAPTER_DETECTORS_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_CONTEXTS_SYNC_PROPERTY
  since 5.0, use `Constants.CONTEXTS_SYNC_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_DEFAULT_TYPES_LIST
  since 5.0, use `Constants.DEFAULT_TYPES_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_DOMAIN_LISTENERS_LIST
  since 5.0, use `Constants.DOMAIN_LISTENERS_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_DOMAIN_NAME_PROPERTY
  since 5.0, use `Constants.DOMAIN_NAME_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_EXTERNAL_TX_PROPERTY
  since 5.0, use `Constants.EXTERNAL_TX_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY
  since 5.0, use `Constants.MAX_ID_QUALIFIER_SIZE_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_OBJECT_RETAIN_STRATEGY_PROPERTY
  since 5.0, use `Constants.CONTEXTS_SYNC_PROPERTY`
  org.apache.cayenne.configuration.Constants.SERVER_PROJECT_LOCATIONS_LIST
  since 5.0, use `Constants.PROJECT_LOCATIONS_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_RESOURCE_LOCATOR
  since 5.0, use `Constants.RESOURCE_LOCATOR`
  org.apache.cayenne.configuration.Constants.SERVER_TYPE_FACTORIES_LIST
  since 5.0, use `Constants.TYPE_FACTORIES_LIST`
  org.apache.cayenne.configuration.Constants.SERVER_USER_TYPES_LIST
  since 5.0, use `Constants.USER_TYPES_LIST`
  org.apache.cayenne.configuration.xml.ObjRelationshipHandler.DB_RELATIONSHIP_REF_TAG

- Deprecated Methods
  Method
  Description
  org.apache.cayenne.access.DataContext.setTransactionFactory(TransactionFactory)
  since 4.0 avoid using this directly. Transaction management at this level will be eventually removed
  org.apache.cayenne.access.DataDomain.initWithProperties(Map<String, String>)
  since 4.0 properties are processed by the DI provider.
  org.apache.cayenne.access.IncrementalFaultList.fillIn(Query, List<Object>)
  since 5.0, does nothing
  org.apache.cayenne.cache.NestedQueryCache.clear()
  since 4.0
  org.apache.cayenne.cache.QueryCache.clear()
  since 4.0. Please use implementation specific methods to perform cache management tasks.
  org.apache.cayenne.configuration.runtime.CoreModule.contributeAdapterDetectors(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeDefaultTypes(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeDomainListeners(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeDomainQueryFilters(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeDomainSyncFilters(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributePkGenerators(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeProjectLocations(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeProperties(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeTypeFactories(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeUserTypes(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.contributeValueObjectTypes(Binder)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.setSnapshotCacheSize(Binder, int)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.runtime.CoreModule.useExternalTransactions(Binder, boolean)
  in favor of `CoreModule.extend(Binder)` API
  org.apache.cayenne.configuration.server.ServerRuntime.builder()
  since 5.0, use `CayenneRuntime.builder()` instead
  org.apache.cayenne.configuration.server.ServerRuntime.builder(String)
  since 5.0, use `CayenneRuntime.builder(String)` instead
  org.apache.cayenne.ejbql.parser.JavaCharStream.getColumn()
  org.apache.cayenne.ejbql.parser.JavaCharStream.getLine()
  org.apache.cayenne.exp.parser.JavaCharStream.getColumn()
  org.apache.cayenne.exp.parser.JavaCharStream.getLine()
  org.apache.cayenne.exp.property.CollectionProperty.contains(Collection<V>)
  since 5.0 in favour of `CollectionProperty.containsValuesCollection(Collection)`
  org.apache.cayenne.exp.property.CollectionProperty.contains(V)
  since 5.0 in favour of `CollectionProperty.containsValue(V)`
  org.apache.cayenne.exp.property.CollectionProperty.contains(V, V...)
  since 5.0 in favour of `CollectionProperty.containsValues(V...)`
  org.apache.cayenne.exp.property.CollectionProperty.containsId(Object, Object...)
  since 5.0 in favour of `CollectionProperty.containsIds(Object...)`
  org.apache.cayenne.exp.property.CollectionProperty.containsId(Collection<Object>)
  since 5.0 in favour of `CollectionProperty.containsIdsCollection(Collection)`
  org.apache.cayenne.exp.property.CollectionProperty.notContains(Collection<V>)
  since 5.0 in favour of `CollectionProperty.notContainsValuesCollection(Collection)`
  org.apache.cayenne.exp.property.CollectionProperty.notContains(V)
  since 5.0 in favour of `CollectionProperty.notContainsValue(V)`
  org.apache.cayenne.exp.property.CollectionProperty.notContains(V, V...)
  since 5.0 in favour of `CollectionProperty.notContainsValues(V...)`
  org.apache.cayenne.exp.property.CollectionProperty.notContainsId(Object, Object...)
  since 5.0 in favour of `CollectionProperty.notContainsIds(Object...)`
  org.apache.cayenne.exp.property.CollectionProperty.notContainsId(Collection<Object>)
  since 5.0 in favour of `CollectionProperty.notContainsIdsCollection(Collection)`
  org.apache.cayenne.exp.property.EntityProperty.inId(Object, Object...)
  since 5.0 in favour of `EntityProperty.idsIn(Object...)`
  org.apache.cayenne.exp.property.EntityProperty.inId(Collection<Object>)
  since 5.0 in favour of `EntityProperty.idsInCollection(Collection)`
  org.apache.cayenne.exp.property.EntityProperty.ninId(Object, Object...)
  since 5.0 in favour of `EntityProperty.idsNotIn(Object...)`
  org.apache.cayenne.exp.property.EntityProperty.ninId(Collection<Object>)
  since 5.0 in favour of `EntityProperty.idsNotInCollection(Collection)`
  org.apache.cayenne.exp.property.MapProperty.contains(Collection<V>)
  since 5.0 in favour of `MapProperty.containsValuesCollection(Collection)`
  org.apache.cayenne.exp.property.MapProperty.contains(V, V...)
  since 5.0 in favour of `MapProperty.containsValues(V...)`
  org.apache.cayenne.exp.property.MapProperty.containsId(Object, Object...)
  since 5.0 in favour of `MapProperty.containsIds(Object...)`
  org.apache.cayenne.exp.property.MapProperty.containsId(Collection<Object>)
  since 5.0 in favour of `MapProperty.containsIdsCollection(Collection)`
  org.apache.cayenne.exp.property.MapProperty.notContains(Collection<V>)
  since 5.0 in favour of `MapProperty.notContainsValuesCollection(Collection)`
  org.apache.cayenne.exp.property.MapProperty.notContains(V, V...)
  since 5.0 in favour of `MapProperty.notContainsValues(V...)`
  org.apache.cayenne.exp.property.MapProperty.notContainsId(Object, Object...)
  since 5.0 in favour of `MapProperty.notContainsIds(Object...)`
  org.apache.cayenne.exp.property.MapProperty.notContainsId(Collection<Object>)
  since 5.0 in favour of `MapProperty.notContainsIdsCollection(Collection)`
  org.apache.cayenne.map.ObjRelationship.recalculateReadOnlyValue()
  since 4.2
  org.apache.cayenne.reflect.ClassDescriptor.getSubclassDescriptor(Class<?>)
  since 5.0, will throw UnsupportedOperationException on invocation, use `ClassDescriptor.getSubclassDescriptor(String)`
  org.apache.cayenne.util.Util.getJavaClass(String)
  since 4.0 this method based on statically defined class loading algorithm is not going to work in environments like OSGi. `AdhocObjectFactory` should be used as it can provide the environment-specific class loading policy.

- Deprecated Constructors
  Constructor
  Description
  org.apache.cayenne.access.DataDomain(String, Map<String, String>)
  since 4.0 unused
  org.apache.cayenne.query.RefreshQuery()
  since 4.0, "refresh all" query will drop all cache contents