Package org.apache.openjpa.util
Class ArrayStateImage
java.lang.Object
org.apache.openjpa.util.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.- Author:
- Abe White
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object[]Clone a state array.static BitSetGet the loaded mask from a state image.static booleanReturn 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 booleansameVersion(Object[] state1, Object[] state2) Return whether the given images are equivalent from an optimistic locking perspective.static voidSet the loaded mask into a state image.
-
Constructor Details
-
ArrayStateImage
public ArrayStateImage()
-
-
Method Details
-
newImage
Create a new state image for the given number of fields. -
isImage
Return true if the given version object appears to be an array state image. -
getLoaded
Get the loaded mask from a state image. -
setLoaded
Set the loaded mask into a state image. -
clone
Clone a state array. -
sameVersion
Return whether the given images are equivalent from an optimistic locking perspective.
-