autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / ApplicationData.java
index cd13be4..22b645a 100644 (file)
@@ -15,6 +15,8 @@ import java.io.IOException;
 import java.io.Reader;
 import java.io.Serializable;
 import java.io.Writer;
+import java.util.Enumeration;
+import java.util.Vector;
 import org.exolab.castor.xml.MarshalException;
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
@@ -26,7 +28,7 @@ import org.xml.sax.ContentHandler;
  * 
  * @version $Revision$ $Date$
  */
-public class ApplicationData extends org.vamsas.client.object 
+public class ApplicationData extends org.vamsas.objects.core.AppData 
 implements java.io.Serializable
 {
 
@@ -36,9 +38,31 @@ implements java.io.Serializable
     //--------------------------/
 
     /**
-     * Field _application
+     * Version string describing the application specific data
+     * storage version used
      */
-    private org.vamsas.objects.core.Application _application;
+    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;
 
 
       //----------------/
@@ -48,6 +72,8 @@ implements java.io.Serializable
     public ApplicationData() 
      {
         super();
+        _userList = new Vector();
+        _instanceList = new Vector();
     } //-- org.vamsas.objects.core.ApplicationData()
 
 
@@ -56,6 +82,84 @@ implements java.io.Serializable
     //-----------/
 
     /**
+     * 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 vUser
+     */
+    public void addUser(org.vamsas.objects.core.User vUser)
+        throws java.lang.IndexOutOfBoundsException
+    {
+        _userList.addElement(vUser);
+    } //-- void addUser(org.vamsas.objects.core.User) 
+
+    /**
+     * Method addUser
+     * 
+     * 
+     * 
+     * @param index
+     * @param vUser
+     */
+    public void addUser(int index, org.vamsas.objects.core.User vUser)
+        throws java.lang.IndexOutOfBoundsException
+    {
+        _userList.insertElementAt(vUser, index);
+    } //-- void addUser(int, org.vamsas.objects.core.User) 
+
+    /**
+     * Method enumerateInstance
+     * 
+     * 
+     * 
+     * @return Enumeration
+     */
+    public java.util.Enumeration enumerateInstance()
+    {
+        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
      * 
      * @param obj
@@ -72,12 +176,40 @@ implements java.io.Serializable
         if (obj instanceof ApplicationData) {
         
             ApplicationData temp = (ApplicationData)obj;
-            if (this._application != null) {
-                if (temp._application == null) return false;
-                else if (!(this._application.equals(temp._application))) 
+            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._application != null)
+            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._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;
         }
@@ -85,15 +217,137 @@ implements java.io.Serializable
     } //-- boolean equals(java.lang.Object) 
 
     /**
-     * Returns the value of field 'application'.
+     * 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 Application
-     * @return the value of field 'application'.
+     * @return String
+     * @return the value of field 'name'.
      */
-    public org.vamsas.objects.core.Application getApplication()
+    public java.lang.String getName()
     {
-        return this._application;
-    } //-- org.vamsas.objects.core.Application getApplication() 
+        return this._name;
+    } //-- java.lang.String getName() 
+
+    /**
+     * Method getUser
+     * 
+     * 
+     * 
+     * @param index
+     * @return User
+     */
+    public org.vamsas.objects.core.User getUser(int index)
+        throws java.lang.IndexOutOfBoundsException
+    {
+        //-- check bounds for index
+        if ((index < 0) || (index > _userList.size())) {
+            throw new IndexOutOfBoundsException("getUser: Index value '"+index+"' not in range [0.."+_userList.size()+ "]");
+        }
+        
+        return (org.vamsas.objects.core.User) _userList.elementAt(index);
+    } //-- org.vamsas.objects.core.User getUser(int) 
+
+    /**
+     * Method getUser
+     * 
+     * 
+     * 
+     * @return User
+     */
+    public org.vamsas.objects.core.User[] getUser()
+    {
+        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.User) _userList.elementAt(index);
+        }
+        return mArray;
+    } //-- org.vamsas.objects.core.User[] getUser() 
+
+    /**
+     * Method getUserCount
+     * 
+     * 
+     * 
+     * @return int
+     */
+    public int getUserCount()
+    {
+        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
@@ -142,14 +396,154 @@ implements java.io.Serializable
     } //-- void marshal(org.xml.sax.ContentHandler) 
 
     /**
-     * Sets the value of field 'application'.
+     * Method removeAllInstance
+     * 
+     */
+    public void removeAllInstance()
+    {
+        _instanceList.removeAllElements();
+    } //-- void removeAllInstance() 
+
+    /**
+     * Method removeAllUser
+     * 
+     */
+    public void removeAllUser()
+    {
+        _userList.removeAllElements();
+    } //-- void removeAllUser() 
+
+    /**
+     * Method removeInstance
+     * 
+     * 
+     * 
+     * @param index
+     * @return Instance
+     */
+    public org.vamsas.objects.core.Instance removeInstance(int index)
+    {
+        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 removeUser
+     * 
+     * 
+     * 
+     * @param index
+     * @return User
+     */
+    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 > _instanceList.size())) {
+            throw new IndexOutOfBoundsException("setInstance: Index value '"+index+"' not in range [0.."+_instanceList.size()+ "]");
+        }
+        _instanceList.setElementAt(vInstance, index);
+    } //-- void setInstance(int, org.vamsas.objects.core.Instance) 
+
+    /**
+     * Method setInstance
+     * 
+     * 
+     * 
+     * @param instanceArray
+     */
+    public void setInstance(org.vamsas.objects.core.Instance[] instanceArray)
+    {
+        //-- copy array
+        _instanceList.removeAllElements();
+        for (int i = 0; i < instanceArray.length; i++) {
+            _instanceList.addElement(instanceArray[i]);
+        }
+    } //-- 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 application the value of field 'application'.
+     * @param version the value of field 'version'.
      */
-    public void setApplication(org.vamsas.objects.core.Application application)
+    public void setVersion(java.lang.String version)
     {
-        this._application = application;
-    } //-- void setApplication(org.vamsas.objects.core.Application) 
+        this._version = version;
+    } //-- void setVersion(java.lang.String) 
 
     /**
      * Method unmarshal
@@ -157,13 +551,13 @@ implements java.io.Serializable
      * 
      * 
      * @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