|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.domain.Entity
ccc.domain.ResourceEntity
ccc.domain.HistoricalResource<S,T>
T
- The type of revision this class supports.S
- The type of delta the revision supports.public abstract class HistoricalResource<S,T extends RevisionEntity<S>>
A resource that records each update made over time.
Constructor Summary | |
---|---|
protected |
HistoricalResource()
Constructor: for persistence only. |
Method Summary | |
---|---|
protected void |
addRevision(T revision)
Add a new revision for this resource. |
T |
currentRevision()
Retrieve the current revision. |
int |
currentRevisionNo()
Retrieve the current revision number. |
T |
revision(int i)
Retrieve the specified revision. |
java.util.HashMap<java.lang.Integer,T> |
revisions()
Accessor. |
void |
toJson(Json json)
Convert to JSON. |
Methods inherited from class ccc.domain.Entity |
---|
equals, getId, getVersion, hashCode, setId, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ccc.domain.SnapshotSupport |
---|
forCurrentRevision, forSpecificRevision, forWorkingCopy |
Constructor Detail |
---|
protected HistoricalResource()
Method Detail |
---|
public T currentRevision()
public int currentRevisionNo()
public T revision(int i)
i
- The revision number.
protected void addRevision(T revision)
revision
- The revision to add.public java.util.HashMap<java.lang.Integer,T> revisions()
public void toJson(Json json)
toJson
in interface Jsonable
toJson
in class ResourceEntity
json
- The JSON object to write to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |