public class StoredArrayValue extends java.lang.Object implements ArrayValue
Modifier and Type | Field and Description |
---|---|
static int |
CACHE_ALWAYS
cache always
|
static int |
CACHE_DEBUG_CLEAR_MEMORY
never store in cache ie.
|
static int |
CACHE_NONE
do not cache
|
static int |
CACHE_ON_SELECT_ONLY
cache on select only
|
static int |
CACHE_VALIDATE_ON_SAVE
validate on save
|
Constructor and Description |
---|
StoredArrayValue(VirtualDB layer,
DBClass dbClass,
DBField dbField,
long rowUID,
long transID,
boolean archive,
int knownSize)
Create a new stored array value
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Object element) |
boolean |
add(java.lang.Object e) |
boolean |
addAll(java.util.Collection c) |
boolean |
addAll(int index,
java.util.Collection c) |
void |
clear() |
void |
clearCache()
clear the cache
|
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection c) |
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
get(int pos)
get the array value
|
static int |
getCacheMode()
TEST ONLY
|
static java.lang.String |
getCachePath() |
long |
getLinkedRowId(int pos)
get the linked row id.
|
java.lang.Object[][] |
getSegment(int pos)
get the segment values
|
int |
getStartSeq(int pos)
get the segment values
|
VirtualDB |
getValueLayer()
the base layer
|
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
boolean |
isLazyDisabled()
is the lazy update disabled ?
|
static boolean |
isLazyLoadArrayField(DBClass rootClass,
DBField fld)
Is this a lazy load array field
THREAD MODE: read only
|
boolean |
isLoaded()
is this array loaded ?
|
java.util.Iterator |
iterator() |
static boolean |
knownAsBad(long rowUID)
is this known as bad
|
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator |
listIterator() |
java.util.ListIterator |
listIterator(int index) |
void |
loadData(DataResultScroller fieldSQL) |
java.lang.Object |
rawGet(int pos)
get the array value
|
static void |
rememberAsBad(long rowUID)
mark this row as bad
|
java.lang.Object |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection c) |
boolean |
retainAll(java.util.Collection c) |
java.lang.Object |
set(int index,
java.lang.Object element) |
static void |
setCacheMode(int cacheMode)
TEST ONLY
|
int |
size()
the size
|
void |
store(MutableArrayValue mav)
store
|
java.util.List |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] a) |
java.lang.String |
toString()
to String
|
public static final int CACHE_VALIDATE_ON_SAVE
public static final int CACHE_ALWAYS
public static final int CACHE_ON_SELECT_ONLY
public static final int CACHE_NONE
public static final int CACHE_DEBUG_CLEAR_MEMORY
public StoredArrayValue(@Nonnull VirtualDB layer, @Nonnull DBClass dbClass, @Nonnull DBField dbField, long rowUID, long transID, boolean archive, int knownSize)
layer
- The layer in witch it is storeddbClass
- The "real" classdbField
- The fieldrowUID
- The row UIDtransID
- the transaction numberarchive
- is archiveknownSize
- the known size@CheckReturnValue public boolean isLazyDisabled()
@CheckReturnValue @Nonnull public VirtualDB getValueLayer()
public static void rememberAsBad(long rowUID)
rowUID
- the row to mark as bad.@CheckReturnValue public static boolean knownAsBad(long rowUID)
rowUID
- the row to check@CheckReturnValue public boolean isLoaded()
@CheckReturnValue public boolean equals(@Nullable java.lang.Object obj)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.lang.Object
@CheckReturnValue public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class java.lang.Object
public void loadData(@Nonnull DataResultScroller fieldSQL) throws java.sql.SQLException
fieldSQL
- the data SQLjava.sql.SQLException
- a SQL exception@CheckReturnValue @Nonnull public static boolean isLazyLoadArrayField(@Nullable DBClass rootClass, @Nonnull DBField fld)
rootClass
- the root class.fld
- the field to checkpublic static void setCacheMode(int cacheMode)
cacheMode
- the cache mode@CheckReturnValue public static int getCacheMode()
@CheckReturnValue @Nonnull public java.lang.String toString()
toString
in class java.lang.Object
@CheckReturnValue @Nullable public java.lang.Object get(@Nonnegative int pos)
get
in interface ArrayValue
get
in interface java.util.List
pos
- the position to getpublic void clearCache()
@CheckReturnValue @Nullable public java.lang.Object rawGet(@Nonnegative int pos)
rawGet
in interface ArrayValue
pos
- the position to get@CheckReturnValue @Nonnegative public int getStartSeq(@Nonnegative int pos)
pos
- the position to get@CheckReturnValue @Nullable public java.lang.Object[][] getSegment(@Nonnegative int pos)
pos
- the position to getpublic static java.lang.String getCachePath()
public void store(@Nonnull MutableArrayValue mav)
mav
- the array to store.@CheckReturnValue @Nonnegative public int size()
size
in interface ArrayValue
size
in interface java.util.Collection
size
in interface java.util.List
@CheckReturnValue public long getLinkedRowId(@Nonnegative int pos)
pos
- the position@CheckReturnValue public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
@CheckReturnValue public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.List
@CheckReturnValue @Nonnull public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
@CheckReturnValue @Nonnull public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
@CheckReturnValue @Nonnull public java.lang.Object[] toArray(@Nonnull java.lang.Object[] a)
toArray
in interface java.util.Collection
toArray
in interface java.util.List
@CheckReturnValue public boolean add(java.lang.Object e)
add
in interface java.util.Collection
add
in interface java.util.List
@CheckReturnValue public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.List
@CheckReturnValue public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.List
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
public boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
public java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
public void add(int index, java.lang.Object element)
add
in interface java.util.List
public java.lang.Object remove(int index)
remove
in interface java.util.List
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.