|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ListContainer<V>
Represents a container of persistent objects in the store Acts as a map, but values can be retrieved in insertion order
Method Summary | |
---|---|
void |
addFirst(V o)
Inserts the given element at the beginning of this list. |
void |
addLast(V o)
Appends the given element to the end of this list. |
boolean |
doRemove(int position)
remove an objecr from the list without retrieving the old value from the store |
V |
get(StoreEntry entry)
Retrieve an Object from the Store by its location |
StoreEntry |
getFirst()
Get the StoreEntry for the first item of the list |
Object |
getId()
|
StoreEntry |
getLast()
Get the StoreEntry for the last item of the list |
StoreEntry |
getNext(StoreEntry entry)
Get the next StoreEntry from the list |
StoreEntry |
getPrevious(StoreEntry entry)
Get the previous StoreEntry from the list |
boolean |
isLoaded()
|
void |
load()
The container is created or retrieved in an unloaded state. |
StoreEntry |
placeFirst(V object)
insert an Object in first position int the list but get a StoreEntry of its position |
StoreEntry |
placeLast(V object)
add an Object to the list but get a StoreEntry of its position |
StoreEntry |
refresh(StoreEntry entry)
It's possible that a StoreEntry could be come stale this will return an upto date entry for the StoreEntry position |
boolean |
remove(StoreEntry entry)
remove the Object at the StoreEntry |
V |
removeFirst()
Removes and returns the first element from this list. |
V |
removeLast()
Removes and returns the last element from this list. |
void |
setMarshaller(Marshaller marshaller)
For homogenous containers can set a custom marshaller for loading values The default uses Object serialization |
int |
size()
|
void |
unload()
unload indexes from the container |
void |
update(StoreEntry entry,
V object)
Advanced feature = must ensure the object written doesn't overwrite other objects in the container |
Methods inherited from interface java.util.List |
---|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
Method Detail |
---|
void load()
void unload()
boolean isLoaded()
void setMarshaller(Marshaller marshaller)
marshaller
- Object getId()
int size()
size
in interface Collection<V>
size
in interface List<V>
void addFirst(V o)
o
- the element to be inserted at the beginning of this list.void addLast(V o)
o
- the element to be inserted at the end of this list.V removeFirst()
NoSuchElementException
- if this list is empty.V removeLast()
NoSuchElementException
- if this list is empty.boolean doRemove(int position)
position
-
StoreEntry placeLast(V object)
object
-
StoreEntry placeFirst(V object)
object
-
void update(StoreEntry entry, V object)
entry
- object
- V get(StoreEntry entry)
entry
-
StoreEntry getFirst()
StoreEntry getLast()
StoreEntry getNext(StoreEntry entry)
entry
-
StoreEntry getPrevious(StoreEntry entry)
entry
-
boolean remove(StoreEntry entry)
entry
-
StoreEntry refresh(StoreEntry entry)
entry
- old entry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |