public class VersionableEventPropertyService extends RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId> implements PropertyService
RevisableAbstractDatabaseService.CodingSchemeUriVersionBasedEntryId, RevisableAbstractDatabaseService.ParentUidReferencingId, RevisableAbstractDatabaseService.UpdateTemplate
INSERT_BATCH_PROPERTY_ERROR, INSERT_CODINGSCHEME_PROPERTY_ERROR, INSERT_CODINGSCHEME_PROPERTY_VERSIONABLE_CHANGES_ERROR, INSERT_ENTITY_PROPERTY_ERROR, INSERT_ENTITY_PROPERTY_VERSIONABLE_CHANGES_ERROR, INSERT_RELATION_PROPERTY_ERROR, INSERT_RELATION_PROPERTY_VERSIONABLE_CHANGES_ERROR, REMOVE_CODINGSCHEME_PROPERTY_ERROR, REMOVE_ENTITY_PROPERTY_ERROR, REMOVE_RELATION_PROPERTY_ERROR, UPDATE_CODINGSCHEME_PROPERTY_ERROR, UPDATE_ENTITY_PROPERTY_ERROR, UPDATE_RELATION_PROPERTY_ERROR
Constructor and Description |
---|
VersionableEventPropertyService() |
Modifier and Type | Method and Description |
---|---|
protected Property |
addDependentAttributesByRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id,
java.lang.String entryUid,
Property entry,
java.lang.String revisionId)
Adds the dependent attributes by revision id.
|
protected void |
doInsertDependentChanges(RevisableAbstractDatabaseService.ParentUidReferencingId id,
Property revisedEntry)
Do insert dependent changes.
|
protected void |
doInsertProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String parentUid,
Property property,
PropertyDao.PropertyType propertyType)
Do insert property.
|
protected void |
doRemoveProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String parentUid,
Property property,
PropertyDao.PropertyType propertyType)
Do remove property.
|
protected java.util.List<Property> |
doResolvePropertiesOfParentByRevision(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String parentUid,
java.lang.String revisionId)
Do resolve properties of parent by revision.
|
protected void |
doReviseProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String parentUid,
Property property,
PropertyDao.PropertyType propertyType)
Do revise property.
|
protected void |
doUpdateProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String parentUid,
Property property,
PropertyDao.PropertyType propertyType)
Do update property.
|
protected boolean |
entryStateExists(RevisableAbstractDatabaseService.ParentUidReferencingId id,
java.lang.String entryStateUid)
Entry state exists.
|
protected Property |
getCurrentEntry(RevisableAbstractDatabaseService.ParentUidReferencingId id,
java.lang.String entryUId)
Gets the current entry.
|
protected java.lang.String |
getCurrentEntryStateUid(RevisableAbstractDatabaseService.ParentUidReferencingId id,
java.lang.String entryUid)
Gets the current entry state uid.
|
protected java.lang.String |
getEntryUid(RevisableAbstractDatabaseService.ParentUidReferencingId id,
Property entry)
Gets the entry uid.
|
protected Property |
getHistoryEntryByRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id,
java.lang.String entryUid,
java.lang.String revisionId)
Gets the history entry by revision id.
|
protected java.lang.String |
getLatestRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id,
java.lang.String entryUId)
Gets the latest revision id.
|
void |
insertBatchEntityProperties(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String entityCode,
java.lang.String entityCodeNamespace,
java.util.List<Property> items)
Insert batch entity properties.
|
void |
insertCodingSchemeProperty(java.lang.String codingSchemeUri,
java.lang.String version,
Property property)
Insert coding scheme property.
|
void |
insertEntityProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String entityCode,
java.lang.String entityCodeNamespace,
Property property)
Insert entity property.
|
protected void |
insertIntoHistory(RevisableAbstractDatabaseService.ParentUidReferencingId id,
Property currentEntry,
java.lang.String entryUId)
Insert into history.
|
void |
insertRelationProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String relationContainerName,
Property property)
Insert relation property.
|
protected java.util.List<PropertyBatchInsertItem> |
propertyListToBatchInsertList(java.lang.String parentId,
java.util.List<Property> props)
Property list to batch insert list.
|
void |
removeCodingSchemeProperty(java.lang.String codingSchemeUri,
java.lang.String version,
Property property)
remove coding schme property.
|
void |
removeEntityProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String entityCode,
java.lang.String entityCodeNamespace,
Property property)
Remove entity property.
|
void |
removeRelationProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String relationContainerName,
Property property)
Remove relation property.
|
java.util.List<Property> |
resolvePropertiesOfCodingSchemeByRevision(java.lang.String codingSchemeURI,
java.lang.String version,
java.lang.String revisionId)
Resolve properties of coding scheme by revision.
|
java.util.List<Property> |
resolvePropertiesOfEntityByRevision(java.lang.String codingSchemeURI,
java.lang.String version,
java.lang.String entityCode,
java.lang.String entityCodeNamespace,
java.lang.String revisionId)
Resolve properties of entity by revision.
|
java.util.List<Property> |
resolvePropertiesOfRelationByRevision(java.lang.String codingSchemeURI,
java.lang.String version,
java.lang.String relationsName,
java.lang.String revisionId)
Resolve properties of relation by revision.
|
void |
reviseCodingSchemeProperty(java.lang.String codingSchemeUri,
java.lang.String version,
Property property)
Revise a coding scheme property.
|
void |
reviseEntityProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String entityCode,
java.lang.String entityCodeNamespace,
Property property)
Revise a entity property.
|
void |
reviseRelationProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String relationContainerName,
Property property)
Revise a relations property.
|
void |
updateCodingSchemeProperty(java.lang.String codingSchemeUri,
java.lang.String version,
Property property)
update coding schme property.
|
void |
updateEntityProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String entityCode,
java.lang.String entityCodeNamespace,
Property property)
Update entity property.
|
protected java.lang.String |
updateEntryVersionableAttributes(RevisableAbstractDatabaseService.ParentUidReferencingId id,
java.lang.String entryUId,
Property revisedEntity)
Update entity versionable attributes.
|
void |
updateRelationProperty(java.lang.String codingSchemeUri,
java.lang.String version,
java.lang.String relationContainerName,
Property property)
Update relation property.
|
getCodingSchemeUid, insertDependentChanges, insertVersionableChanges, isValidRevisionId, makeChange, resolveCurrentEntryStateUid, resolveEntryByRevision, updateEntry, validRevision
getCodingSchemeUId, getDaoManager, getLogger, isChangeTypeDependent, isChangeTypeRemove, setDaoManager, setLogger
fireCodingSchemeInsertErrorEvent, fireCodingSchemeUpdateEvent, fireEntityReviseEvent, fireEntityUpdateEvent, firePostBatchEntityInsertEvent, firePostCodingSchemeInsertEvent, firePostEntityInsertEvent, firePostEntityRemoveEvent, firePostPropertyInsertEvent, firePostPropertyRemoveEvent, firePreBatchAssociationInsertEvent, firePreBatchEntityInsertEvent, firePreCodingSchemeInsertEvent, firePreEntityInsertEvent, firePreEntityRemoveEvent, firePropertyUpdateEvent, getListenerRegistry, setListenerRegistry
protected void doInsertDependentChanges(RevisableAbstractDatabaseService.ParentUidReferencingId id, Property revisedEntry) throws LBException
RevisableAbstractDatabaseService
doInsertDependentChanges
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the idrevisedEntry
- the revised entryLBException
- the LB exceptionprotected boolean entryStateExists(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryStateUid)
RevisableAbstractDatabaseService
entryStateExists
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the identryStateUid
- the entry state uidprotected Property getCurrentEntry(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryUId)
RevisableAbstractDatabaseService
getCurrentEntry
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the identryUId
- the entry u idprotected java.lang.String getCurrentEntryStateUid(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryUid)
RevisableAbstractDatabaseService
getCurrentEntryStateUid
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the identryUid
- the entry uidprotected java.lang.String getEntryUid(RevisableAbstractDatabaseService.ParentUidReferencingId id, Property entry)
RevisableAbstractDatabaseService
getEntryUid
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the identry
- the entryprotected void insertIntoHistory(RevisableAbstractDatabaseService.ParentUidReferencingId id, Property currentEntry, java.lang.String entryUId)
RevisableAbstractDatabaseService
insertIntoHistory
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the idcurrentEntry
- the current entryentryUId
- the entry u idprotected Property addDependentAttributesByRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryUid, Property entry, java.lang.String revisionId)
RevisableAbstractDatabaseService
addDependentAttributesByRevisionId
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the identryUid
- the entry uidentry
- the entryrevisionId
- the revision idprotected Property getHistoryEntryByRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryUid, java.lang.String revisionId)
RevisableAbstractDatabaseService
getHistoryEntryByRevisionId
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the identryUid
- the entry uidrevisionId
- the revision idprotected java.lang.String getLatestRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryUId)
RevisableAbstractDatabaseService
getLatestRevisionId
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the identryUId
- the entry u idprotected java.lang.String updateEntryVersionableAttributes(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryUId, Property revisedEntity)
RevisableAbstractDatabaseService
updateEntryVersionableAttributes
in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
id
- the identryUId
- the entry u idrevisedEntity
- the revised entitypublic void insertBatchEntityProperties(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String entityCode, java.lang.String entityCodeNamespace, java.util.List<Property> items)
PropertyService
insertBatchEntityProperties
in interface PropertyService
codingSchemeUri
- the coding scheme uriversion
- the versionentityCode
- the entity codeentityCodeNamespace
- the entity code namespaceitems
- the batchpublic void insertCodingSchemeProperty(java.lang.String codingSchemeUri, java.lang.String version, Property property)
PropertyService
insertCodingSchemeProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.property
- the coding scheme property.public void insertEntityProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String entityCode, java.lang.String entityCodeNamespace, Property property)
PropertyService
insertEntityProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uriversion
- the versionentityCode
- the entity codeentityCodeNamespace
- the entity code namespaceproperty
- the propertypublic void insertRelationProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String relationContainerName, Property property)
PropertyService
insertRelationProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.relationContainerName
- the relations container name.property
- the relation property object.public void removeCodingSchemeProperty(java.lang.String codingSchemeUri, java.lang.String version, Property property)
PropertyService
removeCodingSchemeProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.property
- the coding scheme property.public void removeEntityProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String entityCode, java.lang.String entityCodeNamespace, Property property)
PropertyService
removeEntityProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uriversion
- the versionentityCode
- the entity codeentityCodeNamespace
- the entity code namespaceproperty
- the propertypublic void removeRelationProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String relationContainerName, Property property)
PropertyService
removeRelationProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.relationContainerName
- the relations container name.property
- the relation property object.protected void doInsertProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, Property property, PropertyDao.PropertyType propertyType)
codingSchemeUri
- the coding scheme uriversion
- the versionparentUid
- the parent uidproperty
- the propertypropertyType
- the property typeprotected void doRemoveProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, Property property, PropertyDao.PropertyType propertyType)
codingSchemeUri
- the coding scheme uriversion
- the versionparentUid
- the parent uidproperty
- the propertypropertyType
- the property typeprotected void doReviseProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, Property property, PropertyDao.PropertyType propertyType) throws LBException
codingSchemeUri
- the coding scheme uriversion
- the versionparentUid
- the parent uidproperty
- the propertypropertyType
- the property typeLBException
- the LB exceptionpublic java.util.List<Property> resolvePropertiesOfCodingSchemeByRevision(java.lang.String codingSchemeURI, java.lang.String version, java.lang.String revisionId)
PropertyService
resolvePropertiesOfCodingSchemeByRevision
in interface PropertyService
codingSchemeURI
- the coding scheme uriversion
- the versionrevisionId
- the revision idpublic java.util.List<Property> resolvePropertiesOfEntityByRevision(java.lang.String codingSchemeURI, java.lang.String version, java.lang.String entityCode, java.lang.String entityCodeNamespace, java.lang.String revisionId)
PropertyService
resolvePropertiesOfEntityByRevision
in interface PropertyService
codingSchemeURI
- the coding scheme uriversion
- the versionentityCode
- the entity codeentityCodeNamespace
- the entity code namespacerevisionId
- the revision idpublic java.util.List<Property> resolvePropertiesOfRelationByRevision(java.lang.String codingSchemeURI, java.lang.String version, java.lang.String relationsName, java.lang.String revisionId)
PropertyService
resolvePropertiesOfRelationByRevision
in interface PropertyService
codingSchemeURI
- the coding scheme uriversion
- the versionrelationsName
- the relations namerevisionId
- the revision idprotected java.util.List<Property> doResolvePropertiesOfParentByRevision(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, java.lang.String revisionId)
codingSchemeUri
- the coding scheme uriversion
- the versionparentUid
- the parent uidrevisionId
- the revision idpublic void reviseCodingSchemeProperty(java.lang.String codingSchemeUri, java.lang.String version, Property property) throws LBException
PropertyService
reviseCodingSchemeProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.property
- the coding scheme property object.LBException
- the LB exceptionpublic void reviseEntityProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String entityCode, java.lang.String entityCodeNamespace, Property property) throws LBException
PropertyService
reviseEntityProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.entityCode
- the entity codeentityCodeNamespace
- the entity code namespaceproperty
- the entity property object.LBException
- the LB exceptionpublic void reviseRelationProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String relationContainerName, Property property) throws LBException
PropertyService
reviseRelationProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.relationContainerName
- the relations container name.property
- the relation property object.LBException
- the LB exceptionpublic void updateCodingSchemeProperty(java.lang.String codingSchemeUri, java.lang.String version, Property property)
PropertyService
updateCodingSchemeProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.property
- the coding scheme property.@Transactional public void updateEntityProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String entityCode, java.lang.String entityCodeNamespace, Property property)
PropertyService
updateEntityProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uriversion
- the versionentityCode
- the entity codeentityCodeNamespace
- the entity code namespaceproperty
- the propertypublic void updateRelationProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String relationContainerName, Property property)
PropertyService
updateRelationProperty
in interface PropertyService
codingSchemeUri
- the coding scheme uri.version
- the coding scheme version.relationContainerName
- the relations container name.property
- the relation property object.protected void doUpdateProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, Property property, PropertyDao.PropertyType propertyType) throws LBException
codingSchemeUri
- the coding scheme uriversion
- the versionparentUid
- the parent uidproperty
- the propertypropertyType
- the property typeLBException
- the LB exceptionprotected java.util.List<PropertyBatchInsertItem> propertyListToBatchInsertList(java.lang.String parentId, java.util.List<Property> props)
parentId
- the parent idprops
- the props