|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ov4j.data.Item<T,C>
public class Item<T extends java.lang.Comparable<? super T> & java.lang.Cloneable & java.io.Serializable,C extends java.lang.Comparable<? super C>>
This is the objects stored in the system, it holds all versions for a given ID.
| Field Summary | |
|---|---|
static Item<?,?>[] |
EMPTY_ARRAY
Empty Item array. |
static int |
NO_ROLLOVER
Use this version rollover to keep whole history. |
| Constructor Summary | |
|---|---|
Item()
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
addVersion(Version<T> version,
int versionRollover)
Add a version to this item. |
Item<T,C> |
clone()
|
boolean |
equals(java.lang.Object o)
|
C |
getId()
|
Version<T> |
getLatest()
|
Version<T> |
getLatestBefore(long tstamp)
|
long |
getModificationStamp()
|
Version<T>[] |
getVersions()
|
int |
hashCode()
|
int |
numVersions()
|
void |
setId(C id)
|
void |
setLatest(Version<T> latest)
|
void |
setModificationStamp(long modificationStamp)
|
void |
setVersions(Version<T>[] newVersions)
|
java.lang.String |
toString()
|
void |
versions(Version<T>[] newVersions)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Item<?,?>[] EMPTY_ARRAY
public static final int NO_ROLLOVER
| Constructor Detail |
|---|
public Item()
| Method Detail |
|---|
public boolean addVersion(Version<T> version,
int versionRollover)
version - The new version to be added.versionRollover - How many versions to keep in history.
public Item<T,C> clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionObject.clone()public boolean equals(java.lang.Object o)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public C getId()
public Version<T> getLatest()
public Version<T> getLatestBefore(long tstamp)
tstamp - Timestamp to use for fetching the version.
public long getModificationStamp()
public Version<T>[] getVersions()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public int numVersions()
public void setId(C id)
id - The id to set.public void setLatest(Version<T> latest)
latest - The latest version to set.public void setModificationStamp(long modificationStamp)
modificationStamp - The modificationStamp to set.public void setVersions(Version<T>[] newVersions)
versions - The versions to set.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void versions(Version<T>[] newVersions)
versions - The versions to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||