|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectVersion
public final class Version
Union type class for the Version
Union type in FES 2.0.
The union is actually captured as a union inside a single long field.
Nested Class Summary | |
---|---|
static class |
Version.Action
The VersionAction attribute may also be the strings FIRST, LATEST, PREVIOUS, NEXT and ALL. |
Constructor Summary | |
---|---|
Version()
The empty Version constructor. |
|
Version(Date dateTime)
|
|
Version(Integer index)
|
|
Version(Version.Action action)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
|
Date |
getDateTime()
Version requested as the closest to the provided date. |
Integer |
getIndex()
Version requested as defined by an index (from 1 through to the latest). |
Version.Action |
getVersionAction()
Version requested using a predefined constant. |
int |
hashCode()
|
boolean |
isDateTime()
|
boolean |
isEmpty()
|
boolean |
isIndex()
Version index requested. |
boolean |
isVersionAction()
|
long |
union()
Access to the union memento; this may be stored as an encoding of the Version in memory sensitive settings where the over head of an object is not desired. |
static Version |
valueOf(long union)
|
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Version()
empty
Version constructor.
public Version(Version.Action action)
public Version(Integer index)
index
- a positive integer > 0, representing the 1 based index of the requested feature
in its version history.public Version(Date dateTime)
Method Detail |
---|
public static Version valueOf(long union)
public boolean isEmpty()
public boolean isVersionAction()
public long union()
To restore please use new Version( union )
public Version.Action getVersionAction()
The versionAction attribute may also be the strings FIRST, LATEST, PREVIOUS, NEXT and ALL. The token FIRST shall select the first version of a resource. The token LATEST shall select the most recent version of a resource. The PREVIOUS and NEXT tokens shall select the previous or next version of a resource relative to the version specified using the rid attribute. The token ALL shall select all available version of a resource.
public boolean isIndex()
public Integer getIndex()
The version attribute may be an integer N indicating that the Nth version of the resource shall be selected. The first version of a resource shall be numbered 1. If N exceeds the number of versions available, the latest version of the resource shall be selected.
public boolean isDateTime()
public Date getDateTime()
The version attribute may also be date indicating that the version of the resource closest to the specified date shall be selected.
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |