Package swim.store.db

Class ListDataModel

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 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:
      dataContext in interface swim.store.DataBinding
      Specified by:
      dataContext in interface swim.store.ListDataBinding
    • setDataContext

      public void setDataContext(swim.store.ListDataContext dataContext)
      Specified by:
      setDataContext in interface swim.store.ListDataBinding
    • storeBinding

      public swim.store.StoreBinding storeBinding()
      Specified by:
      storeBinding in interface swim.store.DataBinding
    • setStoreBinding

      public void setStoreBinding(swim.store.StoreBinding storeBinding)
      Specified by:
      setStoreBinding in interface swim.store.DataBinding
    • unwrapData

      public <T> T unwrapData(Class<T> dataClass)
      Specified by:
      unwrapData in interface swim.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:
      name in interface swim.store.DataBinding
      Specified by:
      name in interface swim.api.data.ListData<swim.structure.Value>
    • valueForm

      public swim.structure.Form<swim.structure.Value> valueForm()
      Specified by:
      valueForm in interface swim.api.data.ListData<swim.structure.Value>
    • valueForm

      public <V2> swim.api.data.ListData<V2> valueForm(swim.structure.Form<V2> valueForm)
      Specified by:
      valueForm in interface swim.api.data.ListData<swim.structure.Value>
    • valueClass

      public <V2> swim.api.data.ListData<V2> valueClass(Class<V2> valueClass)
      Specified by:
      valueClass in interface swim.api.data.ListData<swim.structure.Value>
    • dataSize

      public long dataSize()
      Specified by:
      dataSize in interface swim.store.DataBinding
    • isResident

      public boolean isResident()
      Specified by:
      isResident in interface swim.store.DataBinding
      Specified by:
      isResident in interface swim.api.data.ListData<swim.structure.Value>
    • isResident

      public ListDataModel isResident(boolean isResident)
      Specified by:
      isResident in interface swim.store.DataBinding
      Specified by:
      isResident in interface swim.api.data.ListData<swim.structure.Value>
      Specified by:
      isResident in interface swim.store.ListDataBinding
    • isTransient

      public boolean isTransient()
      Specified by:
      isTransient in interface swim.store.DataBinding
      Specified by:
      isTransient in interface swim.api.data.ListData<swim.structure.Value>
    • isTransient

      public ListDataModel isTransient(boolean isTransient)
      Specified by:
      isTransient in interface swim.store.DataBinding
      Specified by:
      isTransient in interface swim.api.data.ListData<swim.structure.Value>
      Specified by:
      isTransient in interface swim.store.ListDataBinding
    • size

      public int size()
      Specified by:
      size in interface Collection<swim.structure.Value>
      Specified by:
      size in interface List<swim.structure.Value>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<swim.structure.Value>
      Specified by:
      isEmpty in interface List<swim.structure.Value>
    • contains

      public boolean contains(Object value)
      Specified by:
      contains in interface Collection<swim.structure.Value>
      Specified by:
      contains in interface List<swim.structure.Value>
    • containsAll

      public boolean containsAll(Collection<?> values)
      Specified by:
      containsAll in interface Collection<swim.structure.Value>
      Specified by:
      containsAll in interface List<swim.structure.Value>
    • indexOf

      public int indexOf(Object value)
      Specified by:
      indexOf in interface List<swim.structure.Value>
    • lastIndexOf

      public int lastIndexOf(Object value)
      Specified by:
      lastIndexOf in interface List<swim.structure.Value>
    • get

      public swim.structure.Value get(int index)
      Specified by:
      get in interface List<swim.structure.Value>
    • set

      public swim.structure.Value set(int index, swim.structure.Value value)
      Specified by:
      set in interface List<swim.structure.Value>
    • add

      public boolean add(swim.structure.Value value)
      Specified by:
      add in interface Collection<swim.structure.Value>
      Specified by:
      add in interface List<swim.structure.Value>
    • addAll

      public boolean addAll(Collection<? extends swim.structure.Value> values)
      Specified by:
      addAll in interface Collection<swim.structure.Value>
      Specified by:
      addAll in interface List<swim.structure.Value>
    • add

      public void add(int index, swim.structure.Value value)
      Specified by:
      add in interface List<swim.structure.Value>
    • addAll

      public boolean addAll(int index, Collection<? extends swim.structure.Value> values)
      Specified by:
      addAll in interface List<swim.structure.Value>
    • remove

      public swim.structure.Value remove(int index)
      Specified by:
      remove in interface List<swim.structure.Value>
    • remove

      public boolean remove(Object value)
      Specified by:
      remove in interface Collection<swim.structure.Value>
      Specified by:
      remove in interface List<swim.structure.Value>
    • removeAll

      public boolean removeAll(Collection<?> values)
      Specified by:
      removeAll in interface Collection<swim.structure.Value>
      Specified by:
      removeAll in interface List<swim.structure.Value>
    • retainAll

      public boolean retainAll(Collection<?> values)
      Specified by:
      retainAll in interface Collection<swim.structure.Value>
      Specified by:
      retainAll in interface List<swim.structure.Value>
    • drop

      public void drop(int lower)
      Specified by:
      drop in interface swim.api.data.ListData<swim.structure.Value>
    • take

      public void take(int upper)
      Specified by:
      take in interface swim.api.data.ListData<swim.structure.Value>
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<swim.structure.Value>
      Specified by:
      clear in interface List<swim.structure.Value>
    • iterator

      public Iterator<swim.structure.Value> iterator()
      Specified by:
      iterator in interface Collection<swim.structure.Value>
      Specified by:
      iterator in interface Iterable<swim.structure.Value>
      Specified by:
      iterator in interface List<swim.structure.Value>
    • listIterator

      public ListIterator<swim.structure.Value> listIterator()
      Specified by:
      listIterator in interface List<swim.structure.Value>
    • listIterator

      public ListIterator<swim.structure.Value> listIterator(int index)
      Specified by:
      listIterator in interface List<swim.structure.Value>
    • subList

      public List<swim.structure.Value> subList(int fromIndex, int toIndex)
      Specified by:
      subList in interface List<swim.structure.Value>
    • snapshot

      public swim.util.KeyedList<swim.structure.Value> snapshot()
      Specified by:
      snapshot in interface swim.api.data.ListData<swim.structure.Value>
    • toArray

      public Object[] toArray()
      Specified by:
      toArray in interface Collection<swim.structure.Value>
      Specified by:
      toArray in interface List<swim.structure.Value>
    • toArray

      public <T> T[] toArray(T[] array)
      Specified by:
      toArray in interface Collection<swim.structure.Value>
      Specified by:
      toArray in interface List<swim.structure.Value>
    • close

      public void close()
      Specified by:
      close in interface swim.store.DataBinding
      Specified by:
      close in interface swim.api.data.ListData<swim.structure.Value>
    • get

      public swim.structure.Value get(int index, Object key)
      Specified by:
      get in interface swim.util.KeyedList<swim.structure.Value>
    • getEntry

      public Map.Entry<Object,swim.structure.Value> getEntry(int index)
      Specified by:
      getEntry in interface swim.util.KeyedList<swim.structure.Value>
    • getEntry

      public Map.Entry<Object,swim.structure.Value> getEntry(int index, Object key)
      Specified by:
      getEntry in interface swim.util.KeyedList<swim.structure.Value>
    • set

      public swim.structure.Value set(int index, swim.structure.Value element, Object key)
      Specified by:
      set in interface swim.util.KeyedList<swim.structure.Value>
    • add

      public boolean add(swim.structure.Value element, Object key)
      Specified by:
      add in interface swim.util.KeyedList<swim.structure.Value>
    • add

      public void add(int index, swim.structure.Value element, Object key)
      Specified by:
      add in interface swim.util.KeyedList<swim.structure.Value>
    • remove

      public swim.structure.Value remove(int index, Object key)
      Specified by:
      remove in interface swim.util.KeyedList<swim.structure.Value>
    • move

      public void move(int fromIndex, int toIndex)
      Specified by:
      move in interface swim.util.KeyedList<swim.structure.Value>
    • move

      public void move(int fromIndex, int toIndex, Object key)
      Specified by:
      move in interface swim.util.KeyedList<swim.structure.Value>
    • keyIterator

      public ListIterator<Object> keyIterator()
      Specified by:
      keyIterator in interface swim.util.KeyedList<swim.structure.Value>
    • entryIterator

      public ListIterator<Map.Entry<Object,swim.structure.Value>> entryIterator()
      Specified by:
      entryIterator in interface swim.util.KeyedList<swim.structure.Value>
    • treeDidLoadPage

      public void treeDidLoadPage(swim.db.Page page)
      Specified by:
      treeDidLoadPage in interface swim.db.TreeDelegate
    • treeDidChange

      public void treeDidChange(swim.db.Tree newTree, swim.db.Tree oldTree)
      Specified by:
      treeDidChange in interface swim.db.TreeDelegate
    • treeDidCommit

      public void treeDidCommit(swim.db.Tree newTree, swim.db.Tree oldTree)
      Specified by:
      treeDidCommit in interface swim.db.TreeDelegate
    • treeDidClear

      public void treeDidClear(swim.db.Tree newTree, swim.db.Tree oldTree)
      Specified by:
      treeDidClear in interface swim.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:
      streeDidUpdate in interface swim.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:
      streeDidInsert in interface swim.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:
      streeDidRemove in interface swim.db.STreeDelegate
    • streeDidDrop

      public void streeDidDrop(swim.db.STree newTree, swim.db.STree oldTree, long lower)
      Specified by:
      streeDidDrop in interface swim.db.STreeDelegate
    • streeDidTake

      public void streeDidTake(swim.db.STree newTree, swim.db.STree oldTree, long upper)
      Specified by:
      streeDidTake in interface swim.db.STreeDelegate