Class DataContext
- All Implemented Interfaces:
Serializable
,DataChannel
,ObjectContext
- Direct Known Subclasses:
BaseContext
ObjectContext
. 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.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataChannel
protected EntityResolver
protected ObjectContextGraphAction
Graph action that handles property changesprotected org.apache.cayenne.access.DataContextMergeHandler
protected org.apache.cayenne.access.DataContextObjectCreator
protected ObjectStore
protected QueryCache
protected static final ThreadLocal
<ObjectContext> A holder of a ObjectContext bound to the current thread.protected TransactionFactory
Deprecated.since 4.0 used in a method that itself should be deprecated, so this is a temp codeStores user defined properties associated with this DataContext.protected boolean
protected boolean
Fields inherited from interface org.apache.cayenne.DataChannel
FLUSH_CASCADE_SYNC, FLUSH_NOCASCADE_SYNC, GRAPH_CHANGED_SUBJECT, GRAPH_FLUSHED_SUBJECT, GRAPH_ROLLEDBACK_SUBJECT, ROLLBACK_CASCADE_SYNC
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DataContext that is not attached to the Cayenne stack.DataContext
(DataChannel channel, ObjectStore objectStore) Creates a new DataContext with parent DataChannel and ObjectStore. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
attachToChannel
(DataChannel channel) Attaches to a provided DataChannel.protected void
attachToRuntime
(Injector injector) Attaches this context to the CayenneRuntime whose Injector is passed as an argument to this method.protected boolean
Checks whether this context is attached to Cayenne runtime stack and if not, attempts to attach itself to the runtime using Injector returned from the call toCayenneRuntime.getThreadInjector()
.<T> ResultBatchIterator
<T> batchIterator
(Select<T> query, int size) Creates a ResultBatchIterator based on the provided query and batch size.static void
bindThreadObjectContext
(ObjectContext context) Binds a ObjectContext to the current thread.void
Removes all user-defined properties.void
Synchronizes object graph with the database.void
"Flushes" the changes to the parentDataChannel
.currentSnapshot
(Persistent object) Returns aDataRow
reflecting current, possibly uncommitted, object state.Collection
<?> Returns a list of objects that are registered with this DataContext and have a statePersistenceState.DELETED
void
deleteObject
(Object object) Schedules deletion of a persistent object.void
deleteObjects
(Collection<?> objects) Schedules deletion of a collection of persistent objects.<T> void
deleteObjects
(T... objects) Schedules deletion of one or more persistent objects.protected void
fireDataChannelChanged
(Object postedBy, GraphDiff changes) protected void
fireDataChannelCommitted
(Object postedBy, GraphDiff changes) protected void
fireDataChannelRolledback
(Object postedBy, GraphDiff changes) Returns an DataChannel used by this context.Returns a delegate currently associated with this DataContext.Returns EntityResolver that stores all mapping information accessible by this ObjectContext.Returns EventManager associated with the ObjectStore.Returns this context's ObjectStore.Returns ObjectStore associated with this DataContext.Returns a DataDomain used by this DataContext.static ObjectContext
Returns the ObjectContext bound to the current thread.Returns a map of user-defined properties associated with this DataContext.getUserProperty
(String key) Returns a user-defined property previously set via 'setUserProperty'.boolean
Returnstrue
if there are any modified, deleted or new objects registered with this DataContext,false
otherwise.void
invalidateObjects
(Collection<?> objects) Invalidates a Collection of persistent objects.<T> void
invalidateObjects
(T... objects) Invalidates one or more persistent objects.boolean
Returnstrue
if the ObjectStore uses shared cache of a parent DataDomain.boolean
Returns whether this ObjectContext performs object validation before commit is executed.<T> void
iterate
(Select<T> query, ResultIteratorCallback<T> callback) Creates a ResultIterator based on the provided query and passes it to a callback for processing.<T> ResultIterator
<T> Performs a single database select query returning result as aResultIterator
.<T extends Persistent>
TlocalObject
(T objectFromAnotherContext) Returns a local copy of 'objectFromAnotherContext' object.Collection
<?> Returns a list of objects that are registered with this DataContext and have a statePersistenceState.MODIFIED
<T> T
Creates and registers a new persistent object.Instantiates a new object and registers it with this context.Collection
<?> Returns a list of objects that are registered with this DataContext and have a state PersistenceState.NEW<T extends Persistent>
TobjectFromDataRow
(Class<T> objectClass, DataRow dataRow) Creates a Persistent from DataRow.objectFromDataRow
(String entityName, DataRow dataRow) Creates a Persistent from DataRow.objectsFromDataRows
(ClassDescriptor descriptor, List<? extends DataRow> dataRows) Converts a list of DataRows to a List of Persistent registered with this DataContext.protected GraphDiff
onContextFlush
(ObjectContext originatingContext, GraphDiff changes, boolean cascade) onQuery
(ObjectContext context, Query query) An implementation of aDataChannel
method that is used by child contexts to execute queries.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.performGenericQuery
(Query query) Executes a query returning a generic response.performIteratedQuery
(Query query) Performs a single database select query returning result as aResultIterator
.int[]
performNonSelectingQuery
(String queryName) Performs a named mapped query that does not select rows.int[]
performNonSelectingQuery
(String queryName, Map<String, ?> parameters) Performs a named mapped non-selecting query using a map of parameters.int[]
performNonSelectingQuery
(Query query) Performs a single database query that does not select rows.List
<?> performQuery
(String queryName, boolean expireCachedLists) Returns a list of objects or DataRows for a named query stored in one of the DataMaps.List
<?> performQuery
(String queryName, Map<String, ?> parameters, boolean expireCachedLists) Returns a list of objects or DataRows for a named query stored in one of the DataMaps.performQuery
(Query query) Performs a single selecting query.void
prepareForAccess
(Persistent object, String property, boolean lazyFaulting) A callback method that child Persistent objects are expected to call before accessing property values.void
propertyChanged
(Persistent object, String property, Object oldValue, Object newValue) 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.void
registerNewObject
(Object object) Registers a transient object with the context, recursively registering all transient persistent objects attached to this object via relationships.void
removeUserProperty
(String key) Removes a user-defined property.void
Reverts any changes that have occurred to objects registered with DataContext; also performs cascading rollback of all parent DataContexts.void
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.<T> List
<T> Executes a selecting query, returning a list of persistent objects or data rows.<T> T
selectFirst
(Select<T> query) Selects a single object using provided query.<T> T
Executes a selecting query, returning either NULL if query matched no objects, or a single object.void
setChannel
(DataChannel channel) Sets a new DataChannel for this context.void
setDelegate
(DataContextDelegate delegate) Sets a DataContextDelegate for this context.void
setEntityResolver
(EntityResolver entityResolver) void
setQueryCache
(QueryCache queryCache) Sets a QueryCache to be used for storing cached query results.void
setTransactionFactory
(TransactionFactory transactionFactory) Deprecated.since 4.0 avoid using this directly.void
setUserProperty
(String key, Object value) Sets a user-defined property.void
setUsingSharedSnapshotCache
(boolean flag) void
setValidatingObjectsOnCommit
(boolean flag) Sets the property defining whether this ObjectContext should perform object validation before commit is executed.Collection
<?> Returns a collection of all uncommitted registered objects.void
unregisterObjects
(Collection<?> objects) Unregisters a Collection of Persistent objects from the DataContext and the underlying ObjectStore.
-
Field Details
-
threadObjectContext
A holder of a ObjectContext bound to the current thread.- Since:
- 3.0
-
objectStore
-
graphAction
Graph action that handles property changes- Since:
- 3.1
-
userProperties
Stores user defined properties associated with this DataContext.- Since:
- 3.0
-
channel
-
queryCache
-
entityResolver
-
transactionFactory
Deprecated.since 4.0 used in a method that itself should be deprecated, so this is a temp code -
mergeHandler
protected transient org.apache.cayenne.access.DataContextMergeHandler mergeHandler -
validatingObjectsOnCommit
protected boolean validatingObjectsOnCommit -
objectCreator
protected transient org.apache.cayenne.access.DataContextObjectCreator objectCreator
-
-
Constructor Details
-
DataContext
public DataContext()Creates a new DataContext that is not attached to the Cayenne stack. -
DataContext
Creates a new DataContext with parent DataChannel and ObjectStore.- Since:
- 1.2
-
-
Method Details
-
getThreadObjectContext
Returns the ObjectContext bound to the current thread.- Returns:
- the ObjectContext associated with caller thread.
- Throws:
IllegalStateException
- if there is no ObjectContext bound to the current thread.- Since:
- 3.0
-
bindThreadObjectContext
Binds a ObjectContext to the current thread. ObjectContext can later be retrieved by users in the same thread by callinggetThreadObjectContext()
. Using null parameter will unbind currently bound ObjectContext.- Since:
- 3.0
-
attachToRuntimeIfNeeded
protected boolean attachToRuntimeIfNeeded()Checks whether this context is attached to Cayenne runtime stack and if not, attempts to attach itself to the runtime using Injector returned from the call toCayenneRuntime.getThreadInjector()
. If thread Injector is not available and the context is not attached, throws CayenneRuntimeException.This method is called internally by the context before access to transient variables to allow the context to attach to the stack lazily following deserialization.
- Returns:
- true if the context successfully attached to the thread runtime, false - if it was already attached.
- Since:
- 3.1
-
attachToRuntime
Attaches this context to the CayenneRuntime whose Injector is passed as an argument to this method.- Since:
- 3.1
-
attachToChannel
Attaches to a provided DataChannel.- Since:
- 3.1
-
getChannel
Description copied from interface:ObjectContext
Returns an DataChannel used by this context.- Specified by:
getChannel
in interfaceObjectContext
-
setChannel
Sets a new DataChannel for this context.- Since:
- 3.1
-
getEntityResolver
Description copied from interface:ObjectContext
Returns EntityResolver that stores all mapping information accessible by this ObjectContext.- Specified by:
getEntityResolver
in interfaceDataChannel
- Specified by:
getEntityResolver
in interfaceObjectContext
-
setEntityResolver
- Since:
- 3.1
-
getParentDataDomain
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.- Returns:
- DataDomain that is a direct or indirect parent of this DataContext in the DataChannel hierarchy.
- Since:
- 1.1
-
setDelegate
Sets a DataContextDelegate for this context. Delegate is notified of certain events in the DataContext lifecycle and can customize DataContext behavior.- Since:
- 1.1
-
getDelegate
Returns a delegate currently associated with this DataContext.- Since:
- 1.1
-
getObjectStore
Returns ObjectStore associated with this DataContext. -
hasChanges
public boolean hasChanges()Returnstrue
if there are any modified, deleted or new objects registered with this DataContext,false
otherwise.- Specified by:
hasChanges
in interfaceObjectContext
-
newObjects
Returns a list of objects that are registered with this DataContext and have a state PersistenceState.NEW- Specified by:
newObjects
in interfaceObjectContext
-
deletedObjects
Returns a list of objects that are registered with this DataContext and have a statePersistenceState.DELETED
- Specified by:
deletedObjects
in interfaceObjectContext
-
deleteObject
Description copied from interface:ObjectContext
Schedules deletion of a persistent object.- Specified by:
deleteObject
in interfaceObjectContext
- Throws:
DeleteDenyException
- if aDeleteRule.DENY
delete rule is applicable for object deletion.
-
deleteObjects
Description copied from interface:ObjectContext
Schedules deletion of one or more persistent objects. Same asObjectContext.deleteObjects(Collection)
only with a vararg argument list for easier deletion of individual objects.- Specified by:
deleteObjects
in interfaceObjectContext
- Throws:
DeleteDenyException
- if aDeleteRule.DENY
delete rule is applicable for object deletion.- Since:
- 3.1
-
deleteObjects
Description copied from interface:ObjectContext
Schedules deletion of a collection of persistent objects.- Specified by:
deleteObjects
in interfaceObjectContext
- Throws:
DeleteDenyException
- if aDeleteRule.DENY
delete rule is applicable for object deletion.
-
modifiedObjects
Returns a list of objects that are registered with this DataContext and have a statePersistenceState.MODIFIED
- Specified by:
modifiedObjects
in interfaceObjectContext
-
uncommittedObjects
Returns a collection of all uncommitted registered objects.- Specified by:
uncommittedObjects
in interfaceObjectContext
- Since:
- 1.2
-
getQueryCache
-
setQueryCache
Sets a QueryCache to be used for storing cached query results. -
getEventManager
Returns EventManager associated with the ObjectStore.- Specified by:
getEventManager
in interfaceDataChannel
- Since:
- 1.2
-
fireDataChannelCommitted
- Since:
- 1.2
-
fireDataChannelRolledback
- Since:
- 1.2
-
localObject
Description copied from interface:ObjectContext
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.Note that passing an object with a non-existing id, may later result in FaultFailureException on attempt to read returned object properties.
- Specified by:
localObject
in interfaceObjectContext
- Since:
- 3.1
-
currentSnapshot
Returns aDataRow
reflecting current, possibly uncommitted, object state.Warning: 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.
- Parameters:
object
- persistent object to create snapshot for- Returns:
- current snapshot of the persistent object
- Since:
- 1.1
-
prepareForAccess
Description copied from interface:ObjectContext
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.- Specified by:
prepareForAccess
in interfaceObjectContext
-
objectsFromDataRows
Converts a list of DataRows to a List of Persistent registered with this DataContext.- Since:
- 3.0
-
objectFromDataRow
Creates a Persistent from DataRow.- Since:
- 3.1
- See Also:
-
objectFromDataRow
Creates a Persistent from DataRow. This variety of the 'objectFromDataRow' method is normally used for generic classes.- Since:
- 3.1, 5.0 returns
Persistent
instead of the deprecated DataObject - See Also:
-
newObject
Creates and registers a new persistent object.- Specified by:
newObject
in interfaceObjectContext
- Since:
- 1.2
-
newObject
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.Note: in most cases
newObject(Class)
method should be used, however this method is helpful when generic persistent classes are used.- Since:
- 3.0
-
registerNewObject
Registers a transient object with the context, recursively registering all transient persistent objects attached to this object via relationships.Note that since 3.0 this method takes Object as an argument instead of a
Persistent
.- Specified by:
registerNewObject
in interfaceObjectContext
- Parameters:
object
- new object that needs to be made persistent.
-
unregisterObjects
Unregisters a Collection of Persistent objects from the DataContext and the underlying ObjectStore. This operation also unsets DataContext for each object and changes its state toPersistenceState.TRANSIENT
- See Also:
-
invalidateObjects
Description copied from interface:ObjectContext
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.- Specified by:
invalidateObjects
in interfaceObjectContext
-
invalidateObjects
public <T> void invalidateObjects(T... objects) Description copied from interface:ObjectContext
Invalidates one or more persistent objects. Same asObjectContext.invalidateObjects(Collection)
only with a vararg argument list for easier invalidation of individual objects. If no arguments are passed to this method, it does nothing.- Specified by:
invalidateObjects
in interfaceObjectContext
- Since:
- 3.1
-
propertyChanged
Description copied from interface:ObjectContext
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.- Specified by:
propertyChanged
in interfaceObjectContext
-
rollbackChangesLocally
public void rollbackChangesLocally()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.- Specified by:
rollbackChangesLocally
in interfaceObjectContext
- Since:
- 1.2
-
rollbackChanges
public void rollbackChanges()Reverts any changes that have occurred to objects registered with DataContext; also performs cascading rollback of all parent DataContexts.- Specified by:
rollbackChanges
in interfaceObjectContext
-
commitChangesToParent
public void commitChangesToParent()"Flushes" the changes to the parentDataChannel
. 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 usecommitChanges()
.- Specified by:
commitChangesToParent
in interfaceObjectContext
- Since:
- 1.2
- See Also:
-
commitChanges
Synchronizes object graph with the database. Executes needed insert, update and delete queries (generated internally).- Specified by:
commitChanges
in interfaceObjectContext
- Throws:
CayenneRuntimeException
-
onContextFlush
protected GraphDiff onContextFlush(ObjectContext originatingContext, GraphDiff changes, boolean cascade) -
select
Description copied from interface:ObjectContext
Executes a selecting query, returning a list of persistent objects or data rows.- Specified by:
select
in interfaceObjectContext
- Since:
- 4.0
-
selectOne
Description copied from interface:ObjectContext
Executes a selecting query, returning either NULL if query matched no objects, or a single object. If query matches more than one object,CayenneRuntimeException
is thrown.- Specified by:
selectOne
in interfaceObjectContext
- Since:
- 4.0
-
selectFirst
Description copied from interface:ObjectContext
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.If it matched more than one object, the first object from the list is returned. This makes 'selectFirst' different from
ObjectContext.selectOne(Select)
, 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.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.
- Specified by:
selectFirst
in interfaceObjectContext
- Since:
- 4.0
-
iterate
Description copied from interface:ObjectContext
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.- Specified by:
iterate
in interfaceObjectContext
- Since:
- 4.0
-
iterator
Performs a single database select query returning result as aResultIterator
.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 openResultIterator
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.- Specified by:
iterator
in interfaceObjectContext
-
performIteratedQuery
Performs a single database select query returning result as aResultIterator
.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 openResultIterator
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.Note that
performIteratedQuery
always returnsResultIterator
over DataRows.Use
iterate(Select, org.apache.cayenne.ResultIteratorCallback)
to get access to objects. -
performGenericQuery
Executes a query returning a generic response.- Specified by:
performGenericQuery
in interfaceObjectContext
- Since:
- 1.2
-
performQuery
Performs a single selecting query. Various query setting control the behavior of this method and the results returned:- 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.
- Query refreshing policy controls whether to refresh existing data objects and ignore any cached values.
- Query data rows policy defines whether the result should be returned as Persistent objects or DataRows.
Since 1.2 takes any Query parameter, not just GenericSelectQuery
- Specified by:
performQuery
in interfaceObjectContext
- Returns:
- A list of Persistent objects or a DataRows, depending on the value
returned by
QueryMetadata.isFetchingDataRows()
. Сan also return an iterator if the query is an instance of iteratedQuery.
-
onQuery
An implementation of aDataChannel
method that is used by child contexts to execute queries. Not intended for direct use.- Specified by:
onQuery
in interfaceDataChannel
- Parameters:
context
- an ObjectContext that originated the query, used to register result objects.- Returns:
- a generic response object that encapsulates result of the execution.
- Since:
- 1.2
-
onSync
Description copied from interface:DataChannel
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.- Specified by:
onSync
in interfaceDataChannel
- Parameters:
originatingContext
- an ObjectContext that initiated the sync. Can be null.changes
- diff from the context that initiated the sync.syncType
- One ofDataChannel.FLUSH_NOCASCADE_SYNC
,DataChannel.FLUSH_CASCADE_SYNC
,DataChannel.ROLLBACK_CASCADE_SYNC
.
-
performNonSelectingQuery
Performs a single database query that does not select rows. Returns an array of update counts.- Since:
- 1.1
-
performNonSelectingQuery
Performs a named mapped query that does not select rows. Returns an array of update counts.- Since:
- 1.1
-
performNonSelectingQuery
Performs a named mapped non-selecting query using a map of parameters. Returns an array of update counts.- Since:
- 1.1
-
performQuery
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.- Parameters:
queryName
- a name of a GenericSelectQuery defined in one of the DataMaps. If no such query is defined, this method will throw a CayenneRuntimeException.expireCachedLists
- A flag that determines whether refresh of cached lists is required in case a query uses caching.- Since:
- 1.1
-
performQuery
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.- Parameters:
queryName
- a name of a GenericSelectQuery defined in one of the DataMaps. If no such query is defined, this method will throw a CayenneRuntimeException.parameters
- A map of parameters to use with stored query.expireCachedLists
- A flag that determines whether refresh of cached lists is required in case a query uses caching.- Since:
- 1.1
-
getGraphManager
Returns this context's ObjectStore.- Specified by:
getGraphManager
in interfaceObjectContext
- Since:
- 1.2
-
fireDataChannelChanged
- Since:
- 1.2
-
setTransactionFactory
Deprecated.since 4.0 avoid using this directly. Transaction management at this level will be eventually removed- Since:
- 4.0
-
batchIterator
Description copied from interface:ObjectContext
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.- Specified by:
batchIterator
in interfaceObjectContext
-
isValidatingObjectsOnCommit
public boolean isValidatingObjectsOnCommit()Returns whether this ObjectContext performs object validation before commit is executed.- Since:
- 1.1
-
setValidatingObjectsOnCommit
public void setValidatingObjectsOnCommit(boolean flag) Sets the property defining whether this ObjectContext should perform object validation before commit is executed.- Since:
- 1.1
-
getUserProperties
Returns a map of user-defined properties associated with this DataContext.- Since:
- 3.0
-
getUserProperty
Returns a user-defined property previously set via 'setUserProperty'. Note that it is a caller responsibility to synchronize access to properties.- Specified by:
getUserProperty
in interfaceObjectContext
- Since:
- 3.0
-
setUserProperty
Sets a user-defined property. Note that it is a caller responsibility to synchronize access to properties.- Specified by:
setUserProperty
in interfaceObjectContext
- Since:
- 3.0
-
removeUserProperty
Removes a user-defined property.- Specified by:
removeUserProperty
in interfaceObjectContext
- Since:
- 5.0
-
clearUserProperties
public void clearUserProperties()Removes all user-defined properties.- Specified by:
clearUserProperties
in interfaceObjectContext
- Since:
- 5.0
-