public abstract class RevisableAbstractDatabaseService<T extends Versionable,I extends RevisableAbstractDatabaseService.CodingSchemeUriVersionBasedEntryId> extends AbstractDatabaseService
Modifier and Type | Class and Description |
---|---|
static class |
RevisableAbstractDatabaseService.CodingSchemeUriVersionBasedEntryId
The Class CodingSchemeUriVersionBasedEntryId.
|
static class |
RevisableAbstractDatabaseService.ParentUidReferencingId
The Class ParentUidReferencingId.
|
static interface |
RevisableAbstractDatabaseService.UpdateTemplate
The Interface UpdateTemplate.
|
Constructor and Description |
---|
RevisableAbstractDatabaseService() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
addDependentAttributesByRevisionId(I id,
java.lang.String entryUid,
T entry,
java.lang.String revisionId)
Adds the dependent attributes by revision id.
|
protected abstract void |
doInsertDependentChanges(I id,
T revisedEntry)
Do insert dependent changes.
|
protected abstract boolean |
entryStateExists(I id,
java.lang.String entryStateUid)
Entry state exists.
|
protected java.lang.String |
getCodingSchemeUid(RevisableAbstractDatabaseService.CodingSchemeUriVersionBasedEntryId id)
Gets the coding scheme uid.
|
protected abstract T |
getCurrentEntry(I id,
java.lang.String entryUId)
Gets the current entry.
|
protected abstract java.lang.String |
getCurrentEntryStateUid(I id,
java.lang.String entryUid)
Gets the current entry state uid.
|
protected abstract java.lang.String |
getEntryUid(I id,
T entry)
Gets the entry uid.
|
protected abstract T |
getHistoryEntryByRevisionId(I id,
java.lang.String entryUid,
java.lang.String revisionId)
Gets the history entry by revision id.
|
protected abstract java.lang.String |
getLatestRevisionId(I id,
java.lang.String entryUId)
Gets the latest revision id.
|
protected void |
insertDependentChanges(I id,
T revisedEntry,
VersionsDao.EntryStateType type)
Insert dependent changes.
|
protected abstract void |
insertIntoHistory(I id,
T currentEntry,
java.lang.String entryUId)
Insert into history.
|
protected void |
insertVersionableChanges(I id,
T revisedEntry,
VersionsDao.EntryStateType type)
Insert versionable changes.
|
protected boolean |
isValidRevisionId(java.lang.String revisionId) |
protected void |
makeChange(I id,
T revisedEntry,
VersionsDao.EntryStateType type,
org.lexevs.dao.database.service.RevisableAbstractDatabaseService.ChangeDatabaseStateTemplate<I,T> template)
Make change.
|
protected java.lang.String |
resolveCurrentEntryStateUid(I id,
java.lang.String entryUid,
VersionsDao.EntryStateType type)
Resolve current entry state uid.
|
T |
resolveEntryByRevision(I id,
java.lang.String entryUid,
java.lang.String revisionId)
Resolve entry by revision.
|
protected void |
updateEntry(I id,
T updatedEntry,
VersionsDao.EntryStateType type,
RevisableAbstractDatabaseService.UpdateTemplate updateTemplate)
Update entry.
|
protected abstract java.lang.String |
updateEntryVersionableAttributes(I id,
java.lang.String entryUId,
T revisedEntity)
Update entity versionable attributes.
|
protected boolean |
validRevision(I id,
T entry)
Valid revision.
|
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 java.lang.String resolveCurrentEntryStateUid(I id, java.lang.String entryUid, VersionsDao.EntryStateType type)
id
- the identryUid
- the entry uidtype
- the typeprotected void makeChange(I id, T revisedEntry, VersionsDao.EntryStateType type, org.lexevs.dao.database.service.RevisableAbstractDatabaseService.ChangeDatabaseStateTemplate<I,T> template) throws LBException
id
- the idrevisedEntry
- the revised entrytype
- the typetemplate
- the templateLBException
- the LB exceptionprotected void insertVersionableChanges(I id, T revisedEntry, VersionsDao.EntryStateType type) throws LBException
id
- the idrevisedEntry
- the revised entrytype
- the typeLBException
- the LB exceptionprotected void updateEntry(I id, T updatedEntry, VersionsDao.EntryStateType type, RevisableAbstractDatabaseService.UpdateTemplate updateTemplate) throws LBException
id
- the idupdatedEntry
- the updated entrytype
- the typeupdateTemplate
- the update templateLBException
- the LB exceptionprotected void insertDependentChanges(I id, T revisedEntry, VersionsDao.EntryStateType type) throws LBException
id
- the idrevisedEntry
- the revised entrytype
- the typeLBException
- the LB exceptionpublic T resolveEntryByRevision(I id, java.lang.String entryUid, java.lang.String revisionId) throws LBRevisionException
id
- the identryUid
- the entry uidrevisionId
- the revision idLBRevisionException
- the LB revision exceptionprotected boolean validRevision(I id, T entry) throws LBException
id
- the identry
- the entryLBException
- the LB exceptionprotected abstract T addDependentAttributesByRevisionId(I id, java.lang.String entryUid, T entry, java.lang.String revisionId)
id
- the identryUid
- the entry uidentry
- the entryrevisionId
- the revision idprotected abstract void insertIntoHistory(I id, T currentEntry, java.lang.String entryUId)
id
- the idcurrentEntry
- the current entryentryUId
- the entry u idprotected abstract void doInsertDependentChanges(I id, T revisedEntry) throws LBException
id
- the idrevisedEntry
- the revised entryLBException
- the LB exceptionprotected abstract java.lang.String updateEntryVersionableAttributes(I id, java.lang.String entryUId, T revisedEntity)
id
- the identryUId
- the entry u idrevisedEntity
- the revised entityprotected abstract T getCurrentEntry(I id, java.lang.String entryUId)
id
- the identryUId
- the entry u idprotected abstract T getHistoryEntryByRevisionId(I id, java.lang.String entryUid, java.lang.String revisionId)
id
- the identryUid
- the entry uidrevisionId
- the revision idprotected abstract java.lang.String getLatestRevisionId(I id, java.lang.String entryUId)
id
- the identryUId
- the entry u idprotected abstract java.lang.String getEntryUid(I id, T entry)
id
- the identry
- the entryprotected abstract boolean entryStateExists(I id, java.lang.String entryStateUid)
id
- the identryStateUid
- the entry state uidprotected abstract java.lang.String getCurrentEntryStateUid(I id, java.lang.String entryUid)
id
- the identryUid
- the entry uidprotected java.lang.String getCodingSchemeUid(RevisableAbstractDatabaseService.CodingSchemeUriVersionBasedEntryId id)
id
- the idprotected boolean isValidRevisionId(java.lang.String revisionId)