org.lexevs.dao.database.ibatis.versions
Class IbatisVersionsDao

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.versions.IbatisVersionsDao
All Implemented Interfaces:
LexGridSchemaVersionAwareDao, VersionsDao, org.springframework.beans.factory.InitializingBean

public class IbatisVersionsDao
extends AbstractIbatisDao
implements VersionsDao

The Class IbatisVersionsDao.

Author:
Kevin Peterson

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.lexevs.dao.database.access.versions.VersionsDao
VersionsDao.EntryStateType
 
Nested classes/interfaces inherited from interface org.lexevs.dao.database.access.LexGridSchemaVersionAwareDao
LexGridSchemaVersionAwareDao.IndividualDaoCallback<T>
 
Field Summary
static java.lang.String GET_SYSTEM_RELEASE_ID_BY_URI
          The GE t_ syste m_ releas e_ i d_ b y_ uri.
static java.lang.String INSERT_ENTRY_STATE_SQL
           
static java.lang.String VERSIONS_NAMESPACE
           
 
Fields inherited from class org.lexevs.dao.database.ibatis.AbstractIbatisDao
VSENTRYSTATE_NAMESPACE
 
Constructor Summary
IbatisVersionsDao()
           
 
Method Summary
protected  InsertEntryStateBean buildInsertEntryStateBean(java.lang.String prefix, java.lang.String entryStateUId, java.lang.String entryUId, java.lang.String entryType, java.lang.String previousEntryStateUId, EntryState entryState)
          Builds the insert entry state bean.
 void deleteAllEntryStateEntriesByEntryUId(java.lang.String codingSchemeUId, java.lang.String entryUId)
           
 void deleteAllEntryStateOfCodingScheme(java.lang.String codingSchemeUId)
           
 void deleteAllEntryStateOfEntity(java.lang.String codingSchemeUId, java.lang.String entityUId)
           
 void deleteAllEntryStateOfRelation(java.lang.String codingSchemeUId, java.lang.String relationUId)
           
 java.util.List<LexGridSchemaVersion> doGetSupportedLgSchemaVersions()
          Do get supported lg schema versions.
 EntryState getEntryStateByEntryUidAndRevisionId(java.lang.String codingSchemeUId, java.lang.String entryUId, java.lang.String revisionId)
           
 IbatisRevisionDao getIbatisRevisionDao()
           
 java.lang.String getPreviousRevisionIdFromGivenRevisionIdForEntry(java.lang.String codingSchemeUid, java.lang.String entityUid, java.lang.String revisionId)
           
 java.lang.String getSystemReleaseIdByUri(java.lang.String systemReleaseUri)
          Gets the system release id by uri.
 void insertEntryState(java.lang.String codingSchemeUId, java.lang.String entryStateUId, java.lang.String entryUId, VersionsDao.EntryStateType entryType, java.lang.String previousEntryStateUId, EntryState entryState)
           
 void insertEntryState(java.lang.String codingSchemeUId, java.lang.String entryStateUId, java.lang.String entryUId, VersionsDao.EntryStateType entryType, java.lang.String previousEntryStateUId, EntryState entryState, Inserter inserter)
           
 java.lang.String insertEntryState(java.lang.String codingSchemeUId, java.lang.String entryUId, VersionsDao.EntryStateType entryType, java.lang.String previousEntryStateUId, EntryState entryState)
           
 void insertRevision(Revision revision)
          Insert revision.
 void insertSystemRelease(SystemRelease systemRelease)
          Insert system release.
 void setIbatisRevisionDao(IbatisRevisionDao ibatisRevisionDao)
           
 void updateEntryState(java.lang.String id, EntryState entryState)
           
 void updatePreviousEntryStateUIds(java.lang.String codingSchemeUId, java.lang.String entryUId, java.lang.String prevEntryStateUId, java.lang.String newEntryStateUId)
           
 
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

VERSIONS_NAMESPACE

public static java.lang.String VERSIONS_NAMESPACE

INSERT_ENTRY_STATE_SQL

public static java.lang.String INSERT_ENTRY_STATE_SQL

GET_SYSTEM_RELEASE_ID_BY_URI

public static java.lang.String GET_SYSTEM_RELEASE_ID_BY_URI
The GE t_ syste m_ releas e_ i d_ b y_ uri.

Constructor Detail

IbatisVersionsDao

public IbatisVersionsDao()
Method Detail

getPreviousRevisionIdFromGivenRevisionIdForEntry

public java.lang.String getPreviousRevisionIdFromGivenRevisionIdForEntry(java.lang.String codingSchemeUid,
                                                                         java.lang.String entityUid,
                                                                         java.lang.String revisionId)
Specified by:
getPreviousRevisionIdFromGivenRevisionIdForEntry in interface VersionsDao

getEntryStateByEntryUidAndRevisionId

public EntryState getEntryStateByEntryUidAndRevisionId(java.lang.String codingSchemeUId,
                                                       java.lang.String entryUId,
                                                       java.lang.String revisionId)
Specified by:
getEntryStateByEntryUidAndRevisionId in interface VersionsDao

getSystemReleaseIdByUri

public java.lang.String getSystemReleaseIdByUri(java.lang.String systemReleaseUri)
Description copied from interface: VersionsDao
Gets the system release id by uri.

Specified by:
getSystemReleaseIdByUri in interface VersionsDao
Parameters:
systemReleaseUri - the system release uri
Returns:
the system release id by uri

updateEntryState

public void updateEntryState(java.lang.String id,
                             EntryState entryState)

insertEntryState

public void insertEntryState(java.lang.String codingSchemeUId,
                             java.lang.String entryStateUId,
                             java.lang.String entryUId,
                             VersionsDao.EntryStateType entryType,
                             java.lang.String previousEntryStateUId,
                             EntryState entryState,
                             Inserter inserter)
Specified by:
insertEntryState in interface VersionsDao

insertRevision

public void insertRevision(Revision revision)
Description copied from interface: VersionsDao
Insert revision.

Specified by:
insertRevision in interface VersionsDao
Parameters:
revision - the revision

insertSystemRelease

public void insertSystemRelease(SystemRelease systemRelease)
Description copied from interface: VersionsDao
Insert system release.

Specified by:
insertSystemRelease in interface VersionsDao
Parameters:
systemRelease - the system release

updatePreviousEntryStateUIds

public void updatePreviousEntryStateUIds(java.lang.String codingSchemeUId,
                                         java.lang.String entryUId,
                                         java.lang.String prevEntryStateUId,
                                         java.lang.String newEntryStateUId)
Specified by:
updatePreviousEntryStateUIds in interface VersionsDao

insertEntryState

public java.lang.String insertEntryState(java.lang.String codingSchemeUId,
                                         java.lang.String entryUId,
                                         VersionsDao.EntryStateType entryType,
                                         java.lang.String previousEntryStateUId,
                                         EntryState entryState)
Specified by:
insertEntryState in interface VersionsDao

insertEntryState

public void insertEntryState(java.lang.String codingSchemeUId,
                             java.lang.String entryStateUId,
                             java.lang.String entryUId,
                             VersionsDao.EntryStateType entryType,
                             java.lang.String previousEntryStateUId,
                             EntryState entryState)
Specified by:
insertEntryState in interface VersionsDao

buildInsertEntryStateBean

protected InsertEntryStateBean buildInsertEntryStateBean(java.lang.String prefix,
                                                         java.lang.String entryStateUId,
                                                         java.lang.String entryUId,
                                                         java.lang.String entryType,
                                                         java.lang.String previousEntryStateUId,
                                                         EntryState entryState)
Builds the insert entry state bean.

Parameters:
prefix - the prefix
entryStateUId - the entry state id
entryUId - the entry id
entryType - the entry type
previousEntryStateUId - the previous entry state id
entryState - the entry state
Returns:
the insert entry state bean

deleteAllEntryStateEntriesByEntryUId

public void deleteAllEntryStateEntriesByEntryUId(java.lang.String codingSchemeUId,
                                                 java.lang.String entryUId)
Specified by:
deleteAllEntryStateEntriesByEntryUId in interface VersionsDao

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>

getIbatisRevisionDao

public IbatisRevisionDao getIbatisRevisionDao()
Returns:
the ibatisRevisionDao

setIbatisRevisionDao

public void setIbatisRevisionDao(IbatisRevisionDao ibatisRevisionDao)
Parameters:
ibatisRevisionDao - the ibatisRevisionDao to set

deleteAllEntryStateOfCodingScheme

public void deleteAllEntryStateOfCodingScheme(java.lang.String codingSchemeUId)
Specified by:
deleteAllEntryStateOfCodingScheme in interface VersionsDao

deleteAllEntryStateOfEntity

public void deleteAllEntryStateOfEntity(java.lang.String codingSchemeUId,
                                        java.lang.String entityUId)
Specified by:
deleteAllEntryStateOfEntity in interface VersionsDao

deleteAllEntryStateOfRelation

public void deleteAllEntryStateOfRelation(java.lang.String codingSchemeUId,
                                          java.lang.String relationUId)
Specified by:
deleteAllEntryStateOfRelation in interface VersionsDao

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.