autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / ApplicationData.java
index bb0c99e..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;
@@ -36,19 +38,31 @@ implements java.io.Serializable
     //--------------------------/
 
     /**
-     * Field _version
+     * Version string describing the application specific data
+     * storage version used
      */
     private java.lang.String _version;
 
     /**
-     * Field _name
+     * Canonical name of application
+     *  
      */
     private java.lang.String _name;
 
     /**
-     * Field _urn
+     * Field _userList
      */
-    private java.lang.String _urn;
+    private java.util.Vector _userList;
+
+    /**
+     * Field _common
+     */
+    private org.vamsas.objects.core.Common _common;
+
+    /**
+     * Field _instanceList
+     */
+    private java.util.Vector _instanceList;
 
 
       //----------------/
@@ -58,6 +72,8 @@ implements java.io.Serializable
     public ApplicationData() 
      {
         super();
+        _userList = new Vector();
+        _instanceList = new Vector();
     } //-- org.vamsas.objects.core.ApplicationData()
 
 
@@ -66,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
@@ -96,12 +190,26 @@ implements java.io.Serializable
             }
             else if (temp._name != null)
                 return false;
-            if (this._urn != null) {
-                if (temp._urn == null) return false;
-                else if (!(this._urn.equals(temp._urn))) 
+            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._urn != 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;
         }
@@ -109,7 +217,68 @@ implements java.io.Serializable
     } //-- boolean equals(java.lang.Object) 
 
     /**
-     * Returns the value of field 'name'.
+     * 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'.
@@ -120,18 +289,57 @@ implements java.io.Serializable
     } //-- java.lang.String getName() 
 
     /**
-     * Returns the value of field 'urn'.
+     * Method getUser
      * 
-     * @return String
-     * @return the value of field 'urn'.
+     * 
+     * 
+     * @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 java.lang.String getUrn()
+    public int getUserCount()
     {
-        return this._urn;
-    } //-- java.lang.String getUrn() 
+        return _userList.size();
+    } //-- int getUserCount() 
 
     /**
-     * Returns the value of field 'version'.
+     * 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'.
@@ -188,7 +396,101 @@ implements java.io.Serializable
     } //-- void marshal(org.xml.sax.ContentHandler) 
 
     /**
-     * Sets the value of field 'name'.
+     * 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'.
      */
@@ -198,17 +500,43 @@ implements java.io.Serializable
     } //-- void setName(java.lang.String) 
 
     /**
-     * Sets the value of field 'urn'.
+     * Method setUser
+     * 
+     * 
      * 
-     * @param urn the value of field 'urn'.
+     * @param index
+     * @param vUser
      */
-    public void setUrn(java.lang.String urn)
+    public void setUser(int index, org.vamsas.objects.core.User vUser)
+        throws java.lang.IndexOutOfBoundsException
     {
-        this._urn = urn;
-    } //-- void setUrn(java.lang.String) 
+        //-- 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'.
+     * 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'.
      */