Package org.apache.openjpa.util
Class ArrayStateImage
- java.lang.Object
- 
- org.apache.openjpa.util.ArrayStateImage
 
- 
 public class ArrayStateImage extends java.lang.ObjectUtilities for dealing with a simple state image consisting of anObject[]of field values with one extra index containing aBitSetof loaded fields. This simplistic state image might be used for optimistic versioning.- Author:
- Abe White
 
- 
- 
Constructor SummaryConstructors Constructor Description ArrayStateImage()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object[]clone(java.lang.Object[] state)Clone a state array.static java.util.BitSetgetLoaded(java.lang.Object[] state)Get the loaded mask from a state image.static booleanisImage(java.lang.Object obj)Return true if the given version object appears to be an array state image.static java.lang.Object[]newImage(int numFields)Create a new state image for the given number of fields.static booleansameVersion(java.lang.Object[] state1, java.lang.Object[] state2)Return whether the given images are equivalent from an optimistic locking perspective.static voidsetLoaded(java.lang.Object[] state, java.util.BitSet loaded)Set the loaded mask into a state image.
 
- 
- 
- 
Method Detail- 
newImagepublic static java.lang.Object[] newImage(int numFields) Create a new state image for the given number of fields.
 - 
isImagepublic static boolean isImage(java.lang.Object obj) Return true if the given version object appears to be an array state image.
 - 
getLoadedpublic static java.util.BitSet getLoaded(java.lang.Object[] state) Get the loaded mask from a state image.
 - 
setLoadedpublic static void setLoaded(java.lang.Object[] state, java.util.BitSet loaded)Set the loaded mask into a state image.
 - 
clonepublic static java.lang.Object[] clone(java.lang.Object[] state) Clone a state array.
 - 
sameVersionpublic static boolean sameVersion(java.lang.Object[] state1, java.lang.Object[] state2)Return whether the given images are equivalent from an optimistic locking perspective.
 
- 
 
-