Class AssociationList

java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
com.sas.metadata.remote.AssociationList
All Implemented Interfaces:
MetadataState, Serializable, Cloneable, Iterable, Collection, List, SequencedCollection

@SASScope("ALL") public class AssociationList extends AbstractList implements MetadataState, Serializable, Cloneable
Extension of List to manage associations between objects.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected MdObjectList
    This is the object used for list interactions internally.
    protected int
    The number of times this list has been structurally modified.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AssociationList(String strAssociationName)
    Constructs an empty List so that its internal data array has size 10 and its standard capacity increment is zero.
    AssociationList(String strAssociationName, boolean remoteEnvironment)
    Constructs an empty List so that its internal data array has size 10 and its standard capacity increment is zero.
    AssociationList(String strAssociationName, int initialCapacity)
    Constructs an empty List with the specified initial capacity and with its capacity increment equal to zero.
    AssociationList(String strAssociationName, int initialCapacity, boolean remoteEnvironment)
    Constructs an empty List with the specified initial capacity and with its capacity increment equal to zero.
    AssociationList(String strAssociationName, int initialCapacity, int capacityIncrement)
    Deprecated.
    this constructor is no longer supported
    AssociationList(String strAssociationName, Object obj)
    Constructs an empty List so that its internal data array has size 10 and its standard capacity increment is zero.
    AssociationList(String strAssociationType, String strAssociationName, boolean isPredAssoc, String properties, CMetadata parentObj)
    Constructs an empty AssociationList with capacity 10 and the properties set accordingly.
    AssociationList(String strAssociationName, Collection<CMetadata> c)
    Constructs a List containing the elements of the specified collection, in the order they are returned by the collection's iterator.
    AssociationList(String strAssociationName, Collection<CMetadata> c, CMetadata parentObj)
    Constructs a List containing the elements of the specified collection, in the order they are returned by the collection's iterator.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int index, Object element)
    Inserts the specified element at the specified position in this List.
    boolean
    add(Object obj)
    Appends the specified element to the end of this List.
    protected boolean
    add(Object obj, int state)
    Deprecated.
    REMOVED FROM API
    protected boolean
    add(Object obj, int state, boolean processOtherSideOfAssn)
    Deprecated.
    REMOVED FROM API.
    boolean
    addAll(int index, Collection c)
    Inserts all of the elements in in the specified Collection into this List at the specified position.
    boolean
    addAll(Collection c)
    Appends all of the elements in the specified Collection to the end of this List, in the order that they are returned by the specified Collection's Iterator.
    void
    addElement(Object obj)
    Adds the specified component to the end of this List, increasing its size by one.
    boolean
    contains(Object obj)
    Tests if the specified object is a component in this List.
    boolean
    containsAll(Collection c)
    Returns true if this List contains all of the elements in the specified Collection.
    void
    copyInto(Object[] anArray)
    Copies the components of this List into the specified array.
    void
    Clears object and all memory used by object.
    Object
    elementAt(int index)
    Returns the component at the specified index.
    Enumeration
    Returns an enumeration of the components of this List.
    void
    ensureCapacity(int minCapacity)
    Increases the capacity of this List, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.
    Object
    Returns the first component (the item at index 0) of this List.
    void
    Use this to empty out the list in preperation for deleting it
    String
    generateAssociationAllXML(boolean fRequired, String callingObjectID)
    Create the XML string for this association list object
    String
    generateAssociationWriteXML(boolean fRequired, String callingObjectID)
    Create the XML string for this association list object
    String
    generateAssociationXML(boolean fRequired, String callingObjectID)
    Create the XML string for this association list object
    String
    Generates a replacement XML String that is empty.
    String
    Generates Function=Remove XML for this list
    Object
    get(int index)
    Returns the element at the specified position in this List.
    String
    Gets the association Name
    String
    Gets the associationType of this association
    List<String>
    Returns the deleted items or null if no deleted items.
    MdObjectList
     
    boolean
    Gets whether this is the pred side of the association or not
    boolean
    Is this association required for add.
    String
    Get min cardinality for this association
    String
    Get min cardinality for this association
    protected Object
    getObjectforID(String ID)
    Deprecated.
    REMOVED FROM API
    protected Object
    getObjectforID(String ID, boolean hashOnly)
    Deprecated.
    REMOVED FROM API
    Vector<String>
    Returns the List of object ids in this list.
    protected AssociationList
    getOppositeAssn(String otherID)
    Deprecated.
    REMOVED FROM API.
    Returns the parent object of this associationlist.
    String
     
    int
    Returns a flag that tells if the user has added or removed items.
    int
    Returns the hash code value for this List.
    int
    indexOf(Object elem)
    Searches for the first occurence of the given argument, testing for equality using the equals method.
    int
    indexOf(Object elem, int index)
    Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
    void
    insertElementAt(Object obj, int index)
    Inserts the specified object as a component in this List at the specified index.
    void
    insertElementAt(Object obj, int index, boolean objectModified)
    Inserts the specified object as a component in this List at the specified index.
    boolean
    Tests if this List has no components.
    boolean
    Returns whether or not to go to the server to populate an association.
    Iterator
    Returns an iterator over the elements in this list in proper sequence.
    Object
    Returns the last component of the List.
    int
    lastIndexOf(Object elem)
    Returns the index of the last occurrence of the specified object in this List.
    int
    lastIndexOf(Object elem, int index)
    Searches backwards for the specified object, starting from the specified index, and returns an index to it.
    ListIterator
    Returns an iterator of the elements in this list (in proper sequence).
    ListIterator
    listIterator(int index)
    Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
    Object
    remove(int index)
    Removes the element at the specified position in this List.
    boolean
    remove(Object o)
    Removes the first occurrence of the specified element in this List If the List does not contain the element, it is unchanged.
    boolean
    removeAll(Collection c)
    Removes from this List all of its elements that are contained in the specified Collection.
    void
    Removes all components from this List and sets its size to zero.
    void
    removeAllElements(boolean objectChanged)
    Removes all components from this List and sets its size to zero.
    boolean
    removeElement(Object obj)
    Removes the first (lowest-indexed) occurrence of the argument from this List.
    boolean
    removeElement(Object obj, boolean processOtherSide)
    Removes the first (lowest-indexed) occurrence of the argument from this List.
    void
    removeElementAt(int index)
    Deletes the component at the specified index.
    protected void
    removeOppositeAssn(String otherID)
    Deprecated.
    REMOVED FROM API.
    protected void
    removeRange(int fromIndex, int toIndex)
    Deprecated.
    REMOVED FROM API
    void
    resetState(int iValue)
    Removes the value from the existing state.
    void
    resetState(int iValue, boolean forceState)
    Removes the value from the existing state.
    boolean
    retainAll(Collection c)
    Retains only the elements in this List that are contained in the specified Collection.
    Object
    set(int index, Object obj)
    Replaces the element at the specified position in this List with the specified element.
    void
    setAssociationType(String type)
    Sets the associationType of this association
    void
    setElementAt(Object obj, int index)
    Sets the component at the specified index of this List to be the specified object.
    void
    setIsPredAssoc(boolean ispred)
    Sets whether this is the pred side of the association or not.
    void
    setObjectIDs(List<String> newIds)
    Sets the current list to be the new list.
    protected void
    setOppositeAssn(String otherID)
    Deprecated.
    REMOVED FROM API.
    void
    setParent(CMetadata inParent)
    Sets the parent object of this associationList.
    void
    setProperties(String inProperties)
    Sets the properties of this association.
    void
    setSize(int newSize)
    Sets the size of this List.
    void
    setState(int iValue)
    ORs the value with the existing state.
    void
    setState(int iValue, boolean AddToChangeIfChanged)
    ORs the value with the existing state. depending on existing state and passed in value.
    int
    Returns the number of components in this List.
    List<CMetadata>
    subList(int fromIndex, int toIndex)
    Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
    Object[]
    Returns an array containing all of the elements in this List in the correct order.
    Object[]
    toArray(Object[] a)
    Returns an array containing all of the elements in this List in the correct order.
    String
    Returns a string representation of this collection.
    void
    Trims the capacity of this List to be the List's current size.
    void
    updateObjectID(String strOldId, String strNewId)
    Change the hash key associated with an object, and notify listeners
    void
    Updates the opposite side assn for all object currently in list

    Methods inherited from class java.util.AbstractList

    equals

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    parallelStream, removeIf, stream, toArray

    Methods inherited from interface java.lang.Iterable

    forEach

    Methods inherited from interface java.util.List

    addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
  • Field Details

    • modCount

      protected transient int modCount
      The number of times this list has been structurally modified. Structural modifications are those that change the size of the list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.

      This field is used by the iterator and list iterator implementation returned by the iterator and listIterator methods. If the value of this field changes unexpectedly, the iterator (or list iterator) will throw a ConcurrentModificationException in response to the next, remove, previous, set or add operations. This provides fail-fast behavior, rather than non-deterministic behavior in the face of concurrent modification during iteration.

      Use of this field by subclasses is optional. If a subclass wishes to provide fail-fast iterators (and list iterators), then it merely has to increment this field in its add(int, Object) and remove(int) methods (and any other methods that it overrides that result in structural modifications to the list). A single call to add(int, Object) or remove(int) must add no more than one to this field, or the iterators (and list iterators) will throw bogus ConcurrentModificationExceptions. If an implementation does not wish to provide fail-fast iterators, this field may be ignored.

    • list_object

      protected MdObjectList list_object
      This is the object used for list interactions internally.
  • Constructor Details

    • AssociationList

      public AssociationList(String strAssociationName, int initialCapacity, int capacityIncrement)
      Deprecated.
      this constructor is no longer supported
      Constructs an empty List with the specified initial capacity and capacity increment.
      Parameters:
      initialCapacity - the initial capacity of the List.
      capacityIncrement - the amount by which the capacity is increased when the List overflows.
      Throws:
      IllegalArgumentException - if the specified initial capacity is negative
    • AssociationList

      public AssociationList(String strAssociationName)
      Constructs an empty List so that its internal data array has size 10 and its standard capacity increment is zero.
      Parameters:
      strAssociationName - name of the associaiton
    • AssociationList

      public AssociationList(String strAssociationName, int initialCapacity)
      Constructs an empty List with the specified initial capacity and with its capacity increment equal to zero.
      Parameters:
      strAssociationName - the name of the association
      initialCapacity - the initial capacity of the List.
      Throws:
      IllegalArgumentException - if the specified initial capacity is negative
    • AssociationList

      public AssociationList(String strAssociationName, int initialCapacity, boolean remoteEnvironment)
      Constructs an empty List with the specified initial capacity and with its capacity increment equal to zero.
      Parameters:
      strAssociationName - the name of the association
      initialCapacity - the initial capacity of the List.
      remoteEnvironment - true if the client is in a remote environment
      Throws:
      IllegalArgumentException - if the specified initial capacity is negative
    • AssociationList

      public AssociationList(String strAssociationName, boolean remoteEnvironment)
      Constructs an empty List so that its internal data array has size 10 and its standard capacity increment is zero.
      Parameters:
      strAssociationName - name of the associaiton
      remoteEnvironment - true if the client is in a remote environment
    • AssociationList

      public AssociationList(String strAssociationType, String strAssociationName, boolean isPredAssoc, String properties, CMetadata parentObj)
      Constructs an empty AssociationList with capacity 10 and the properties set accordingly.
      Parameters:
      strAssociationType - The type of association this is "Column-Table"
      strAssociationName - The name of the association, Columns
      isPredAssoc - is this a predicate side of the association.
      properties - The properties of this association.
      parentObj - The object this association belongs to.
    • AssociationList

      public AssociationList(String strAssociationName, Object obj)
      Constructs an empty List so that its internal data array has size 10 and its standard capacity increment is zero.
      Parameters:
      strAssociationName - String
      obj - Object
    • AssociationList

      public AssociationList(String strAssociationName, Collection<CMetadata> c)
      Constructs a List containing the elements of the specified collection, in the order they are returned by the collection's iterator.
      Parameters:
      strAssociationName - The name of the association. For instance "Columns".
      c - the collection whose elements are to be placed into this List.
      Since:
      1.2
    • AssociationList

      public AssociationList(String strAssociationName, Collection<CMetadata> c, CMetadata parentObj)
      Constructs a List containing the elements of the specified collection, in the order they are returned by the collection's iterator.
      Parameters:
      strAssociationName - The name of the association. For instance "Columns".
      c - the collection whose elements are to be placed into this List.
      parentObj - The object this association belongs to.
      Since:
      1.2
  • Method Details

    • generateAssociationXML

      public String generateAssociationXML(boolean fRequired, String callingObjectID)
      Create the XML string for this association list object
    • generateAssociationAllXML

      public String generateAssociationAllXML(boolean fRequired, String callingObjectID)
      Create the XML string for this association list object
    • generateEmptyReplaceXML

      public String generateEmptyReplaceXML()
      Generates a replacement XML String that is empty.
    • generateAssociationWriteXML

      public String generateAssociationWriteXML(boolean fRequired, String callingObjectID)
      Create the XML string for this association list object
      Parameters:
      fRequired - Is this association required for add.
      callingObjectID - the ID of the object calling this method.
    • generateObjectAndAssociationRemoveXML

      public String generateObjectAndAssociationRemoveXML()
      Generates Function=Remove XML for this list
    • updateObjectID

      public void updateObjectID(String strOldId, String strNewId)
      Change the hash key associated with an object, and notify listeners
      Parameters:
      strOldId - String
      strNewId - String
    • removeOppositeAssn

      protected void removeOppositeAssn(String otherID) throws MdException, RemoteException
      Deprecated.
      REMOVED FROM API.
      Remove the parent object for the associationList on the other side of this association.
      Parameters:
      otherID - The object to get the associationList from.
      Throws:
      MdException
      RemoteException
    • updateOppositeSideAssn

      public void updateOppositeSideAssn()
      Updates the opposite side assn for all object currently in list
    • setOppositeAssn

      protected void setOppositeAssn(String otherID) throws MdException, RemoteException
      Deprecated.
      REMOVED FROM API.
      Sets the opposite side of the association.
      Throws:
      MdException
      RemoteException
    • getOppositeAssn

      protected AssociationList getOppositeAssn(String otherID) throws MdException, RemoteException
      Deprecated.
      REMOVED FROM API.
      Sets the opposite side of the association.
      Throws:
      MdException
      RemoteException
    • getObjectIDs

      public Vector<String> getObjectIDs()
      Returns the List of object ids in this list.
      Returns:
      List of object id strings.
    • setObjectIDs

      public void setObjectIDs(List<String> newIds)
      Sets the current list to be the new list.
      Parameters:
      newIds - Vector
    • getParent

      public CMetadata getParent()
      Returns the parent object of this associationlist.
      Returns:
      parent
    • setParent

      public void setParent(CMetadata inParent)
      Sets the parent object of this associationList.
      Parameters:
      inParent - CMetadata
    • setProperties

      public void setProperties(String inProperties)
      Sets the properties of this association. This is a string of the form:
      "010101"
      Parameters:
      inProperties - String
    • getProperties

      public String getProperties()
    • getAssociationName

      public String getAssociationName()
      Gets the association Name
    • getAssociationType

      public String getAssociationType()
      Gets the associationType of this association
      Returns:
      String
    • setAssociationType

      public void setAssociationType(String type)
      Sets the associationType of this association
      Parameters:
      type - String
    • setIsPredAssoc

      public void setIsPredAssoc(boolean ispred)
      Sets whether this is the pred side of the association or not.
      Parameters:
      ispred - boolean
    • getIsPredAssoc

      public boolean getIsPredAssoc()
      Gets whether this is the pred side of the association or not
      Returns:
      boolean
    • getMinCardinality

      public String getMinCardinality()
      Get min cardinality for this association
    • getMaxCardinality

      public String getMaxCardinality()
      Get min cardinality for this association
    • getIsRequired

      public boolean getIsRequired()
      Is this association required for add.
    • getDeletedItems

      public List<String> getDeletedItems()
      Returns the deleted items or null if no deleted items.
    • getState

      public int getState()
      Returns a flag that tells if the user has added or removed items.
    • setState

      public void setState(int iValue)
      ORs the value with the existing state.
    • setState

      public void setState(int iValue, boolean AddToChangeIfChanged)
      ORs the value with the existing state. depending on existing state and passed in value.
      Parameters:
      iValue - new value to set state for.
      AddToChangeIfChanged - if true, add item to change list to be processed for write logic.
    • resetState

      public void resetState(int iValue)
      Removes the value from the existing state.
    • resetState

      public void resetState(int iValue, boolean forceState)
      Removes the value from the existing state.
      Parameters:
      iValue - The value to set to, or to remove depending on forceState flag
      forceState - if true, force list state to be iValue, otherwise remove iValue from state.
    • isGoToServerForAssoc

      public boolean isGoToServerForAssoc()
      Returns whether or not to go to the server to populate an association.
      Returns:
      boolean
    • setSize

      public void setSize(int newSize)
      Sets the size of this List. If the new size is greater than the current size, new null items are added to the end of the List. If the new size is less than the current size, all components at index newSize and greater are discarded.
      Parameters:
      newSize - the new size of this List.
      Throws:
      ArrayIndexOutOfBoundsException - if new size is negative.
    • setElementAt

      public void setElementAt(Object obj, int index)
      Sets the component at the specified index of this List to be the specified object. The previous component at that position is discarded.

      The index must be a value greater than or equal to 0 and less than the current size of the List.

      This method is identical in functionality to the set method (which is part of the List interface). Note that the set method reverses the order of the parameters, to more closely match array usage. Note also that the set method returns the old value that was stored at the specified position.

      Parameters:
      obj - what the component is to be set to.
      index - the specified index.
      Throws:
      ArrayIndexOutOfBoundsException - if the index was invalid.
      See Also:
    • removeElementAt

      public void removeElementAt(int index)
      Deletes the component at the specified index. Each component in this List with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously. The size of this List is decreased by 1.

      The index must be a value greater than or equal to 0 and less than the current size of the List.

      This method is identical in functionality to the remove method (which is part of the List interface). Note that the remove method returns the old value that was stored at the specified position.

      Parameters:
      index - the index of the object to remove.
      Throws:
      ArrayIndexOutOfBoundsException - if the index was invalid.
      See Also:
    • insertElementAt

      public void insertElementAt(Object obj, int index)
      Inserts the specified object as a component in this List at the specified index. Each component in this List with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

      The index must be a value greater than or equal to 0 and less than or equal to the current size of the List. (If the index is equal to the current size of the List, the new element is appended to the List.)

      This method is identical in functionality to the add(Object, int) method (which is part of the List interface). Note that the add method reverses the order of the parameters, to more closely match array usage.

      Parameters:
      obj - the component to insert.
      index - where to insert the new component.
      Throws:
      ArrayIndexOutOfBoundsException - if the index was invalid.
      See Also:
    • insertElementAt

      public void insertElementAt(Object obj, int index, boolean objectModified)
      Inserts the specified object as a component in this List at the specified index. Each component in this List with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

      The index must be a value greater than or equal to 0 and less than or equal to the current size of the List. (If the index is equal to the current size of the List, the new element is appended to the List.)

      This method is identical in functionality to the add(Object, int) method (which is part of the List interface). Note that the add method reverses the order of the parameters, to more closely match array usage.

      Parameters:
      obj - the component to insert.
      index - where to insert the new component.
      Throws:
      ArrayIndexOutOfBoundsException - if the index was invalid.
      See Also:
    • addElement

      public void addElement(Object obj)
      Adds the specified component to the end of this List, increasing its size by one. The capacity of this List is increased if its size becomes greater than its capacity.

      This method is identical in functionality to the add(Object) method (which is part of the List interface).

      Parameters:
      obj - the component to be added.
      See Also:
    • removeElement

      public boolean removeElement(Object obj)
      Removes the first (lowest-indexed) occurrence of the argument from this List. If the object is found in this List, each component in the List with an index greater or equal to the object's index is shifted downward to have an index one smaller than the value it had previously.

      This method is identical in functionality to the remove(Object) method (which is part of the List interface).

      Parameters:
      obj - the component to be removed.
      Returns:
      true if the argument was a component of this List; false otherwise.
      See Also:
      • List.remove(Object)
      • List
    • removeElement

      public boolean removeElement(Object obj, boolean processOtherSide)
      Removes the first (lowest-indexed) occurrence of the argument from this List. If the object is found in this List, each component in the List with an index greater or equal to the object's index is shifted downward to have an index one smaller than the value it had previously.

      This method is identical in functionality to the remove(Object) method (which is part of the List interface).

      Parameters:
      obj - the component to be removed.
      Returns:
      true if the argument was a component of this List; false otherwise.
      See Also:
      • List.remove(Object)
      • List
    • removeAllElements

      public void removeAllElements()
      Removes all components from this List and sets its size to zero.

      This method is identical in functionality to the clear method (which is part of the List interface).

      See Also:
    • removeAllElements

      public void removeAllElements(boolean objectChanged) throws MdException
      Removes all components from this List and sets its size to zero.

      This method is identical in functionality to the clear method (which is part of the List interface).

      Parameters:
      objectChanged - does this remove change the containing object
      Throws:
      MdException
      See Also:
    • set

      public Object set(int index, Object obj)
      Replaces the element at the specified position in this List with the specified element.
      Specified by:
      set in interface List
      Overrides:
      set in class AbstractList
      Parameters:
      index - index of element to replace.
      obj - object to be stored at the specified position.
      Returns:
      the element previously at the specified position.
      Throws:
      ArrayIndexOutOfBoundsException - index out of range (index < 0 || index >= size()).
      IllegalArgumentException - fromIndex > toIndex.
      Since:
      1.2
    • add

      protected boolean add(Object obj, int state)
      Deprecated.
      REMOVED FROM API
      Appends the specified element to the end of this List.
      Parameters:
      obj - element to be appended to this List.
      state - state
      Returns:
      true (as per the general contract of Collection.add).
      Since:
      1.2
    • add

      protected boolean add(Object obj, int state, boolean processOtherSideOfAssn)
      Deprecated.
      REMOVED FROM API.
      Appends the specified element to the end of this List.
      Parameters:
      obj - element to be appended to this List.
      state - state
      Returns:
      true (as per the general contract of Collection.add).
      Since:
      1.2
    • add

      public boolean add(Object obj)
      Appends the specified element to the end of this List.
      Specified by:
      add in interface Collection
      Specified by:
      add in interface List
      Overrides:
      add in class AbstractList
      Parameters:
      o - element to be appended to this List.
      Returns:
      true (as per the general contract of Collection.add).
      Since:
      1.2
    • remove

      public boolean remove(Object o)
      Removes the first occurrence of the specified element in this List If the List does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))) (if such an element exists).
      Specified by:
      remove in interface Collection
      Specified by:
      remove in interface List
      Overrides:
      remove in class AbstractCollection
      Parameters:
      o - element to be removed from this List, if present.
      Returns:
      true if the List contained the specified element.
      Since:
      1.2
    • add

      public void add(int index, Object element)
      Inserts the specified element at the specified position in this List. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
      Specified by:
      add in interface List
      Overrides:
      add in class AbstractList
      Parameters:
      index - index at which the specified element is to be inserted.
      element - element to be inserted.
      Throws:
      ArrayIndexOutOfBoundsException - index is out of range (index < 0 || index > size()).
      Since:
      1.2
    • remove

      public Object remove(int index)
      Removes the element at the specified position in this List. shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the List.
      Specified by:
      remove in interface List
      Overrides:
      remove in class AbstractList
      Parameters:
      index - the index of the element to removed.
      Throws:
      ArrayIndexOutOfBoundsException - index out of range (index < 0 || index >= size()).
      Since:
      1.2
    • getObjectforID

      protected Object getObjectforID(String ID)
      Deprecated.
      REMOVED FROM API
      Get the object for and ID
      Parameters:
      ID - The id to get the object for recursively in parent's store.
      Returns:
      the object that exists in owning objects store for ID.
    • getObjectforID

      protected Object getObjectforID(String ID, boolean hashOnly)
      Deprecated.
      REMOVED FROM API
      Get the object for and ID
      Parameters:
      ID - The id to get the object for recursively in parent's store.
      use - parents map of objects to look only...not recursive.
      Returns:
      the object that exists in owning objects store for ID.
    • addAll

      public boolean addAll(Collection c)
      Appends all of the elements in the specified Collection to the end of this List, in the order that they are returned by the specified Collection's Iterator. The behavior of this operation is undefined if the specified Collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this List, and this List is nonempty.)
      Specified by:
      addAll in interface Collection
      Specified by:
      addAll in interface List
      Overrides:
      addAll in class AbstractCollection
      Parameters:
      c - elements to be inserted into this List.
      Throws:
      ArrayIndexOutOfBoundsException - index out of range (index < 0 || index > size()).
      Since:
      1.2
    • removeAll

      public boolean removeAll(Collection c)
      Removes from this List all of its elements that are contained in the specified Collection.
      Specified by:
      removeAll in interface Collection
      Specified by:
      removeAll in interface List
      Overrides:
      removeAll in class AbstractCollection
      Returns:
      true if this List changed as a result of the call.
      Since:
      1.2
    • retainAll

      public boolean retainAll(Collection c)
      Retains only the elements in this List that are contained in the specified Collection. In other words, removes from this List all of its elements that are not contained in the specified Collection.
      Specified by:
      retainAll in interface Collection
      Specified by:
      retainAll in interface List
      Overrides:
      retainAll in class AbstractCollection
      Returns:
      true if this List changed as a result of the call.
      Since:
      1.2
    • addAll

      public boolean addAll(int index, Collection c)
      Inserts all of the elements in in the specified Collection into this List at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the List in the order that they are returned by the specified Collection's iterator.
      Specified by:
      addAll in interface List
      Overrides:
      addAll in class AbstractList
      Parameters:
      index - index at which to insert first element from the specified collection.
      c - elements to be inserted into this List.
      Throws:
      ArrayIndexOutOfBoundsException - index out of range (index < 0 || index > size()).
      Since:
      1.2
    • removeRange

      protected void removeRange(int fromIndex, int toIndex)
      Deprecated.
      REMOVED FROM API
      Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the ArrayList by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)
      Overrides:
      removeRange in class AbstractList
      Parameters:
      fromIndex - index of first element to be removed.
      toIndex - index after last element to be removed.
    • flushAll

      public void flushAll()
      Use this to empty out the list in preperation for deleting it
    • iterator

      public Iterator iterator()
      Returns an iterator over the elements in this list in proper sequence.

      This implementation returns a straightforward implementation of the iterator interface, relying on the backing list's size(), get(int), and remove(int) methods.

      Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method unless the list's remove(int) method is overridden.

      This implementation can be made to throw runtime exceptions in the face of concurrent modification, as described in the specification for the (protected) modCount field.

      Specified by:
      iterator in interface Collection
      Specified by:
      iterator in interface Iterable
      Specified by:
      iterator in interface List
      Overrides:
      iterator in class AbstractList
      Returns:
      an iterator over the elements in this list in proper sequence.
      See Also:
    • listIterator

      public ListIterator listIterator()
      Returns an iterator of the elements in this list (in proper sequence). This implementation returns listIterator(0).
      Specified by:
      listIterator in interface List
      Overrides:
      listIterator in class AbstractList
      Returns:
      an iterator of the elements in this list (in proper sequence).
      See Also:
    • listIterator

      public ListIterator listIterator(int index)
      Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list. The specified index indicates the first element that would be returned by an initial call to the next method. An initial call to the previous method would return the element with the specified index minus one.

      This implementation returns a straightforward implementation of the ListIterator interface that extends the implementation of the Iterator interface returned by the iterator() method. The ListIterator implementation relies on the backing list's get(int), set(int, Object), add(int, Object) and remove(int) methods.

      Note that the list iterator returned by this implementation will throw an UnsupportedOperationException in response to its remove, set and add methods unless the list's remove(int), set(int, Object), and add(int, Object) methods are overridden.

      This implementation can be made to throw runtime exceptions in the face of concurrent modification, as described in the specification for the (protected) modCount field.

      Specified by:
      listIterator in interface List
      Overrides:
      listIterator in class AbstractList
      Parameters:
      index - index of the first element to be returned from the list iterator (by a call to the next method).
      Returns:
      a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.
      Throws:
      IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).
      See Also:
    • contains

      public boolean contains(Object obj)
      Tests if the specified object is a component in this List.
      Specified by:
      contains in interface Collection
      Specified by:
      contains in interface List
      Overrides:
      contains in class AbstractCollection
      Parameters:
      elem - an object.
      Returns:
      true if and only if the specified object is the same as a component in this List, as determined by the equals method; false otherwise.
    • containsAll

      public boolean containsAll(Collection c)
      Returns true if this List contains all of the elements in the specified Collection.
      Specified by:
      containsAll in interface Collection
      Specified by:
      containsAll in interface List
      Overrides:
      containsAll in class AbstractCollection
      Returns:
      true if this List contains all of the elements in the specified collection.
    • copyInto

      public void copyInto(Object[] anArray)
      Copies the components of this List into the specified array. The item at index k in this List is copied into component k of anArray. The array must be big enough to hold all the objects in this List, else an IndexOutOfBoundsException is thrown.
      Parameters:
      anArray - the array into which the components get copied.
    • dispose

      public void dispose()
      Clears object and all memory used by object.
    • elementAt

      public Object elementAt(int index)
      Returns the component at the specified index.

      This method is identical in functionality to the get method (which is part of the List interface).

      Parameters:
      index - an index into this List.
      Returns:
      the component at the specified index.
      Throws:
      ArrayIndexOutOfBoundsException - if the index is negative or not less than the current size of this List object. given.
      See Also:
    • elements

      public Enumeration elements()
      Returns an enumeration of the components of this List. The returned Enumeration object will generate all items in this List. The first item generated is the item at index 0, then the item at index 1, and so on.
      Returns:
      an enumeration of the components of this List.
      See Also:
      • Enumeration
      • Iterator
    • ensureCapacity

      public void ensureCapacity(int minCapacity)
      Increases the capacity of this List, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.

      If the current capacity of this List is less than minCapacity, then its capacity is increased by replacing its internal data array, kept in the field elementData, with a larger one. The size of the new data array will be the old size plus capacityIncrement, unless the value of capacityIncrement is less than or equal to zero, in which case the new capacity will be twice the old capacity; but if this new size is still smaller than minCapacity, then the new capacity will be minCapacity.

      Parameters:
      minCapacity - the desired minimum capacity.
    • firstElement

      public Object firstElement()
      Returns the first component (the item at index 0) of this List.
      Returns:
      the first component of this List.
      Throws:
      NoSuchElementException - if this List has no components.
    • get

      public Object get(int index)
      Returns the element at the specified position in this List.
      Specified by:
      get in interface List
      Specified by:
      get in class AbstractList
      Parameters:
      index - index of element to return.
      Throws:
      ArrayIndexOutOfBoundsException - index is out of range (index < 0 || index >= size()).
      Since:
      1.2
    • hashCode

      public int hashCode()
      Returns the hash code value for this List.
      Specified by:
      hashCode in interface Collection
      Specified by:
      hashCode in interface List
      Overrides:
      hashCode in class AbstractList
    • indexOf

      public int indexOf(Object elem)
      Searches for the first occurence of the given argument, testing for equality using the equals method.
      Specified by:
      indexOf in interface List
      Overrides:
      indexOf in class AbstractList
      Parameters:
      elem - an object.
      Returns:
      the index of the first occurrence of the argument in this List, that is, the smallest value k such that elem.equals(elementData[k]) is true; returns -1 if the object is not found.
      See Also:
      • Object.equals(Object)
    • indexOf

      public int indexOf(Object elem, int index)
      Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
      Parameters:
      elem - an object.
      index - the non-negative index to start searching from.
      Returns:
      the index of the first occurrence of the object argument in this List at position index or later in the List, that is, the smallest value k such that elem.equals(elementData[k]) && (k >= index) is true; returns -1 if the object is not found. (Returns -1 if index >= the current size of this List.)
      Throws:
      IndexOutOfBoundsException - if index is negative.
      See Also:
      • Object.equals(Object)
    • isEmpty

      public boolean isEmpty()
      Tests if this List has no components.
      Specified by:
      isEmpty in interface Collection
      Specified by:
      isEmpty in interface List
      Overrides:
      isEmpty in class AbstractCollection
      Returns:
      true if and only if this List has no components, that is, its size is zero; false otherwise.
    • lastElement

      public Object lastElement()
      Returns the last component of the List.
      Returns:
      the last component of the List, i.e., the component at index size() - 1.
      Throws:
      NoSuchElementException - if this List is empty.
    • lastIndexOf

      public int lastIndexOf(Object elem)
      Returns the index of the last occurrence of the specified object in this List.
      Specified by:
      lastIndexOf in interface List
      Overrides:
      lastIndexOf in class AbstractList
      Parameters:
      elem - the desired component.
      Returns:
      the index of the last occurrence of the specified object in this List, that is, the largest value k such that elem.equals(elementData[k]) is true; returns -1 if the object is not found.
    • lastIndexOf

      public int lastIndexOf(Object elem, int index)
      Searches backwards for the specified object, starting from the specified index, and returns an index to it.
      Parameters:
      elem - the desired component.
      index - the index to start searching from.
      Returns:
      the index of the last occurrence of the specified object in this List at position less than or equal to index in the List, that is, the largest value k such that elem.equals(elementData[k]) && (k <= index) is true; -1 if the object is not found. (Returns -1 if index is negative.)
      Throws:
      IndexOutOfBoundsException - if index is greater than or equal to the current size of this List.
    • size

      public int size()
      Returns the number of components in this List.
      Specified by:
      size in interface Collection
      Specified by:
      size in interface List
      Specified by:
      size in class AbstractCollection
      Returns:
      the number of components in this List.
    • subList

      public List<CMetadata> subList(int fromIndex, int toIndex)
      Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and ToIndex are equal, the returned List is empty.) The returned List is backed by this List, so changes in the returned List are reflected in this List, and vice-versa. The returned List supports all of the optional List operations supported by this List.

      This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a List can be used as a range operation by operating on a subList view instead of a whole List. For example, the following idiom removes a range of elements from a List:

                  list.subList(from, to).clear();
       
      Similar idioms may be constructed for indexOf and lastIndexOf, and all of the algorithms in the Collections class can be applied to a subList.

      The semantics of the List returned by this method become undefined if the backing list (i.e., this List) is structurally modified in any way other than via the returned List. (Structural modifications are those that change the size of the List, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)

      Specified by:
      subList in interface List
      Overrides:
      subList in class AbstractList
      Parameters:
      fromIndex - low endpoint (inclusive) of the subList.
      toIndex - high endpoint (exclusive) of the subList.
      Returns:
      a view of the specified range within this List.
      Throws:
      IndexOutOfBoundsException - endpoint index value out of range (fromIndex < 0 || toIndex > size)
      IllegalArgumentException - endpoint indices out of order (fromIndex > toIndex)
    • toArray

      public Object[] toArray()
      Returns an array containing all of the elements in this List in the correct order.
      Specified by:
      toArray in interface Collection
      Specified by:
      toArray in interface List
      Overrides:
      toArray in class AbstractCollection
      Since:
      1.2
    • toArray

      public Object[] toArray(Object[] a)
      Returns an array containing all of the elements in this List in the correct order. The runtime type of the returned array is that of the specified array. If the List fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this List.

      If the List fits in the specified array with room to spare (i.e., the array has more elements than the List), the element in the array immediately following the end of the List is set to null. This is useful in determining the length of the List only if the caller knows that the List does not contain any null elements.

      Specified by:
      toArray in interface Collection
      Specified by:
      toArray in interface List
      Overrides:
      toArray in class AbstractCollection
      Parameters:
      a - the array into which the elements of the List are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
      Returns:
      an array containing the elements of the List.
      Throws:
      ArrayStoreException - the runtime type of a is not a supertype
      RuntimeException - is thrown if RemoteException is encountered(RemoteException is chained) of the runtime type of every element in this List.
    • toString

      public String toString()
      Returns a string representation of this collection. The string representation consists of a list of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String.valueOf(Object).

      This implementation creates an empty string buffer, appends a left square bracket, and iterates over the collection appending the string representation of each element in turn. After appending each element except the last, the string ", " is appended. Finally a right bracket is appended. A string is obtained from the string buffer, and returned.

      Overrides:
      toString in class AbstractCollection
      Returns:
      a string representation of this collection.
    • trimToSize

      public void trimToSize()
      Trims the capacity of this List to be the List's current size. If the capacity of this cector is larger than its current size, then the capacity is changed to equal the size by replacing its internal data array, kept in the field elementData, with a smaller one. An application can use this operation to minimize the storage of a List.
    • getInternalListObject

      public MdObjectList getInternalListObject()