*
* @version $Revision$ $Date$
*/
-public class ApplicationData extends org.vamsas.client.object
+public class ApplicationData extends org.vamsas.objects.core.AppData
implements java.io.Serializable
{
//--------------------------/
/**
- * Field _applicationList
+ * Version string describing the application specific data
+ * storage version used
*/
- private java.util.Vector _applicationList;
+ private java.lang.String _version;
+
+ /**
+ * Canonical name of application
+ *
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _userList
+ */
+ private java.util.Vector _userList;
+
+ /**
+ * Field _common
+ */
+ private org.vamsas.objects.core.Common _common;
+
+ /**
+ * Field _instanceList
+ */
+ private java.util.Vector _instanceList;
//----------------/
public ApplicationData()
{
super();
- _applicationList = new Vector();
+ _userList = new Vector();
+ _instanceList = new Vector();
} //-- org.vamsas.objects.core.ApplicationData()
//-----------/
/**
- * Method addApplication
+ * Method addInstance
+ *
+ *
+ *
+ * @param vInstance
+ */
+ public void addInstance(org.vamsas.objects.core.Instance vInstance)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _instanceList.addElement(vInstance);
+ } //-- void addInstance(org.vamsas.objects.core.Instance)
+
+ /**
+ * Method addInstance
+ *
+ *
+ *
+ * @param index
+ * @param vInstance
+ */
+ public void addInstance(int index, org.vamsas.objects.core.Instance vInstance)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _instanceList.insertElementAt(vInstance, index);
+ } //-- void addInstance(int, org.vamsas.objects.core.Instance)
+
+ /**
+ * Method addUser
*
*
*
- * @param vApplication
+ * @param vUser
*/
- public void addApplication(org.vamsas.objects.core.Application vApplication)
+ public void addUser(org.vamsas.objects.core.User vUser)
throws java.lang.IndexOutOfBoundsException
{
- _applicationList.addElement(vApplication);
- } //-- void addApplication(org.vamsas.objects.core.Application)
+ _userList.addElement(vUser);
+ } //-- void addUser(org.vamsas.objects.core.User)
/**
- * Method addApplication
+ * Method addUser
*
*
*
* @param index
- * @param vApplication
+ * @param vUser
*/
- public void addApplication(int index, org.vamsas.objects.core.Application vApplication)
+ public void addUser(int index, org.vamsas.objects.core.User vUser)
throws java.lang.IndexOutOfBoundsException
{
- _applicationList.insertElementAt(vApplication, index);
- } //-- void addApplication(int, org.vamsas.objects.core.Application)
+ _userList.insertElementAt(vUser, index);
+ } //-- void addUser(int, org.vamsas.objects.core.User)
/**
- * Method enumerateApplication
+ * Method enumerateInstance
*
*
*
* @return Enumeration
*/
- public java.util.Enumeration enumerateApplication()
+ public java.util.Enumeration enumerateInstance()
{
- return _applicationList.elements();
- } //-- java.util.Enumeration enumerateApplication()
+ return _instanceList.elements();
+ } //-- java.util.Enumeration enumerateInstance()
+
+ /**
+ * Method enumerateUser
+ *
+ *
+ *
+ * @return Enumeration
+ */
+ public java.util.Enumeration enumerateUser()
+ {
+ return _userList.elements();
+ } //-- java.util.Enumeration enumerateUser()
/**
* Note: hashCode() has not been overriden
if (obj instanceof ApplicationData) {
ApplicationData temp = (ApplicationData)obj;
- if (this._applicationList != null) {
- if (temp._applicationList == null) return false;
- else if (!(this._applicationList.equals(temp._applicationList)))
+ if (this._version != null) {
+ if (temp._version == null) return false;
+ else if (!(this._version.equals(temp._version)))
+ return false;
+ }
+ else if (temp._version != null)
+ return false;
+ if (this._name != null) {
+ if (temp._name == null) return false;
+ else if (!(this._name.equals(temp._name)))
+ return false;
+ }
+ else if (temp._name != null)
+ return false;
+ if (this._userList != null) {
+ if (temp._userList == null) return false;
+ else if (!(this._userList.equals(temp._userList)))
+ return false;
+ }
+ else if (temp._userList != null)
+ return false;
+ if (this._common != null) {
+ if (temp._common == null) return false;
+ else if (!(this._common.equals(temp._common)))
return false;
}
- else if (temp._applicationList != null)
+ else if (temp._common != null)
+ return false;
+ if (this._instanceList != null) {
+ if (temp._instanceList == null) return false;
+ else if (!(this._instanceList.equals(temp._instanceList)))
+ return false;
+ }
+ else if (temp._instanceList != null)
return false;
return true;
}
} //-- boolean equals(java.lang.Object)
/**
- * Method getApplication
+ * Returns the value of field 'common'.
+ *
+ * @return Common
+ * @return the value of field 'common'.
+ */
+ public org.vamsas.objects.core.Common getCommon()
+ {
+ return this._common;
+ } //-- org.vamsas.objects.core.Common getCommon()
+
+ /**
+ * Method getInstance
+ *
+ *
+ *
+ * @param index
+ * @return Instance
+ */
+ public org.vamsas.objects.core.Instance getInstance(int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _instanceList.size())) {
+ throw new IndexOutOfBoundsException("getInstance: Index value '"+index+"' not in range [0.."+_instanceList.size()+ "]");
+ }
+
+ return (org.vamsas.objects.core.Instance) _instanceList.elementAt(index);
+ } //-- org.vamsas.objects.core.Instance getInstance(int)
+
+ /**
+ * Method getInstance
+ *
+ *
+ *
+ * @return Instance
+ */
+ public org.vamsas.objects.core.Instance[] getInstance()
+ {
+ int size = _instanceList.size();
+ org.vamsas.objects.core.Instance[] mArray = new org.vamsas.objects.core.Instance[size];
+ for (int index = 0; index < size; index++) {
+ mArray[index] = (org.vamsas.objects.core.Instance) _instanceList.elementAt(index);
+ }
+ return mArray;
+ } //-- org.vamsas.objects.core.Instance[] getInstance()
+
+ /**
+ * Method getInstanceCount
+ *
+ *
+ *
+ * @return int
+ */
+ public int getInstanceCount()
+ {
+ return _instanceList.size();
+ } //-- int getInstanceCount()
+
+ /**
+ * Returns the value of field 'name'. The field 'name' has the
+ * following description: Canonical name of application
+ *
+ *
+ * @return String
+ * @return the value of field 'name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ } //-- java.lang.String getName()
+
+ /**
+ * Method getUser
*
*
*
* @param index
- * @return Application
+ * @return User
*/
- public org.vamsas.objects.core.Application getApplication(int index)
+ public org.vamsas.objects.core.User getUser(int index)
throws java.lang.IndexOutOfBoundsException
{
//-- check bounds for index
- if ((index < 0) || (index > _applicationList.size())) {
- throw new IndexOutOfBoundsException("getApplication: Index value '"+index+"' not in range [0.."+_applicationList.size()+ "]");
+ if ((index < 0) || (index > _userList.size())) {
+ throw new IndexOutOfBoundsException("getUser: Index value '"+index+"' not in range [0.."+_userList.size()+ "]");
}
- return (org.vamsas.objects.core.Application) _applicationList.elementAt(index);
- } //-- org.vamsas.objects.core.Application getApplication(int)
+ return (org.vamsas.objects.core.User) _userList.elementAt(index);
+ } //-- org.vamsas.objects.core.User getUser(int)
/**
- * Method getApplication
+ * Method getUser
*
*
*
- * @return Application
+ * @return User
*/
- public org.vamsas.objects.core.Application[] getApplication()
+ public org.vamsas.objects.core.User[] getUser()
{
- int size = _applicationList.size();
- org.vamsas.objects.core.Application[] mArray = new org.vamsas.objects.core.Application[size];
+ int size = _userList.size();
+ org.vamsas.objects.core.User[] mArray = new org.vamsas.objects.core.User[size];
for (int index = 0; index < size; index++) {
- mArray[index] = (org.vamsas.objects.core.Application) _applicationList.elementAt(index);
+ mArray[index] = (org.vamsas.objects.core.User) _userList.elementAt(index);
}
return mArray;
- } //-- org.vamsas.objects.core.Application[] getApplication()
+ } //-- org.vamsas.objects.core.User[] getUser()
/**
- * Method getApplicationCount
+ * Method getUserCount
*
*
*
* @return int
*/
- public int getApplicationCount()
+ public int getUserCount()
{
- return _applicationList.size();
- } //-- int getApplicationCount()
+ return _userList.size();
+ } //-- int getUserCount()
+
+ /**
+ * Returns the value of field 'version'. The field 'version'
+ * has the following description: Version string describing the
+ * application specific data storage version used
+ *
+ * @return String
+ * @return the value of field 'version'.
+ */
+ public java.lang.String getVersion()
+ {
+ return this._version;
+ } //-- java.lang.String getVersion()
/**
* Method isValid
} //-- void marshal(org.xml.sax.ContentHandler)
/**
- * Method removeAllApplication
+ * Method removeAllInstance
+ *
+ */
+ public void removeAllInstance()
+ {
+ _instanceList.removeAllElements();
+ } //-- void removeAllInstance()
+
+ /**
+ * Method removeAllUser
*
*/
- public void removeAllApplication()
+ public void removeAllUser()
{
- _applicationList.removeAllElements();
- } //-- void removeAllApplication()
+ _userList.removeAllElements();
+ } //-- void removeAllUser()
/**
- * Method removeApplication
+ * Method removeInstance
*
*
*
* @param index
- * @return Application
+ * @return Instance
*/
- public org.vamsas.objects.core.Application removeApplication(int index)
+ public org.vamsas.objects.core.Instance removeInstance(int index)
{
- java.lang.Object obj = _applicationList.elementAt(index);
- _applicationList.removeElementAt(index);
- return (org.vamsas.objects.core.Application) obj;
- } //-- org.vamsas.objects.core.Application removeApplication(int)
+ java.lang.Object obj = _instanceList.elementAt(index);
+ _instanceList.removeElementAt(index);
+ return (org.vamsas.objects.core.Instance) obj;
+ } //-- org.vamsas.objects.core.Instance removeInstance(int)
/**
- * Method setApplication
+ * Method removeUser
*
*
*
* @param index
- * @param vApplication
+ * @return User
*/
- public void setApplication(int index, org.vamsas.objects.core.Application vApplication)
+ public org.vamsas.objects.core.User removeUser(int index)
+ {
+ java.lang.Object obj = _userList.elementAt(index);
+ _userList.removeElementAt(index);
+ return (org.vamsas.objects.core.User) obj;
+ } //-- org.vamsas.objects.core.User removeUser(int)
+
+ /**
+ * Sets the value of field 'common'.
+ *
+ * @param common the value of field 'common'.
+ */
+ public void setCommon(org.vamsas.objects.core.Common common)
+ {
+ this._common = common;
+ } //-- void setCommon(org.vamsas.objects.core.Common)
+
+ /**
+ * Method setInstance
+ *
+ *
+ *
+ * @param index
+ * @param vInstance
+ */
+ public void setInstance(int index, org.vamsas.objects.core.Instance vInstance)
throws java.lang.IndexOutOfBoundsException
{
//-- check bounds for index
- if ((index < 0) || (index > _applicationList.size())) {
- throw new IndexOutOfBoundsException("setApplication: Index value '"+index+"' not in range [0.."+_applicationList.size()+ "]");
+ if ((index < 0) || (index > _instanceList.size())) {
+ throw new IndexOutOfBoundsException("setInstance: Index value '"+index+"' not in range [0.."+_instanceList.size()+ "]");
}
- _applicationList.setElementAt(vApplication, index);
- } //-- void setApplication(int, org.vamsas.objects.core.Application)
+ _instanceList.setElementAt(vInstance, index);
+ } //-- void setInstance(int, org.vamsas.objects.core.Instance)
/**
- * Method setApplication
+ * Method setInstance
*
*
*
- * @param applicationArray
+ * @param instanceArray
*/
- public void setApplication(org.vamsas.objects.core.Application[] applicationArray)
+ public void setInstance(org.vamsas.objects.core.Instance[] instanceArray)
{
//-- copy array
- _applicationList.removeAllElements();
- for (int i = 0; i < applicationArray.length; i++) {
- _applicationList.addElement(applicationArray[i]);
+ _instanceList.removeAllElements();
+ for (int i = 0; i < instanceArray.length; i++) {
+ _instanceList.addElement(instanceArray[i]);
}
- } //-- void setApplication(org.vamsas.objects.core.Application)
+ } //-- void setInstance(org.vamsas.objects.core.Instance)
+
+ /**
+ * Sets the value of field 'name'. The field 'name' has the
+ * following description: Canonical name of application
+ *
+ *
+ * @param name the value of field 'name'.
+ */
+ public void setName(java.lang.String name)
+ {
+ this._name = name;
+ } //-- void setName(java.lang.String)
+
+ /**
+ * Method setUser
+ *
+ *
+ *
+ * @param index
+ * @param vUser
+ */
+ public void setUser(int index, org.vamsas.objects.core.User vUser)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _userList.size())) {
+ throw new IndexOutOfBoundsException("setUser: Index value '"+index+"' not in range [0.."+_userList.size()+ "]");
+ }
+ _userList.setElementAt(vUser, index);
+ } //-- void setUser(int, org.vamsas.objects.core.User)
+
+ /**
+ * Method setUser
+ *
+ *
+ *
+ * @param userArray
+ */
+ public void setUser(org.vamsas.objects.core.User[] userArray)
+ {
+ //-- copy array
+ _userList.removeAllElements();
+ for (int i = 0; i < userArray.length; i++) {
+ _userList.addElement(userArray[i]);
+ }
+ } //-- void setUser(org.vamsas.objects.core.User)
+
+ /**
+ * Sets the value of field 'version'. The field 'version' has
+ * the following description: Version string describing the
+ * application specific data storage version used
+ *
+ * @param version the value of field 'version'.
+ */
+ public void setVersion(java.lang.String version)
+ {
+ this._version = version;
+ } //-- void setVersion(java.lang.String)
/**
* Method unmarshal
*
*
* @param reader
- * @return ApplicationData
+ * @return AppData
*/
- public static org.vamsas.objects.core.ApplicationData unmarshal(java.io.Reader reader)
+ public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
return (org.vamsas.objects.core.ApplicationData) Unmarshaller.unmarshal(org.vamsas.objects.core.ApplicationData.class, reader);
- } //-- org.vamsas.objects.core.ApplicationData unmarshal(java.io.Reader)
+ } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader)
/**
* Method validate