com.ail.core
Class History

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.core.History
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class History
extends Type

The history object is a collection of Version objects which document the change history of an entity. A history object represents a snapshot of history of an object, rather than the history itself. Changes made to the History object's Version records do not effect the actual history.

Version:
$Revision: 1.3 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
History()
           
 
Method Summary
 void addVersion(Version vVersion)
          Add a Version to this group.
 java.util.Enumeration<Version> enumerateVersion()
          Return a list of the versions as an enumeration.
 java.util.Collection<Version> getVersion()
          Return the list of the versions as a Collection.
 Version getVersion(int index)
          Fetch a specific Version by it's index in history.
 int getVersionCount()
          Fetch a count of the number of versions.
 void removeAllVersion()
          Remove (delete) all the versions.
 Version removeVersion(int index)
          Remove (delete) a specific Version from the list.
 void setVersion(java.util.Collection<Version> version)
          Set the version collection.
 void setVersion(Version[] versionArray)
          Replace all the version elements in this history with those in the array provided.
 void setVersionAt(int index, Version vVersion)
          Set the Version at a specified index in this history, this replaces the Version currently at that index.
 
Methods inherited from class com.ail.core.Type
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

History

public History()
Method Detail

addVersion

public void addVersion(Version vVersion)
                throws java.lang.IndexOutOfBoundsException
Add a Version to this group.

Parameters:
vVersion - Version to add.
Throws:
java.lang.IndexOutOfBoundsException - Group is "full"

enumerateVersion

public java.util.Enumeration<Version> enumerateVersion()
Return a list of the versions as an enumeration.

Returns:
Enumeration of properties

getVersion

public Version getVersion(int index)
                   throws java.lang.IndexOutOfBoundsException
Fetch a specific Version by it's index in history.

Parameters:
index - Index of Version to fetch.
Returns:
The Version at 'index'.
Throws:
java.lang.IndexOutOfBoundsException - index is out of range

getVersion

public java.util.Collection<Version> getVersion()
Return the list of the versions as a Collection.

Returns:
Collection of Version elements.

setVersion

public void setVersion(java.util.Collection<Version> version)
Set the version collection.

Parameters:
version -

getVersionCount

public int getVersionCount()
Fetch a count of the number of versions.

Returns:
Count of properties in the group.

removeAllVersion

public void removeAllVersion()
Remove (delete) all the versions. Persisted history is not effected.


removeVersion

public Version removeVersion(int index)
Remove (delete) a specific Version from the list. Persisted history is not effected.

Parameters:
index - The index of the Version to remove.
Returns:
removed Version, or null if index is out of range.

setVersionAt

public void setVersionAt(int index,
                         Version vVersion)
                  throws java.lang.IndexOutOfBoundsException
Set the Version at a specified index in this history, this replaces the Version currently at that index. Persistent history is not effected.

Parameters:
index - Index into the group
vVersion - Version to be added.
Throws:
java.lang.IndexOutOfBoundsException - If index is out of range.

setVersion

public void setVersion(Version[] versionArray)
Replace all the version elements in this history with those in the array provided. Persistent history is not effected.

Parameters:
VersionArray - Array of properties