- java.lang.Object
-
- swim.store.db.ListDataModel
-
- All Implemented Interfaces:
Iterable<Value>,Collection<Value>,List<Value>,ListData<Value>,STreeDelegate,TreeDelegate,DataBinding,ListDataBinding,KeyedList<Value>
public class ListDataModel extends Object implements ListDataBinding, STreeDelegate
-
-
Field Summary
Fields Modifier and Type Field Description protected ListDataContextdataContextprotected Valuenameprotected StoreBindingstoreBindingprotected STreeListtree
-
Constructor Summary
Constructors Constructor Description ListDataModel(Value name, STreeList tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, Value value)voidadd(int index, Value element, Object key)booleanadd(Value value)booleanadd(Value element, Object key)booleanaddAll(int index, Collection<? extends Value> values)booleanaddAll(Collection<? extends Value> values)voidclear()voidclose()booleancontains(Object value)booleancontainsAll(Collection<?> values)Databasedatabase()ListDataContextdataContext()longdataSize()voiddrop(int lower)ListIterator<Map.Entry<Object,Value>>entryIterator()Valueget(int index)Valueget(int index, Object key)Map.Entry<Object,Value>getEntry(int index)Map.Entry<Object,Value>getEntry(int index, Object key)intindexOf(Object value)booleanisEmpty()booleanisResident()ListDataModelisResident(boolean isResident)booleanisTransient()ListDataModelisTransient(boolean isTransient)Iterator<Value>iterator()ListIterator<Object>keyIterator()intlastIndexOf(Object value)ListIterator<Value>listIterator()ListIterator<Value>listIterator(int index)voidmove(int fromIndex, int toIndex)voidmove(int fromIndex, int toIndex, Object key)Valuename()Valueremove(int index)Valueremove(int index, Object key)booleanremove(Object value)booleanremoveAll(Collection<?> values)booleanretainAll(Collection<?> values)Valueset(int index, Value value)Valueset(int index, Value element, Object key)voidsetDataContext(ListDataContext dataContext)voidsetStoreBinding(StoreBinding storeBinding)intsize()KeyedList<Value>snapshot()Storestore()StoreBindingstoreBinding()voidstreeDidDrop(STree newTree, STree oldTree, long lower)voidstreeDidInsert(STree newTree, STree oldTree, long index, Value id, Value newValue)voidstreeDidRemove(STree newTree, STree oldTree, long index, Value id, Value oldValue)voidstreeDidTake(STree newTree, STree oldTree, long upper)voidstreeDidUpdate(STree newTree, STree oldTree, long index, Value id, Value newValue, Value oldValue)List<Value>subList(int fromIndex, int toIndex)voidtake(int upper)Object[]toArray()<T> T[]toArray(T[] array)STreeListtree()voidtreeDidChange(Tree newTree, Tree oldTree)voidtreeDidClear(Tree newTree, Tree oldTree)voidtreeDidCommit(Tree newTree, Tree oldTree)voidtreeDidLoadPage(Page page)ValuetreeName()<T> TunwrapData(Class<T> dataClass)<V2> ListData<V2>valueClass(Class<V2> valueClass)Form<Value>valueForm()<V2> ListData<V2>valueForm(Form<V2> valueForm)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Field Detail
-
name
protected final Value name
-
tree
protected final STreeList tree
-
dataContext
protected ListDataContext dataContext
-
storeBinding
protected StoreBinding storeBinding
-
-
Method Detail
-
dataContext
public ListDataContext dataContext()
- Specified by:
dataContextin interfaceDataBinding- Specified by:
dataContextin interfaceListDataBinding
-
setDataContext
public void setDataContext(ListDataContext dataContext)
- Specified by:
setDataContextin interfaceListDataBinding
-
storeBinding
public StoreBinding storeBinding()
- Specified by:
storeBindingin interfaceDataBinding
-
setStoreBinding
public void setStoreBinding(StoreBinding storeBinding)
- Specified by:
setStoreBindingin interfaceDataBinding
-
unwrapData
public <T> T unwrapData(Class<T> dataClass)
- Specified by:
unwrapDatain interfaceDataBinding
-
tree
public final STreeList tree()
-
database
public final Database database()
-
store
public final Store store()
-
treeName
public final Value treeName()
-
name
public final Value name()
- Specified by:
namein interfaceDataBinding- Specified by:
namein interfaceListData<Value>
-
valueClass
public <V2> ListData<V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClassin interfaceListData<Value>
-
dataSize
public long dataSize()
- Specified by:
dataSizein interfaceDataBinding
-
isResident
public boolean isResident()
- Specified by:
isResidentin interfaceDataBinding- Specified by:
isResidentin interfaceListData<Value>
-
isResident
public ListDataModel isResident(boolean isResident)
- Specified by:
isResidentin interfaceDataBinding- Specified by:
isResidentin interfaceListData<Value>- Specified by:
isResidentin interfaceListDataBinding
-
isTransient
public boolean isTransient()
- Specified by:
isTransientin interfaceDataBinding- Specified by:
isTransientin interfaceListData<Value>
-
isTransient
public ListDataModel isTransient(boolean isTransient)
- Specified by:
isTransientin interfaceDataBinding- Specified by:
isTransientin interfaceListData<Value>- Specified by:
isTransientin interfaceListDataBinding
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object value)
-
containsAll
public boolean containsAll(Collection<?> values)
- Specified by:
containsAllin interfaceCollection<Value>- Specified by:
containsAllin interfaceList<Value>
-
lastIndexOf
public int lastIndexOf(Object value)
- Specified by:
lastIndexOfin interfaceList<Value>
-
add
public boolean add(Value value)
-
addAll
public boolean addAll(Collection<? extends Value> values)
-
addAll
public boolean addAll(int index, Collection<? extends Value> values)
-
remove
public boolean remove(Object value)
-
removeAll
public boolean removeAll(Collection<?> values)
-
retainAll
public boolean retainAll(Collection<?> values)
-
clear
public void clear()
-
listIterator
public ListIterator<Value> listIterator()
- Specified by:
listIteratorin interfaceList<Value>
-
listIterator
public ListIterator<Value> listIterator(int index)
- Specified by:
listIteratorin interfaceList<Value>
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] array)
-
close
public void close()
- Specified by:
closein interfaceDataBinding- Specified by:
closein interfaceListData<Value>
-
move
public void move(int fromIndex, int toIndex, Object key)
-
keyIterator
public ListIterator<Object> keyIterator()
- Specified by:
keyIteratorin interfaceKeyedList<Value>
-
entryIterator
public ListIterator<Map.Entry<Object,Value>> entryIterator()
- Specified by:
entryIteratorin interfaceKeyedList<Value>
-
treeDidLoadPage
public void treeDidLoadPage(Page page)
- Specified by:
treeDidLoadPagein interfaceTreeDelegate
-
treeDidChange
public void treeDidChange(Tree newTree, Tree oldTree)
- Specified by:
treeDidChangein interfaceTreeDelegate
-
treeDidCommit
public void treeDidCommit(Tree newTree, Tree oldTree)
- Specified by:
treeDidCommitin interfaceTreeDelegate
-
treeDidClear
public void treeDidClear(Tree newTree, Tree oldTree)
- Specified by:
treeDidClearin interfaceTreeDelegate
-
streeDidUpdate
public void streeDidUpdate(STree newTree, STree oldTree, long index, Value id, Value newValue, Value oldValue)
- Specified by:
streeDidUpdatein interfaceSTreeDelegate
-
streeDidInsert
public void streeDidInsert(STree newTree, STree oldTree, long index, Value id, Value newValue)
- Specified by:
streeDidInsertin interfaceSTreeDelegate
-
streeDidRemove
public void streeDidRemove(STree newTree, STree oldTree, long index, Value id, Value oldValue)
- Specified by:
streeDidRemovein interfaceSTreeDelegate
-
streeDidDrop
public void streeDidDrop(STree newTree, STree oldTree, long lower)
- Specified by:
streeDidDropin interfaceSTreeDelegate
-
streeDidTake
public void streeDidTake(STree newTree, STree oldTree, long upper)
- Specified by:
streeDidTakein interfaceSTreeDelegate
-
-