ID
- is the type of the primary key
.ENTITY
- is the type
of the managed entity.public abstract class AbstractRevisionedDao<ID,ENTITY extends RevisionedEntity<ID>> extends AbstractGenericDao<ID,ENTITY> implements RevisionedDao<ID,ENTITY>
RevisionedDao
interface.Constructor and Description |
---|
AbstractRevisionedDao() |
Modifier and Type | Method and Description |
---|---|
ENTITY |
load(ID id,
Number revision)
This method loads a historic
revision of the
RevisionedEntity with the given id from the persistent store. |
protected abstract ENTITY |
loadRevision(Object id,
Number revision)
This method gets a historic revision of the
GenericEntity with the
given id . |
create, doInitialize, find, getEntityApiClass, getPojoFactory, setPojoFactory
createLogger, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createRevision, delete, getRevisionHistory, getRevisionHistoryMetadata
create, deleteById, find, findIfExists, getEntityClass, getReference, save
public ENTITY load(ID id, Number revision) throws ObjectNotFoundException
revision
of the
RevisionedEntity
with the given id
from the persistent store. revision
is RevisionedEntity.LATEST_REVISION
the
latest revision will be loaded
. revision
numbering of the underlying
implementation. Please use RevisionedDao.getRevisionHistory(RevisionedEntity)
or
RevisionedDao.getRevisionHistoryMetadata(Object)
to find revision numbers.load
in interface RevisionedDao<ID,ENTITY extends RevisionedEntity<ID>>
id
- is the primary key
of the requested entity
.revision
- is the revision
of the requested entity or
RevisionedEntity.LATEST_REVISION
to get the latest
revision. A
specific revision has to be greater than 0
.entity
.ObjectNotFoundException
- if the requested entity
could NOT be found.protected abstract ENTITY loadRevision(Object id, Number revision) throws ObjectNotFoundException
GenericEntity
with the
given id
.Copyright © 2001–2014 mmm-Team. All rights reserved.