|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.util.ArrayStateImage
public class ArrayStateImage
Utilities for dealing with a simple state image consisting of an
Object[] of field values with one extra index containing a
BitSet of loaded fields. This simplistic state image might be used
for optimistic versioning.
| Constructor Summary | |
|---|---|
ArrayStateImage()
|
|
| Method Summary | |
|---|---|
static Object[] |
clone(Object[] state)
Clone a state array. |
static BitSet |
getLoaded(Object[] state)
Get the loaded mask from a state image. |
static boolean |
isImage(Object obj)
Return true if the given version object appears to be an array state image. |
static Object[] |
newImage(int numFields)
Create a new state image for the given number of fields. |
static boolean |
sameVersion(Object[] state1,
Object[] state2)
Return whether the given images are equivalent from an optimistic locking perspective. |
static void |
setLoaded(Object[] state,
BitSet loaded)
Set the loaded mask into a state image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayStateImage()
| Method Detail |
|---|
public static Object[] newImage(int numFields)
public static boolean isImage(Object obj)
public static BitSet getLoaded(Object[] state)
public static void setLoaded(Object[] state,
BitSet loaded)
public static Object[] clone(Object[] state)
public static boolean sameVersion(Object[] state1,
Object[] state2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||