org.datanucleus.store.scostore
Interface ListStore

All Superinterfaces:
CollectionStore, Store

public interface ListStore
extends CollectionStore

Interface representation of the backing store for a List. Takes the collection methods and extends them for lists.

Version:
$Revision: 1.5 $

Method Summary
 void add(StateManager ownerSM, java.lang.Object element, int index, int size)
          Method to add an element to the List.
 boolean addAll(StateManager ownerSM, java.util.Collection c, int index, int size)
          Method to add a collection of elements to the List.
 java.lang.Object get(StateManager ownerSM, int index)
          Method to retrieve an element from a position in the List.
 int indexOf(StateManager ownerSM, java.lang.Object element)
          Method to return the position of an element in the List.
 int lastIndexOf(StateManager ownerSM, java.lang.Object element)
          Method to return the last position of an element in the List.
 java.util.ListIterator listIterator(StateManager ownerSM)
          Accessor for a list iterator for the List.
 java.util.ListIterator listIterator(StateManager ownerSM, int index)
          Accessor for a list iterator for the List.
 java.lang.Object remove(StateManager ownerSM, int index, int size)
          Method to remove an element from the List.
 java.lang.Object set(StateManager ownerSM, int index, java.lang.Object element, boolean allowDependentField)
          Method to update an element at a position in the List.
 java.util.List subList(StateManager ownerSM, int from, int to)
          Accessor for a sublist of elements between from and to indices.
 
Methods inherited from interface org.datanucleus.store.scostore.CollectionStore
add, addAll, clear, contains, getElementType, hasOrderMapping, iterator, remove, removeAll, size, updateEmbeddedElement
 
Methods inherited from interface org.datanucleus.store.scostore.Store
getStoreManager
 

Method Detail

add

void add(StateManager ownerSM,
         java.lang.Object element,
         int index,
         int size)
Method to add an element to the List.

Parameters:
ownerSM - State Manager for the List.
element - Element to add
index - Position to add the element.
size - Current size of list (if known). -1 if not known

addAll

boolean addAll(StateManager ownerSM,
               java.util.Collection c,
               int index,
               int size)
Method to add a collection of elements to the List.

Parameters:
ownerSM - State Manager for the List.
c - Collection of elements to add
index - Position to add the elements.
size - Current size of the list (if known). -1 if not known
Returns:
Whether the elements were added ok

remove

java.lang.Object remove(StateManager ownerSM,
                        int index,
                        int size)
Method to remove an element from the List.

Parameters:
ownerSM - State Manager for the List.
index - Position to remove the element.
size - Current size of the list (if known). -1 if not known
Returns:
The element that was removed.

get

java.lang.Object get(StateManager ownerSM,
                     int index)
Method to retrieve an element from a position in the List.

Parameters:
ownerSM - State Manager for the List.
index - Position of the element.
Returns:
The element at that position.

set

java.lang.Object set(StateManager ownerSM,
                     int index,
                     java.lang.Object element,
                     boolean allowDependentField)
Method to update an element at a position in the List.

Parameters:
ownerSM - State Manager for the List.
index - Position of the element.
element - The element value
allowDependentField - Whether to enable dependent field during this operation
Returns:
The previous element at that position.

subList

java.util.List subList(StateManager ownerSM,
                       int from,
                       int to)
Accessor for a sublist of elements between from and to indices.

Parameters:
ownerSM - State Manager for the List.
from - Start position (inclusive)
to - End position (exclusive)
Returns:
List of elements in this range.

indexOf

int indexOf(StateManager ownerSM,
            java.lang.Object element)
Method to return the position of an element in the List.

Parameters:
ownerSM - State Manager for the List.
element - The element value
Returns:
The position of the element.

lastIndexOf

int lastIndexOf(StateManager ownerSM,
                java.lang.Object element)
Method to return the last position of an element in the List.

Parameters:
ownerSM - State Manager for the List.
element - The element value
Returns:
The last position of the element.

listIterator

java.util.ListIterator listIterator(StateManager ownerSM)
Accessor for a list iterator for the List.

Parameters:
ownerSM - State Manager for the List.
Returns:
List iterator for the List.

listIterator

java.util.ListIterator listIterator(StateManager ownerSM,
                                    int index)
Accessor for a list iterator for the List.

Parameters:
ownerSM - State Manager for the List.
index - start position of the iterator.
Returns:
List iterator for the List.


Copyright © 2009. All Rights Reserved.