PK - the primary key type.E - the entity type.public interface HistoricalDao<PK,E extends HistoricalEntity<PK>> extends Dao<E,PK>
HistoricalEntity interface, which
defines effectiveAt and expiredAt. Real-world
objects will have one or more entity instances, each representing the
object's state between the effective and expired datetimes.| Modifier and Type | Method and Description |
|---|---|
List<E> |
getCurrent() |
E |
updateCurrent(E entity)
Updates the given entity.
|
E updateCurrent(E entity)
expiredAt field to the
current datetime, and create a new record reflecting the given entity
instance. It will set the new entity instance's effectiveAt
field to the current datetime. It also will set the
expiredAt field to null. The given entity
instance will have an updated id after the method returns,
and the updated entity also will be returned from the method.entity - the entity to update.Copyright © 2016–2019 Emory University. All rights reserved.