Package cz.cvut.kbss.jopa.sessions
Class OnCommitChangePropagatingUnitOfWork
java.lang.Object
cz.cvut.kbss.jopa.sessions.AbstractSession
cz.cvut.kbss.jopa.sessions.AbstractUnitOfWork
cz.cvut.kbss.jopa.sessions.OnCommitChangePropagatingUnitOfWork
- All Implemented Interfaces:
ConfigurationHolder
,MetamodelProvider
,UnitOfWork
,Wrapper
-
Field Summary
Fields inherited from class cz.cvut.kbss.jopa.sessions.AbstractUnitOfWork
LOG
Fields inherited from class cz.cvut.kbss.jopa.sessions.AbstractSession
configuration
-
Constructor Summary
ConstructorsConstructorDescriptionOnCommitChangePropagatingUnitOfWork
(AbstractSession parent, Configuration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
attributeChanged
(Object entity, FieldSpecification<?, ?> fieldSpec) Persists changed value of the specified field.void
attributeChanged
(Object entity, Field f) Persists changed value of the specified field.createIndirectCollection
(Object collection, Object owner, Field field) Creates an indirect collection that wraps the specified collection instance and propagates changes to this persistence context.void
removeObject
(Object entity) Remove the given object from the repository.void
unregisterObject
(Object object) Detaches the specified registered object from this Unit of Work.Methods inherited from class cz.cvut.kbss.jopa.sessions.AbstractUnitOfWork
acquireConnection, begin, clear, commit, contains, copyChangeSet, entityType, evictAfterMerge, getCloneForOriginal, getContexts, getCriteriaBuilder, getFieldDescriptor, getInstanceForMerge, getLiveObjectCache, getLoadStateRegistry, getManagedOriginal, getMetamodel, getOriginal, getReference, getState, getState, hasChanges, isActive, isConsistent, isEntityType, isFlushingChanges, isInferred, isInRepository, isInTransaction, isLoaded, isLoaded, isObjectManaged, isObjectNew, loadEntityField, markCloneForDeletion, mergeDetached, processInferredValueChanges, putObjectIntoCache, readObject, readObjectInternal, readObjectWithoutRegistration, refreshObject, registerExistingObject, registerExistingObject, registerNewObject, registerOriginalForNewClone, release, removeIndirectWrappersAndProxies, removeObjectFromCache, restoreRemovedObject, rollback, sparqlQueryFactory, stringify, unregisterEntityFromOntologyContext, unwrap, writeUncommittedChanges
Methods inherited from class cz.cvut.kbss.jopa.sessions.AbstractSession
getConfiguration
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.cvut.kbss.jopa.sessions.ConfigurationHolder
getConfiguration
Methods inherited from interface cz.cvut.kbss.jopa.sessions.MetamodelProvider
getNamedQueryManager, getResultSetMappingManager
-
Constructor Details
-
OnCommitChangePropagatingUnitOfWork
-
-
Method Details
-
removeObject
Description copied from interface:UnitOfWork
Remove the given object from the repository.- Parameters:
entity
- Object to remove
-
unregisterObject
Description copied from interface:UnitOfWork
Detaches the specified registered object from this Unit of Work.- Specified by:
unregisterObject
in interfaceUnitOfWork
- Overrides:
unregisterObject
in classAbstractUnitOfWork
- Parameters:
object
- Clone to detach
-
attributeChanged
Description copied from interface:UnitOfWork
Persists changed value of the specified field.- Parameters:
entity
- Entity with changes (the clone)f
- The field whose value has changed- See Also:
-
attributeChanged
Description copied from interface:UnitOfWork
Persists changed value of the specified field.- Parameters:
entity
- Entity with changes (the clone)fieldSpec
- Metamodel element representing the attribute that changed
-
createIndirectCollection
Description copied from interface:UnitOfWork
Creates an indirect collection that wraps the specified collection instance and propagates changes to this persistence context.- Parameters:
collection
- Collection to be proxiedowner
- Collection owner instancefield
- Field filled with the collection- Returns:
- Indirect collection
-