org.lexevs.dao.database.ibatis.valuesets
Class IbatisVSPropertyDao

java.lang.Object
  extended by org.lexevs.dao.database.access.AbstractBaseDao
      extended by org.lexevs.dao.database.ibatis.AbstractIbatisDao
          extended by org.lexevs.dao.database.ibatis.valuesets.IbatisVSPropertyDao
All Implemented Interfaces:
LexGridSchemaVersionAwareDao, VSPropertyDao, org.springframework.beans.factory.InitializingBean

public class IbatisVSPropertyDao
extends AbstractIbatisDao
implements VSPropertyDao

The Class IbatisVSPropertyDao.

Author:
Sridhar Dwarkanath

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.lexevs.dao.database.access.valuesets.VSPropertyDao
VSPropertyDao.ReferenceType
 
Nested classes/interfaces inherited from interface org.lexevs.dao.database.access.LexGridSchemaVersionAwareDao
LexGridSchemaVersionAwareDao.IndividualDaoCallback<T>
 
Field Summary
static java.lang.String DELETE_ALL_DEFINITIONENTRY_PROPERTIES_OF_VALUESET_SQL
           
static java.lang.String DELETE_ALL_PICKLIST_DEFINITION_PROPERTIES_OF_PCIKLIST_SQL
           
static java.lang.String DELETE_ALL_PICKLIST_ENTRY_PROPERTIES_OF_PCIKLIST_SQL
           
static java.lang.String DELETE_ALL_VALUESET_DEFINITION_PROPERTIES_OF_VALUESET_SQL
           
static java.lang.String DELETE_PROP_MULTI_ATTRIB_BY_PROP_UID_AND_TYPE_SQL
           
static java.lang.String DELETE_PROPERTY_BY_UID_SQL
           
static java.lang.String GET_ALL_PROPERTIES_OF_PARENT_BY_REVISION_SQL
           
static java.lang.String GET_ALL_PROPERTIES_OF_PARENT_SQL
           
static java.lang.String GET_PROPERTY_ATTRIBUTES_BY_UID_SQL
           
static java.lang.String GET_PROPERTY_GUID_SQL
           
static java.lang.String GET_PROPERTY_MULTIATTRIB_BY_PROPERTY_ID_SQL
           
static java.lang.String INSERT_PROPERTY_MULTIATTRIB_SQL
           
static java.lang.String INSERT_PROPERTY_QUALIFIER_SQL
           
static java.lang.String INSERT_PROPERTY_SOURCE_SQL
           
static java.lang.String INSERT_PROPERTY_SQL
           
static java.lang.String INSERT_PROPERTY_USAGECONTEXT_SQL
           
static java.lang.String PROPERTY_NAMESPACE
           
static java.lang.String UPDATE_MULTI_ATTRIB_ENTRYSTATE_UID_BY_PROP_ID_TYPE_SQL
           
static java.lang.String UPDATE_PROPERTY_BY_UID_SQL
           
static java.lang.String UPDATE_PROPERTY_VER_ATTRIB_BY_UID_SQL
           
 
Fields inherited from class org.lexevs.dao.database.ibatis.AbstractIbatisDao
VERSIONS_NAMESPACE, VSENTRYSTATE_NAMESPACE
 
Constructor Summary
IbatisVSPropertyDao()
           
 
Method Summary
protected  InsertOrUpdatePropertyBean buildInsertPropertyBean(java.lang.String prefix, java.lang.String parentGuid, java.lang.String propertyGuid, java.lang.String entryStateGuid, VSPropertyDao.ReferenceType type, Property property)
          Builds the insert property bean.
protected  InsertPropertyMultiAttribBean buildInsertPropertyQualifierBean(java.lang.String propertyGuid, java.lang.String qualifierGuid, java.lang.String entryStateGuid, PropertyQualifier propertyQualifier)
          Builds the insert property qualifier bean.
protected  InsertPropertyMultiAttribBean buildInsertPropertySourceBean(java.lang.String propertyGuid, java.lang.String sourceId, java.lang.String entryStateId, Source source)
          Builds the insert property source bean.
protected  InsertPropertyMultiAttribBean buildInsertPropertyUsageContextBean(java.lang.String propertyGuid, java.lang.String qualifierGuid, java.lang.String entryStateGuid, java.lang.String usageContext)
          Builds the insert property usage context bean.
 void deleteAllDefinitionEntityPropertiesOfValueSetDefinition(java.lang.String valueSetDefinitionURI)
          Delete all DefinitionEntity properties of value set definition.
 void deleteAllPickListDefinitionProperties(java.lang.String pickListId)
          Delete all properties of a pick list definition.
 void deleteAllPickListEntityPropertiesOfPickListDefinition(java.lang.String pickListUID)
          Delete all PickListEntity properties of pick list definition.
 void deleteAllPickListEntryNodeProperties(java.lang.String pickListEntryNodeUId)
           
 void deleteAllValueSetDefinitionProperties(java.lang.String valueSetDefinitionUID)
          Delete all properties of a value set definition.
 void deletePropertyByUId(java.lang.String propertyUId)
           
protected
<T> java.util.List<T>
doGetPropertyMultiAttrib(java.lang.String propertyGuid, java.lang.Class<T> multiAttrib)
           
 java.util.List<LexGridSchemaVersion> doGetSupportedLgSchemaVersions()
          Do get supported lg schema versions.
 java.lang.String doInsertProperty(java.lang.String prefix, java.lang.String parentGuid, java.lang.String propertyGuid, VSPropertyDao.ReferenceType type, Property property, Inserter inserter)
          Insert property.
protected  void doInsertPropertyQualifier(java.lang.String propertyGuid, java.lang.String propertyQualifierGuid, java.lang.String entryStateGuid, PropertyQualifier propertyQualifier, Inserter inserter)
          Insert property qualifier.
protected  void doInsertPropertySource(java.lang.String propertyGuid, java.lang.String propertySourceGuid, java.lang.String entryStateId, Source source, Inserter inserter)
          Insert property source.
protected  void doInsertPropertyUsageContext(java.lang.String propertyGuid, java.lang.String propertyUsageContextGuid, java.lang.String entryStateGuid, java.lang.String usageContext, Inserter inserter)
          Insert property usage context.
 java.util.List<Property> getAllHistoryPropertiesOfParentByRevisionGuid(java.lang.String parentGuid, java.lang.String revisionGuid, VSPropertyDao.ReferenceType type)
           
 java.util.List<Property> getAllPropertiesOfParent(java.lang.String parentGuid, VSPropertyDao.ReferenceType type)
          Gets the all properties of parent.
 IbatisVersionsDao getIbatisVersionsDao()
          Gets the ibatis versions dao.
 java.lang.String getLatestRevision(java.lang.String propertyUId)
           
 Property getPropertyByUId(java.lang.String vsPropertyUId)
           
 java.lang.String getPropertyGuidFromParentGuidAndPropertyId(java.lang.String parentGuid, java.lang.String propertyId)
          Gets the propertyGuid from parentGuid and prop id.
protected  java.lang.String getPropertyTypeString(Property property)
           
 VSEntryStateDao getVsEntryStateDao()
           
 java.lang.String insertHistoryProperty(java.lang.String parentGuid, java.lang.String propertyGuid, VSPropertyDao.ReferenceType type, Property property)
           
 java.lang.String insertProperty(java.lang.String parentGuid, VSPropertyDao.ReferenceType type, Property property)
          Insert property.
 void insertPropertyQualifier(java.lang.String propertyGuid, PropertyQualifier propertyQualifier)
          Insert property qualifier.
 void insertPropertySource(java.lang.String propertyGuid, Source source)
          Insert property source.
 void insertPropertyUsageContext(java.lang.String propertyGuid, java.lang.String usageContext)
          Insert property usage context.
 Property resolveVSPropertyByRevision(java.lang.String parentGuid, java.lang.String propertyId, java.lang.String revisionId)
           
 void setIbatisVersionsDao(IbatisVersionsDao ibatisVersionsDao)
          Sets the ibatis versions dao.
 void setVsEntryStateDao(VSEntryStateDao vsEntryStateDao)
           
 java.lang.String updateProperty(java.lang.String parentGuid, java.lang.String propertyId, VSPropertyDao.ReferenceType type, Property property)
          Update property.
 java.lang.String updateVersionableAttributes(java.lang.String parentUId, java.lang.String propertyUId, VSPropertyDao.ReferenceType type, Property property)
           
 
Methods inherited from class org.lexevs.dao.database.ibatis.AbstractIbatisDao
afterPropertiesSet, entryStateExists, executeInTransaction, getBatchTemplateInserter, getNonBatchTemplateInserter, getSqlMapClientTemplate, setNonBatchTemplateInserter, setSqlMapClientTemplate, vsEntryStateExists
 
Methods inherited from class org.lexevs.dao.database.access.AbstractBaseDao
createRandomIdentifier, createUniqueId, getPrefixResolver, getPrimaryKeyIncrementer, setPrefixResolver, setPrimaryKeyIncrementer, supportsLgSchemaVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.lexevs.dao.database.access.LexGridSchemaVersionAwareDao
executeInTransaction, supportsLgSchemaVersion
 

Field Detail

PROPERTY_NAMESPACE

public static java.lang.String PROPERTY_NAMESPACE

INSERT_PROPERTY_SQL

public static java.lang.String INSERT_PROPERTY_SQL

DELETE_ALL_PICKLIST_ENTRY_PROPERTIES_OF_PCIKLIST_SQL

public static java.lang.String DELETE_ALL_PICKLIST_ENTRY_PROPERTIES_OF_PCIKLIST_SQL

DELETE_ALL_PICKLIST_DEFINITION_PROPERTIES_OF_PCIKLIST_SQL

public static java.lang.String DELETE_ALL_PICKLIST_DEFINITION_PROPERTIES_OF_PCIKLIST_SQL

DELETE_ALL_DEFINITIONENTRY_PROPERTIES_OF_VALUESET_SQL

public static java.lang.String DELETE_ALL_DEFINITIONENTRY_PROPERTIES_OF_VALUESET_SQL

DELETE_ALL_VALUESET_DEFINITION_PROPERTIES_OF_VALUESET_SQL

public static java.lang.String DELETE_ALL_VALUESET_DEFINITION_PROPERTIES_OF_VALUESET_SQL

DELETE_PROP_MULTI_ATTRIB_BY_PROP_UID_AND_TYPE_SQL

public static java.lang.String DELETE_PROP_MULTI_ATTRIB_BY_PROP_UID_AND_TYPE_SQL

UPDATE_MULTI_ATTRIB_ENTRYSTATE_UID_BY_PROP_ID_TYPE_SQL

public static java.lang.String UPDATE_MULTI_ATTRIB_ENTRYSTATE_UID_BY_PROP_ID_TYPE_SQL

INSERT_PROPERTY_QUALIFIER_SQL

public static java.lang.String INSERT_PROPERTY_QUALIFIER_SQL

INSERT_PROPERTY_SOURCE_SQL

public static java.lang.String INSERT_PROPERTY_SOURCE_SQL

INSERT_PROPERTY_USAGECONTEXT_SQL

public static java.lang.String INSERT_PROPERTY_USAGECONTEXT_SQL

INSERT_PROPERTY_MULTIATTRIB_SQL

public static java.lang.String INSERT_PROPERTY_MULTIATTRIB_SQL

GET_ALL_PROPERTIES_OF_PARENT_SQL

public static java.lang.String GET_ALL_PROPERTIES_OF_PARENT_SQL

GET_ALL_PROPERTIES_OF_PARENT_BY_REVISION_SQL

public static java.lang.String GET_ALL_PROPERTIES_OF_PARENT_BY_REVISION_SQL

GET_PROPERTY_GUID_SQL

public static java.lang.String GET_PROPERTY_GUID_SQL

GET_PROPERTY_MULTIATTRIB_BY_PROPERTY_ID_SQL

public static java.lang.String GET_PROPERTY_MULTIATTRIB_BY_PROPERTY_ID_SQL

UPDATE_PROPERTY_BY_UID_SQL

public static java.lang.String UPDATE_PROPERTY_BY_UID_SQL

UPDATE_PROPERTY_VER_ATTRIB_BY_UID_SQL

public static java.lang.String UPDATE_PROPERTY_VER_ATTRIB_BY_UID_SQL

DELETE_PROPERTY_BY_UID_SQL

public static java.lang.String DELETE_PROPERTY_BY_UID_SQL

GET_PROPERTY_ATTRIBUTES_BY_UID_SQL

public static java.lang.String GET_PROPERTY_ATTRIBUTES_BY_UID_SQL
Constructor Detail

IbatisVSPropertyDao

public IbatisVSPropertyDao()
Method Detail

insertProperty

public java.lang.String insertProperty(java.lang.String parentGuid,
                                       VSPropertyDao.ReferenceType type,
                                       Property property)
Description copied from interface: VSPropertyDao
Insert property.

Specified by:
insertProperty in interface VSPropertyDao
Parameters:
parentGuid - the parent GUID
type - the type
property - the property
Returns:
the string

insertHistoryProperty

public java.lang.String insertHistoryProperty(java.lang.String parentGuid,
                                              java.lang.String propertyGuid,
                                              VSPropertyDao.ReferenceType type,
                                              Property property)
Specified by:
insertHistoryProperty in interface VSPropertyDao

getAllPropertiesOfParent

public java.util.List<Property> getAllPropertiesOfParent(java.lang.String parentGuid,
                                                         VSPropertyDao.ReferenceType type)
Description copied from interface: VSPropertyDao
Gets the all properties of parent.

Specified by:
getAllPropertiesOfParent in interface VSPropertyDao
Parameters:
parentGuid - the parent GUID
type - the type
Returns:
the all properties of parent

getAllHistoryPropertiesOfParentByRevisionGuid

public java.util.List<Property> getAllHistoryPropertiesOfParentByRevisionGuid(java.lang.String parentGuid,
                                                                              java.lang.String revisionGuid,
                                                                              VSPropertyDao.ReferenceType type)
Specified by:
getAllHistoryPropertiesOfParentByRevisionGuid in interface VSPropertyDao

doGetPropertyMultiAttrib

protected <T> java.util.List<T> doGetPropertyMultiAttrib(java.lang.String propertyGuid,
                                                         java.lang.Class<T> multiAttrib)

getPropertyTypeString

protected java.lang.String getPropertyTypeString(Property property)

doInsertProperty

public java.lang.String doInsertProperty(java.lang.String prefix,
                                         java.lang.String parentGuid,
                                         java.lang.String propertyGuid,
                                         VSPropertyDao.ReferenceType type,
                                         Property property,
                                         Inserter inserter)
Insert property.

Parameters:
parentGuid - the parentGUID
type - the type
property - the property
inserter - the inserter
Returns:
the string

updateProperty

public java.lang.String updateProperty(java.lang.String parentGuid,
                                       java.lang.String propertyId,
                                       VSPropertyDao.ReferenceType type,
                                       Property property)
Description copied from interface: VSPropertyDao
Update property.

Specified by:
updateProperty in interface VSPropertyDao
Parameters:
parentGuid - the parent GUID
propertyId - the property GUID
type - the type
property - the property

insertPropertyQualifier

public void insertPropertyQualifier(java.lang.String propertyGuid,
                                    PropertyQualifier propertyQualifier)
Description copied from interface: VSPropertyDao
Insert property qualifier.

Specified by:
insertPropertyQualifier in interface VSPropertyDao
Parameters:
propertyGuid - the property GUID
propertyQualifier - the qualifier

doInsertPropertyQualifier

protected void doInsertPropertyQualifier(java.lang.String propertyGuid,
                                         java.lang.String propertyQualifierGuid,
                                         java.lang.String entryStateGuid,
                                         PropertyQualifier propertyQualifier,
                                         Inserter inserter)
Insert property qualifier.

Parameters:
propertyGuid - the property GUID
propertyQualifier - the property qualifier
inserter - the inserter

insertPropertySource

public void insertPropertySource(java.lang.String propertyGuid,
                                 Source source)
Description copied from interface: VSPropertyDao
Insert property source.

Specified by:
insertPropertySource in interface VSPropertyDao
Parameters:
propertyGuid - the property GUID
source - the source

doInsertPropertySource

protected void doInsertPropertySource(java.lang.String propertyGuid,
                                      java.lang.String propertySourceGuid,
                                      java.lang.String entryStateId,
                                      Source source,
                                      Inserter inserter)
Insert property source.

Parameters:
propertyGuid - the property Guid
source - the source
inserter - the inserter

doInsertPropertyUsageContext

protected void doInsertPropertyUsageContext(java.lang.String propertyGuid,
                                            java.lang.String propertyUsageContextGuid,
                                            java.lang.String entryStateGuid,
                                            java.lang.String usageContext,
                                            Inserter inserter)
Insert property usage context.

Parameters:
propertyGuid - the property GUID
usageContext - the usage context
inserter - the inserter

insertPropertyUsageContext

public void insertPropertyUsageContext(java.lang.String propertyGuid,
                                       java.lang.String usageContext)
Description copied from interface: VSPropertyDao
Insert property usage context.

Specified by:
insertPropertyUsageContext in interface VSPropertyDao
Parameters:
propertyGuid - the property GUID
usageContext - the usage context

deleteAllDefinitionEntityPropertiesOfValueSetDefinition

public void deleteAllDefinitionEntityPropertiesOfValueSetDefinition(java.lang.String valueSetDefinitionURI)
Description copied from interface: VSPropertyDao
Delete all DefinitionEntity properties of value set definition.

Specified by:
deleteAllDefinitionEntityPropertiesOfValueSetDefinition in interface VSPropertyDao
Parameters:
valueSetDefinitionURI - the URI of value set definition

deleteAllValueSetDefinitionProperties

public void deleteAllValueSetDefinitionProperties(java.lang.String valueSetDefinitionUID)
Description copied from interface: VSPropertyDao
Delete all properties of a value set definition.

Specified by:
deleteAllValueSetDefinitionProperties in interface VSPropertyDao
Parameters:
valueSetDefinitionUID - the URI of value set definition

deleteAllPickListEntityPropertiesOfPickListDefinition

public void deleteAllPickListEntityPropertiesOfPickListDefinition(java.lang.String pickListUID)
Description copied from interface: VSPropertyDao
Delete all PickListEntity properties of pick list definition.

Specified by:
deleteAllPickListEntityPropertiesOfPickListDefinition in interface VSPropertyDao
Parameters:
pickListUID - the id of pick list definition

deleteAllPickListDefinitionProperties

public void deleteAllPickListDefinitionProperties(java.lang.String pickListId)
Description copied from interface: VSPropertyDao
Delete all properties of a pick list definition.

Specified by:
deleteAllPickListDefinitionProperties in interface VSPropertyDao
Parameters:
pickListId - the id of pick list definition

deleteAllPickListEntryNodeProperties

public void deleteAllPickListEntryNodeProperties(java.lang.String pickListEntryNodeUId)
Specified by:
deleteAllPickListEntryNodeProperties in interface VSPropertyDao

getPropertyGuidFromParentGuidAndPropertyId

public java.lang.String getPropertyGuidFromParentGuidAndPropertyId(java.lang.String parentGuid,
                                                                   java.lang.String propertyId)
Gets the propertyGuid from parentGuid and prop id.

Specified by:
getPropertyGuidFromParentGuidAndPropertyId in interface VSPropertyDao
Parameters:
parentGuid - the parent GUID
propertyId - the propertyID
Returns:
the propertyGUID from parentGuid and propertyID

buildInsertPropertyBean

protected InsertOrUpdatePropertyBean buildInsertPropertyBean(java.lang.String prefix,
                                                             java.lang.String parentGuid,
                                                             java.lang.String propertyGuid,
                                                             java.lang.String entryStateGuid,
                                                             VSPropertyDao.ReferenceType type,
                                                             Property property)
Builds the insert property bean.

Parameters:
parentGuid - the parent GUID
propertyGuid - the property GUID
entryStateGuid - the entry state GUID
type - the type
property - the property
Returns:
the insert property bean

buildInsertPropertyQualifierBean

protected InsertPropertyMultiAttribBean buildInsertPropertyQualifierBean(java.lang.String propertyGuid,
                                                                         java.lang.String qualifierGuid,
                                                                         java.lang.String entryStateGuid,
                                                                         PropertyQualifier propertyQualifier)
Builds the insert property qualifier bean.

Parameters:
prefix - the prefix
propertyGuid - the property id
qualifierGuid - the qualifier id
propertyQualifier - the property qualifier
Returns:
the insert property multi attrib bean

buildInsertPropertyUsageContextBean

protected InsertPropertyMultiAttribBean buildInsertPropertyUsageContextBean(java.lang.String propertyGuid,
                                                                            java.lang.String qualifierGuid,
                                                                            java.lang.String entryStateGuid,
                                                                            java.lang.String usageContext)
Builds the insert property usage context bean.

Parameters:
prefix - the prefix
propertyGuid - the property GUID
qualifierGuid - the qualifier GUID
usageContext - the usage context
Returns:
the insert property multi attrib bean

buildInsertPropertySourceBean

protected InsertPropertyMultiAttribBean buildInsertPropertySourceBean(java.lang.String propertyGuid,
                                                                      java.lang.String sourceId,
                                                                      java.lang.String entryStateId,
                                                                      Source source)
Builds the insert property source bean.

Parameters:
prefix - the prefix
propertyGuid - the property id
sourceId - the source id
source - the source
Returns:
the insert property multi attrib bean

doGetSupportedLgSchemaVersions

public java.util.List<LexGridSchemaVersion> doGetSupportedLgSchemaVersions()
Description copied from class: AbstractBaseDao
Do get supported lg schema versions.

Specified by:
doGetSupportedLgSchemaVersions in class AbstractBaseDao
Returns:
the list< lex grid schema version>

getIbatisVersionsDao

public IbatisVersionsDao getIbatisVersionsDao()
Gets the ibatis versions dao.

Returns:
the ibatis versions dao

setIbatisVersionsDao

public void setIbatisVersionsDao(IbatisVersionsDao ibatisVersionsDao)
Sets the ibatis versions dao.

Parameters:
ibatisVersionsDao - the new ibatis versions dao

deletePropertyByUId

public void deletePropertyByUId(java.lang.String propertyUId)
Specified by:
deletePropertyByUId in interface VSPropertyDao

updateVersionableAttributes

public java.lang.String updateVersionableAttributes(java.lang.String parentUId,
                                                    java.lang.String propertyUId,
                                                    VSPropertyDao.ReferenceType type,
                                                    Property property)
Specified by:
updateVersionableAttributes in interface VSPropertyDao

getVsEntryStateDao

public VSEntryStateDao getVsEntryStateDao()
Returns:
the vsEntryStateDao

setVsEntryStateDao

public void setVsEntryStateDao(VSEntryStateDao vsEntryStateDao)
Parameters:
vsEntryStateDao - the vsEntryStateDao to set

getLatestRevision

public java.lang.String getLatestRevision(java.lang.String propertyUId)
Specified by:
getLatestRevision in interface VSPropertyDao

resolveVSPropertyByRevision

public Property resolveVSPropertyByRevision(java.lang.String parentGuid,
                                            java.lang.String propertyId,
                                            java.lang.String revisionId)
                                     throws LBRevisionException
Specified by:
resolveVSPropertyByRevision in interface VSPropertyDao
Throws:
LBRevisionException

getPropertyByUId

public Property getPropertyByUId(java.lang.String vsPropertyUId)
Specified by:
getPropertyByUId in interface VSPropertyDao

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.