Class SubnodeList

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    SegmentedSubnodeList

    public class SubnodeList
    extends java.lang.Object
    implements java.io.Serializable
    Container implementation for subnode collections.
    See Also:
    Serialized Form
    • Field Detail

      • node

        protected Node node
      • list

        protected java.util.List list
      • lastSubnodeFetch

        protected transient long lastSubnodeFetch
      • lastSubnodeChange

        protected transient long lastSubnodeChange
    • Constructor Detail

      • SubnodeList

        public SubnodeList​(Node node)
        Creates a new subnode list
        Parameters:
        node - the node we belong to
    • Method Detail

      • add

        public boolean add​(NodeHandle handle)
        Adds the specified object to this list performing custom ordering
        Parameters:
        handle - element to be inserted.
      • add

        public void add​(int idx,
                        NodeHandle handle)
        Adds the specified object to the list at the given position
        Parameters:
        idx - the index to insert the element at
        handle - the object to add
      • getNode

        public Node getNode​(int index)
      • contains

        public boolean contains​(java.lang.Object object)
      • indexOf

        public int indexOf​(java.lang.Object object)
      • remove

        public java.lang.Object remove​(int idx)
        remove the object specified by the given index-position
        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
        Parameters:
        obj - the NodeHandle to remove
      • toArray

        public java.lang.Object[] toArray()
      • size

        public int size()
        Return the size of the list.
        Returns:
        the list size
      • update

        protected void update()
      • prefetch

        protected void prefetch​(int start,
                                int length)
      • getLastSubnodeChange

        protected long getLastSubnodeChange()
        Compute a serial number indicating the last change in subnode collection
        Returns:
        a serial number that increases with each subnode change
      • markAsChanged

        protected void markAsChanged()
      • hasRelationalNodes

        protected boolean hasRelationalNodes()
      • getSubnodeMapping

        protected DbMapping getSubnodeMapping()
      • getSubnodeRelation

        protected Relation getSubnodeRelation()