java.lang.Object
swim.store.db.ListDataModel
- All Implemented Interfaces:
Iterable<swim.structure.Value>,Collection<swim.structure.Value>,List<swim.structure.Value>,swim.api.data.ListData<swim.structure.Value>,swim.db.STreeDelegate,swim.db.TreeDelegate,swim.store.DataBinding,swim.store.ListDataBinding,swim.util.KeyedList<swim.structure.Value>
public class ListDataModel
extends Object
implements swim.store.ListDataBinding, swim.db.STreeDelegate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected swim.store.ListDataContextprotected final swim.structure.Valueprotected swim.store.StoreBindingprotected final swim.db.STreeList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, swim.structure.Value value) voidbooleanadd(swim.structure.Value value) booleanbooleanaddAll(int index, Collection<? extends swim.structure.Value> values) booleanaddAll(Collection<? extends swim.structure.Value> values) voidclear()voidclose()booleanbooleancontainsAll(Collection<?> values) final swim.db.Databasedatabase()swim.store.ListDataContextlongdataSize()voiddrop(int lower) ListIterator<Map.Entry<Object,swim.structure.Value>> swim.structure.Valueget(int index) swim.structure.ValuegetEntry(int index) intbooleanisEmpty()booleanisResident(boolean isResident) booleanisTransient(boolean isTransient) Iterator<swim.structure.Value>iterator()intlastIndexOf(Object value) ListIterator<swim.structure.Value>ListIterator<swim.structure.Value>listIterator(int index) voidmove(int fromIndex, int toIndex) voidfinal swim.structure.Valuename()swim.structure.Valueremove(int index) swim.structure.ValuebooleanbooleanremoveAll(Collection<?> values) booleanretainAll(Collection<?> values) swim.structure.Valueset(int index, swim.structure.Value value) swim.structure.ValuevoidsetDataContext(swim.store.ListDataContext dataContext) voidsetStoreBinding(swim.store.StoreBinding storeBinding) intsize()swim.util.KeyedList<swim.structure.Value>snapshot()final swim.db.Storestore()swim.store.StoreBindingvoidstreeDidDrop(swim.db.STree newTree, swim.db.STree oldTree, long lower) voidstreeDidInsert(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value newValue) voidstreeDidRemove(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value oldValue) voidstreeDidTake(swim.db.STree newTree, swim.db.STree oldTree, long upper) voidstreeDidUpdate(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value newValue, swim.structure.Value oldValue) List<swim.structure.Value>subList(int fromIndex, int toIndex) voidtake(int upper) Object[]toArray()<T> T[]toArray(T[] array) final swim.db.STreeListtree()voidtreeDidChange(swim.db.Tree newTree, swim.db.Tree oldTree) voidtreeDidClear(swim.db.Tree newTree, swim.db.Tree oldTree) voidtreeDidCommit(swim.db.Tree newTree, swim.db.Tree oldTree) voidtreeDidLoadPage(swim.db.Page page) final swim.structure.ValuetreeName()<T> TunwrapData(Class<T> dataClass) <V2> swim.api.data.ListData<V2>valueClass(Class<V2> valueClass) swim.structure.Form<swim.structure.Value><V2> swim.api.data.ListData<V2>valueForm(swim.structure.Form<V2> valueForm) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Field Details
-
name
protected final swim.structure.Value name -
tree
protected final swim.db.STreeList tree -
dataContext
protected swim.store.ListDataContext dataContext -
storeBinding
protected swim.store.StoreBinding storeBinding
-
-
Constructor Details
-
ListDataModel
public ListDataModel(swim.structure.Value name, swim.db.STreeList tree)
-
-
Method Details
-
dataContext
public swim.store.ListDataContext dataContext()- Specified by:
dataContextin interfaceswim.store.DataBinding- Specified by:
dataContextin interfaceswim.store.ListDataBinding
-
setDataContext
public void setDataContext(swim.store.ListDataContext dataContext) - Specified by:
setDataContextin interfaceswim.store.ListDataBinding
-
storeBinding
public swim.store.StoreBinding storeBinding()- Specified by:
storeBindingin interfaceswim.store.DataBinding
-
setStoreBinding
public void setStoreBinding(swim.store.StoreBinding storeBinding) - Specified by:
setStoreBindingin interfaceswim.store.DataBinding
-
unwrapData
- Specified by:
unwrapDatain interfaceswim.store.DataBinding
-
tree
public final swim.db.STreeList tree() -
database
public final swim.db.Database database() -
store
public final swim.db.Store store() -
treeName
public final swim.structure.Value treeName() -
name
public final swim.structure.Value name()- Specified by:
namein interfaceswim.store.DataBinding- Specified by:
namein interfaceswim.api.data.ListData<swim.structure.Value>
-
valueForm
public swim.structure.Form<swim.structure.Value> valueForm()- Specified by:
valueFormin interfaceswim.api.data.ListData<swim.structure.Value>
-
valueForm
public <V2> swim.api.data.ListData<V2> valueForm(swim.structure.Form<V2> valueForm) - Specified by:
valueFormin interfaceswim.api.data.ListData<swim.structure.Value>
-
valueClass
- Specified by:
valueClassin interfaceswim.api.data.ListData<swim.structure.Value>
-
dataSize
public long dataSize()- Specified by:
dataSizein interfaceswim.store.DataBinding
-
isResident
public boolean isResident()- Specified by:
isResidentin interfaceswim.store.DataBinding- Specified by:
isResidentin interfaceswim.api.data.ListData<swim.structure.Value>
-
isResident
- Specified by:
isResidentin interfaceswim.store.DataBinding- Specified by:
isResidentin interfaceswim.api.data.ListData<swim.structure.Value>- Specified by:
isResidentin interfaceswim.store.ListDataBinding
-
isTransient
public boolean isTransient()- Specified by:
isTransientin interfaceswim.store.DataBinding- Specified by:
isTransientin interfaceswim.api.data.ListData<swim.structure.Value>
-
isTransient
- Specified by:
isTransientin interfaceswim.store.DataBinding- Specified by:
isTransientin interfaceswim.api.data.ListData<swim.structure.Value>- Specified by:
isTransientin interfaceswim.store.ListDataBinding
-
size
public int size()- Specified by:
sizein interfaceCollection<swim.structure.Value>- Specified by:
sizein interfaceList<swim.structure.Value>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<swim.structure.Value>- Specified by:
isEmptyin interfaceList<swim.structure.Value>
-
contains
- Specified by:
containsin interfaceCollection<swim.structure.Value>- Specified by:
containsin interfaceList<swim.structure.Value>
-
containsAll
- Specified by:
containsAllin interfaceCollection<swim.structure.Value>- Specified by:
containsAllin interfaceList<swim.structure.Value>
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<swim.structure.Value>
-
get
public swim.structure.Value get(int index) -
set
public swim.structure.Value set(int index, swim.structure.Value value) -
add
public boolean add(swim.structure.Value value) - Specified by:
addin interfaceCollection<swim.structure.Value>- Specified by:
addin interfaceList<swim.structure.Value>
-
addAll
- Specified by:
addAllin interfaceCollection<swim.structure.Value>- Specified by:
addAllin interfaceList<swim.structure.Value>
-
add
public void add(int index, swim.structure.Value value) -
addAll
-
remove
public swim.structure.Value remove(int index) -
remove
- Specified by:
removein interfaceCollection<swim.structure.Value>- Specified by:
removein interfaceList<swim.structure.Value>
-
removeAll
- Specified by:
removeAllin interfaceCollection<swim.structure.Value>- Specified by:
removeAllin interfaceList<swim.structure.Value>
-
retainAll
- Specified by:
retainAllin interfaceCollection<swim.structure.Value>- Specified by:
retainAllin interfaceList<swim.structure.Value>
-
drop
public void drop(int lower) - Specified by:
dropin interfaceswim.api.data.ListData<swim.structure.Value>
-
take
public void take(int upper) - Specified by:
takein interfaceswim.api.data.ListData<swim.structure.Value>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<swim.structure.Value>- Specified by:
clearin interfaceList<swim.structure.Value>
-
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList<swim.structure.Value>
-
listIterator
- Specified by:
listIteratorin interfaceList<swim.structure.Value>
-
subList
-
snapshot
public swim.util.KeyedList<swim.structure.Value> snapshot()- Specified by:
snapshotin interfaceswim.api.data.ListData<swim.structure.Value>
-
toArray
- Specified by:
toArrayin interfaceCollection<swim.structure.Value>- Specified by:
toArrayin interfaceList<swim.structure.Value>
-
toArray
public <T> T[] toArray(T[] array) - Specified by:
toArrayin interfaceCollection<swim.structure.Value>- Specified by:
toArrayin interfaceList<swim.structure.Value>
-
close
public void close()- Specified by:
closein interfaceswim.store.DataBinding- Specified by:
closein interfaceswim.api.data.ListData<swim.structure.Value>
-
get
- Specified by:
getin interfaceswim.util.KeyedList<swim.structure.Value>
-
getEntry
- Specified by:
getEntryin interfaceswim.util.KeyedList<swim.structure.Value>
-
getEntry
- Specified by:
getEntryin interfaceswim.util.KeyedList<swim.structure.Value>
-
set
- Specified by:
setin interfaceswim.util.KeyedList<swim.structure.Value>
-
add
- Specified by:
addin interfaceswim.util.KeyedList<swim.structure.Value>
-
add
- Specified by:
addin interfaceswim.util.KeyedList<swim.structure.Value>
-
remove
- Specified by:
removein interfaceswim.util.KeyedList<swim.structure.Value>
-
move
public void move(int fromIndex, int toIndex) - Specified by:
movein interfaceswim.util.KeyedList<swim.structure.Value>
-
move
- Specified by:
movein interfaceswim.util.KeyedList<swim.structure.Value>
-
keyIterator
- Specified by:
keyIteratorin interfaceswim.util.KeyedList<swim.structure.Value>
-
entryIterator
- Specified by:
entryIteratorin interfaceswim.util.KeyedList<swim.structure.Value>
-
treeDidLoadPage
public void treeDidLoadPage(swim.db.Page page) - Specified by:
treeDidLoadPagein interfaceswim.db.TreeDelegate
-
treeDidChange
public void treeDidChange(swim.db.Tree newTree, swim.db.Tree oldTree) - Specified by:
treeDidChangein interfaceswim.db.TreeDelegate
-
treeDidCommit
public void treeDidCommit(swim.db.Tree newTree, swim.db.Tree oldTree) - Specified by:
treeDidCommitin interfaceswim.db.TreeDelegate
-
treeDidClear
public void treeDidClear(swim.db.Tree newTree, swim.db.Tree oldTree) - Specified by:
treeDidClearin interfaceswim.db.TreeDelegate
-
streeDidUpdate
public void streeDidUpdate(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value newValue, swim.structure.Value oldValue) - Specified by:
streeDidUpdatein interfaceswim.db.STreeDelegate
-
streeDidInsert
public void streeDidInsert(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value newValue) - Specified by:
streeDidInsertin interfaceswim.db.STreeDelegate
-
streeDidRemove
public void streeDidRemove(swim.db.STree newTree, swim.db.STree oldTree, long index, swim.structure.Value id, swim.structure.Value oldValue) - Specified by:
streeDidRemovein interfaceswim.db.STreeDelegate
-
streeDidDrop
public void streeDidDrop(swim.db.STree newTree, swim.db.STree oldTree, long lower) - Specified by:
streeDidDropin interfaceswim.db.STreeDelegate
-
streeDidTake
public void streeDidTake(swim.db.STree newTree, swim.db.STree oldTree, long upper) - Specified by:
streeDidTakein interfaceswim.db.STreeDelegate
-