## helma.objectmodel.db
Class UpdateableSubnodeList

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              java.util.ArrayList
                  helma.objectmodel.db.SubnodeList
                      helma.objectmodel.db.OrderedSubnodeList
                          helma.objectmodel.db.UpdateableSubnodeList

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

    public class UpdateableSubnodeList

extends OrderedSubnodeList

See Also:
  Serialized Form

Field Summary

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`UpdateableSubnodeList(WrappedNodeManager nmgr, Relation rel)` Construct a new UpdateableSubnodeList.

Method Summary
`void` `add(int idx, java.lang.Object obj)` add a new node at the given index position and check if the borders for the updateCriterias have changed NOTE: this overrules the ordering (should we disallowe this?)
`boolean` `add(java.lang.Object obj)` add a new node honoring the Nodes SQL-Order and check if the borders for the updateCriterias have changed by adding this node
`boolean` `addAll(java.util.Collection col)` if the wrapped List is an instance of OrderedSubnodeList, the sortIn() method will be used.
`java.lang.String` `getUpdateCriteria()` render the criterias for fetching new nodes, which have been added to the relational db.
`void` `rebuildBorders()` Rebuild all borders for all the updateCriterias
`java.lang.Object` `remove(int idx)` remove the object specified by the given index-position and update the borders if neccesary
`boolean` `remove(java.lang.Object obj)` remove the given Object from this List and update the borders if neccesary
`boolean` `removeAll(java.util.Collection c)` remove all elements conteined inside the specified collection from this List and update the borders if neccesary
`boolean` `retainAll(java.util.Collection c)` remove all elements from this List, which are NOT specified inside the specified Collecion and update the borders if neccesary
`java.lang.Object` `set(int idx, java.lang.Object obj)` checks if the borders have to be rebuilt because of the removed or the added NodeHandle.

Methods inherited from class helma.objectmodel.db.OrderedSubnodeList
`addSorted, compareNumericString, getOrderedView, sortIn, sortIn`

Methods inherited from class helma.objectmodel.db.SubnodeList
`addToViews, removeFromViews`

Methods inherited from class java.util.ArrayList
`addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, removeRange, size, toArray, toArray, trimToSize`

Methods inherited from class java.util.AbstractList
`equals, hashCode, iterator, listIterator, listIterator, subList`

Methods inherited from class java.util.AbstractCollection
`containsAll, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`containsAll, equals, hashCode, iterator, listIterator, listIterator, subList`

Constructor Detail

### UpdateableSubnodeList

    public UpdateableSubnodeList(WrappedNodeManager nmgr,
                                 Relation rel)

  Construct a new UpdateableSubnodeList. The Relation is needed to get the information about the ORDERING and the UPDATECriteriaS

Method Detail

### getUpdateCriteria

    public java.lang.String getUpdateCriteria()
                                       throws java.sql.SQLException,
                                              java.lang.ClassNotFoundException

  render the criterias for fetching new nodes, which have been added to the relational db.

  Returns:
    the sql-criteria for updating this subnodelist
  Throws:
    `java.lang.ClassNotFoundException` - @see helma.objectmodel.db.DbMapping#getColumn(String)
    `java.sql.SQLException` - @see helma.objectmodel.db.DbMapping#getColumn @see helma.objectmodel.db.DbMapping#needsQuotes(String)

### add

    public boolean add(java.lang.Object obj)

  add a new node honoring the Nodes SQL-Order and check if the borders for the updateCriterias have changed by adding this node

  Specified by:
    `add` in interface `java.util.Collection`
  Specified by:
    `add` in interface `java.util.List`
  Overrides:
    `add` in class `OrderedSubnodeList`
  Parameters:
    `obj` - the object to add

### add

    public void add(int idx,
                    java.lang.Object obj)

  add a new node at the given index position and check if the borders for the updateCriterias have changed NOTE: this overrules the ordering (should we disallowe this?)

  Specified by:
    `add` in interface `java.util.List`
  Overrides:
    `add` in class `OrderedSubnodeList`
  Parameters:
    `idx` - the index-position this node should be added at
    `obj` - the NodeHandle of the node which should be added

### rebuildBorders

    public void rebuildBorders()

  Rebuild all borders for all the updateCriterias

### remove

    public java.lang.Object remove(int idx)

  remove the object specified by the given index-position and update the borders if neccesary

  Specified by:
    `remove` in interface `java.util.List`
  Overrides:
    `remove` in class `SubnodeList`
  Parameters:
    `idx` - the index-position of the NodeHandle to remove

### remove

    public boolean remove(java.lang.Object obj)

  remove the given Object from this List and update the borders if neccesary

  Specified by:
    `remove` in interface `java.util.Collection`
  Specified by:
    `remove` in interface `java.util.List`
  Overrides:
    `remove` in class `SubnodeList`
  Parameters:
    `obj` - the NodeHandle to remove

### removeAll

    public boolean removeAll(java.util.Collection c)

  remove all elements conteined inside the specified collection from this List and update the borders if neccesary

  Specified by:
    `removeAll` in interface `java.util.Collection`
  Specified by:
    `removeAll` in interface `java.util.List`
  Overrides:
    `removeAll` in class `OrderedSubnodeList`
  Parameters:
    `c` - the Collection containing all Objects to remove from this List
  Returns:
    true if the List has been modified

### retainAll

    public boolean retainAll(java.util.Collection c)

  remove all elements from this List, which are NOT specified inside the specified Collecion and update the borders if neccesary

  Specified by:
    `retainAll` in interface `java.util.Collection`
  Specified by:
    `retainAll` in interface `java.util.List`
  Overrides:
    `retainAll` in class `OrderedSubnodeList`
  Parameters:
    `c` - the Collection containing all Objects to keep on the List
  Returns:
    true if the List has been modified

### set

    public java.lang.Object set(int idx,
                                java.lang.Object obj)

  checks if the borders have to be rebuilt because of the removed or the added NodeHandle.

  Specified by:
    `set` in interface `java.util.List`
  Overrides:
    `set` in class `java.util.ArrayList`

### addAll

    public boolean addAll(java.util.Collection col)

  if the wrapped List is an instance of OrderedSubnodeList, the sortIn() method will be used.

  Specified by:
    `addAll` in interface `java.util.Collection`
  Specified by:
    `addAll` in interface `java.util.List`
  Overrides:
    `addAll` in class `OrderedSubnodeList`

Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.