org.lexevs.dao.database.service.property
Class VersionableEventPropertyService

java.lang.Object
  extended by org.lexevs.dao.database.service.event.DatabaseServiceEventSupport
      extended by org.lexevs.dao.database.service.AbstractDatabaseService
          extended by org.lexevs.dao.database.service.RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
              extended by org.lexevs.dao.database.service.property.VersionableEventPropertyService
All Implemented Interfaces:
PropertyService

public class VersionableEventPropertyService
extends RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
implements PropertyService

The Class VersionableEventPropertyService.

Author:
Kevin Peterson, Ramachandra Rao (satya)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.lexevs.dao.database.service.RevisableAbstractDatabaseService
RevisableAbstractDatabaseService.CodingSchemeUriVersionBasedEntryId, RevisableAbstractDatabaseService.ParentUidReferencingId, RevisableAbstractDatabaseService.UpdateTemplate
 
Field Summary
 
Fields inherited from interface org.lexevs.dao.database.service.property.PropertyService
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 Summary
VersionableEventPropertyService()
           
 
Method Summary
protected  Property addDependentAttributesByRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryUid, Property entry, java.lang.String revisionId)
           
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)
           
protected  void doRemoveProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, Property property, PropertyDao.PropertyType propertyType)
           
protected  java.util.List<Property> doResolvePropertiesOfParentByRevision(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, java.lang.String revisionId)
           
protected  void doReviseProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, Property property, PropertyDao.PropertyType propertyType)
           
protected  void doUpdateProperty(java.lang.String codingSchemeUri, java.lang.String version, java.lang.String parentUid, Property property, PropertyDao.PropertyType propertyType)
           
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)
           
protected  java.lang.String getLatestRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id, java.lang.String entryUId)
           
 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)
           
 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)
           
 java.util.List<Property> resolvePropertiesOfRelationByRevision(java.lang.String codingSchemeURI, java.lang.String version, java.lang.String relationsName, java.lang.String revisionId)
           
 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.
 
Methods inherited from class org.lexevs.dao.database.service.RevisableAbstractDatabaseService
getCodingSchemeUid, insertDependentChanges, insertVersionableChanges, makeChange, resolveCurrentEntryStateUid, resolveEntryByRevision, updateEntry, validRevision
 
Methods inherited from class org.lexevs.dao.database.service.AbstractDatabaseService
getCodingSchemeUId, getDaoManager, getLogger, isChangeTypeDependent, isChangeTypeRemove, setDaoManager, setLogger
 
Methods inherited from class org.lexevs.dao.database.service.event.DatabaseServiceEventSupport
fireCodingSchemeInsertErrorEvent, fireCodingSchemeUpdateEvent, fireEntityReviseEvent, fireEntityUpdateEvent, firePostBatchEntityInsertEvent, firePostCodingSchemeInsertEvent, firePostEntityInsertEvent, firePostEntityRemoveEvent, firePostPropertyInsertEvent, firePostPropertyRemoveEvent, firePreBatchAssociationInsertEvent, firePreBatchEntityInsertEvent, firePreCodingSchemeInsertEvent, firePreEntityInsertEvent, firePreEntityRemoveEvent, firePropertyUpdateEvent, getListenerRegistry, setListenerRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionableEventPropertyService

public VersionableEventPropertyService()
Method Detail

doInsertDependentChanges

protected void doInsertDependentChanges(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                        Property revisedEntry)
                                 throws LBException
Description copied from class: RevisableAbstractDatabaseService
Do insert dependent changes.

Specified by:
doInsertDependentChanges in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
Parameters:
id - the id
revisedEntry - the revised entry
Throws:
LBException - the LB exception

entryStateExists

protected boolean entryStateExists(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                   java.lang.String entryStateUid)
Description copied from class: RevisableAbstractDatabaseService
Entry state exists.

Specified by:
entryStateExists in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
Parameters:
id - the id
entryStateUid - the entry state uid
Returns:
true, if successful

getCurrentEntry

protected Property getCurrentEntry(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                   java.lang.String entryUId)
Description copied from class: RevisableAbstractDatabaseService
Gets the current entry.

Specified by:
getCurrentEntry in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
Parameters:
id - the id
entryUId - the entry u id
Returns:
the current entry

getCurrentEntryStateUid

protected java.lang.String getCurrentEntryStateUid(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                                   java.lang.String entryUid)
Description copied from class: RevisableAbstractDatabaseService
Gets the current entry state uid.

Specified by:
getCurrentEntryStateUid in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
Parameters:
id - the id
entryUid - the entry uid
Returns:
the current entry state uid

getEntryUid

protected java.lang.String getEntryUid(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                       Property entry)
Description copied from class: RevisableAbstractDatabaseService
Gets the entry uid.

Specified by:
getEntryUid in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
Parameters:
id - the id
entry - the entry
Returns:
the entry uid

insertIntoHistory

protected void insertIntoHistory(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                 Property currentEntry,
                                 java.lang.String entryUId)
Description copied from class: RevisableAbstractDatabaseService
Insert into history.

Specified by:
insertIntoHistory in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
Parameters:
id - the id
currentEntry - the current entry
entryUId - the entry u id

addDependentAttributesByRevisionId

protected Property addDependentAttributesByRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                                      java.lang.String entryUid,
                                                      Property entry,
                                                      java.lang.String revisionId)
Specified by:
addDependentAttributesByRevisionId in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>

getHistoryEntryByRevisionId

protected Property getHistoryEntryByRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                               java.lang.String entryUid,
                                               java.lang.String revisionId)
Specified by:
getHistoryEntryByRevisionId in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>

getLatestRevisionId

protected java.lang.String getLatestRevisionId(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                               java.lang.String entryUId)
Specified by:
getLatestRevisionId in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>

updateEntryVersionableAttributes

protected java.lang.String updateEntryVersionableAttributes(RevisableAbstractDatabaseService.ParentUidReferencingId id,
                                                            java.lang.String entryUId,
                                                            Property revisedEntity)
Description copied from class: RevisableAbstractDatabaseService
Update entity versionable attributes.

Specified by:
updateEntryVersionableAttributes in class RevisableAbstractDatabaseService<Property,RevisableAbstractDatabaseService.ParentUidReferencingId>
Parameters:
id - the id
entryUId - the entry u id
revisedEntity - the revised entity
Returns:
the string

insertBatchEntityProperties

public void insertBatchEntityProperties(java.lang.String codingSchemeUri,
                                        java.lang.String version,
                                        java.lang.String entityCode,
                                        java.lang.String entityCodeNamespace,
                                        java.util.List<Property> items)
Description copied from interface: PropertyService
Insert batch entity properties.

Specified by:
insertBatchEntityProperties in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri
version - the version
entityCode - the entity code
entityCodeNamespace - the entity code namespace
items - the batch

insertCodingSchemeProperty

public void insertCodingSchemeProperty(java.lang.String codingSchemeUri,
                                       java.lang.String version,
                                       Property property)
Description copied from interface: PropertyService
Insert coding scheme property.

Specified by:
insertCodingSchemeProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
property - the coding scheme property.

insertEntityProperty

public void insertEntityProperty(java.lang.String codingSchemeUri,
                                 java.lang.String version,
                                 java.lang.String entityCode,
                                 java.lang.String entityCodeNamespace,
                                 Property property)
Description copied from interface: PropertyService
Insert entity property.

Specified by:
insertEntityProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri
version - the version
entityCode - the entity code
entityCodeNamespace - the entity code namespace
property - the property

insertRelationProperty

public void insertRelationProperty(java.lang.String codingSchemeUri,
                                   java.lang.String version,
                                   java.lang.String relationContainerName,
                                   Property property)
Description copied from interface: PropertyService
Insert relation property.

Specified by:
insertRelationProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
relationContainerName - the relations container name.
property - the relation property object.

removeCodingSchemeProperty

public void removeCodingSchemeProperty(java.lang.String codingSchemeUri,
                                       java.lang.String version,
                                       Property property)
Description copied from interface: PropertyService
remove coding schme property.

Specified by:
removeCodingSchemeProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
property - the coding scheme property.

removeEntityProperty

public void removeEntityProperty(java.lang.String codingSchemeUri,
                                 java.lang.String version,
                                 java.lang.String entityCode,
                                 java.lang.String entityCodeNamespace,
                                 Property property)
Description copied from interface: PropertyService
Remove entity property.

Specified by:
removeEntityProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri
version - the version
entityCode - the entity code
entityCodeNamespace - the entity code namespace
property - the property

removeRelationProperty

public void removeRelationProperty(java.lang.String codingSchemeUri,
                                   java.lang.String version,
                                   java.lang.String relationContainerName,
                                   Property property)
Description copied from interface: PropertyService
Remove relation property.

Specified by:
removeRelationProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
relationContainerName - the relations container name.
property - the relation property object.

doInsertProperty

protected void doInsertProperty(java.lang.String codingSchemeUri,
                                java.lang.String version,
                                java.lang.String parentUid,
                                Property property,
                                PropertyDao.PropertyType propertyType)

doRemoveProperty

protected void doRemoveProperty(java.lang.String codingSchemeUri,
                                java.lang.String version,
                                java.lang.String parentUid,
                                Property property,
                                PropertyDao.PropertyType propertyType)

doReviseProperty

protected void doReviseProperty(java.lang.String codingSchemeUri,
                                java.lang.String version,
                                java.lang.String parentUid,
                                Property property,
                                PropertyDao.PropertyType propertyType)
                         throws LBException
Throws:
LBException

resolvePropertiesOfCodingSchemeByRevision

public java.util.List<Property> resolvePropertiesOfCodingSchemeByRevision(java.lang.String codingSchemeURI,
                                                                          java.lang.String version,
                                                                          java.lang.String revisionId)
Specified by:
resolvePropertiesOfCodingSchemeByRevision in interface PropertyService

resolvePropertiesOfEntityByRevision

public 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)
Specified by:
resolvePropertiesOfEntityByRevision in interface PropertyService

resolvePropertiesOfRelationByRevision

public java.util.List<Property> resolvePropertiesOfRelationByRevision(java.lang.String codingSchemeURI,
                                                                      java.lang.String version,
                                                                      java.lang.String relationsName,
                                                                      java.lang.String revisionId)
Specified by:
resolvePropertiesOfRelationByRevision in interface PropertyService

doResolvePropertiesOfParentByRevision

protected java.util.List<Property> doResolvePropertiesOfParentByRevision(java.lang.String codingSchemeUri,
                                                                         java.lang.String version,
                                                                         java.lang.String parentUid,
                                                                         java.lang.String revisionId)

reviseCodingSchemeProperty

public void reviseCodingSchemeProperty(java.lang.String codingSchemeUri,
                                       java.lang.String version,
                                       Property property)
                                throws LBException
Description copied from interface: PropertyService
Revise a coding scheme property.

Specified by:
reviseCodingSchemeProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
property - the coding scheme property object.
Throws:
LBException

reviseEntityProperty

public void reviseEntityProperty(java.lang.String codingSchemeUri,
                                 java.lang.String version,
                                 java.lang.String entityCode,
                                 java.lang.String entityCodeNamespace,
                                 Property property)
                          throws LBException
Description copied from interface: PropertyService
Revise a entity property.

Specified by:
reviseEntityProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
entityCode - the entity code
entityCodeNamespace - the entity code namespace
property - the entity property object.
Throws:
LBException

reviseRelationProperty

public void reviseRelationProperty(java.lang.String codingSchemeUri,
                                   java.lang.String version,
                                   java.lang.String relationContainerName,
                                   Property property)
                            throws LBException
Description copied from interface: PropertyService
Revise a relations property.

Specified by:
reviseRelationProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
relationContainerName - the relations container name.
property - the relation property object.
Throws:
LBException

updateCodingSchemeProperty

public void updateCodingSchemeProperty(java.lang.String codingSchemeUri,
                                       java.lang.String version,
                                       Property property)
Description copied from interface: PropertyService
update coding schme property.

Specified by:
updateCodingSchemeProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
property - the coding scheme property.

updateEntityProperty

@Transactional
public void updateEntityProperty(java.lang.String codingSchemeUri,
                                               java.lang.String version,
                                               java.lang.String entityCode,
                                               java.lang.String entityCodeNamespace,
                                               Property property)
Description copied from interface: PropertyService
Update entity property.

Specified by:
updateEntityProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri
version - the version
entityCode - the entity code
entityCodeNamespace - the entity code namespace
property - the property

updateRelationProperty

public void updateRelationProperty(java.lang.String codingSchemeUri,
                                   java.lang.String version,
                                   java.lang.String relationContainerName,
                                   Property property)
Description copied from interface: PropertyService
Update relation property.

Specified by:
updateRelationProperty in interface PropertyService
Parameters:
codingSchemeUri - the coding scheme uri.
version - the coding scheme version.
relationContainerName - the relations container name.
property - the relation property object.

doUpdateProperty

protected void doUpdateProperty(java.lang.String codingSchemeUri,
                                java.lang.String version,
                                java.lang.String parentUid,
                                Property property,
                                PropertyDao.PropertyType propertyType)
                         throws LBException
Throws:
LBException

propertyListToBatchInsertList

protected java.util.List<PropertyBatchInsertItem> propertyListToBatchInsertList(java.lang.String parentId,
                                                                                java.util.List<Property> props)
Property list to batch insert list.

Parameters:
parentId - the parent id
props - the props
Returns:
the list< property batch insert item>

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.