wt.change2
Class ChangeableCheckoutQuery

java.lang.Object
  extended bywt.change2.ChangeableCheckoutQuery

public class ChangeableCheckoutQuery
extends Object


Field Summary
static Class[] CHANGECLASSES
           
protected static HashMap CLASSMAP
           
private static int PC_QUERY_SIZE
           
 
Constructor Summary
ChangeableCheckoutQuery()
           
 
Method Summary
static OidArray getChangeObjectReferences(Persistable object)
          Given a Persistable Object query all Change tables which may reference it.
static QueryResult getChangeObjects(WTCollection objects)
           
private static long[] getChunk(long[] ids, int i)
           
private static long getId(Object object)
          Returns object's id.
static ArrayList getObjRefsForClass(Class changeClass, HashMap changeHash)
          Returns an ArrayList of ObjectIds from the ObjectReferences queried by getChangeObjectReferences (for the given class changeClass) Subclasses of Class are also considered

Supported API: false
static ObjectIdentifier getOid(Object object)
          Returns object's associated oid.
static boolean hasObjRefsForClass(Class changeClass, HashMap changeHash)
          Returns a boolean indication of whether the Persistable object passed to getChangeObjectReferences is referenced by any instances of the input Change class

Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHANGECLASSES

public static final Class[] CHANGECLASSES

CLASSMAP

protected static HashMap CLASSMAP

PC_QUERY_SIZE

private static int PC_QUERY_SIZE
Constructor Detail

ChangeableCheckoutQuery

public ChangeableCheckoutQuery()
Method Detail

getObjRefsForClass

public static ArrayList getObjRefsForClass(Class changeClass,
                                           HashMap changeHash)
Returns an ArrayList of ObjectIds from the ObjectReferences queried by getChangeObjectReferences (for the given class changeClass) Subclasses of Class are also considered

Supported API: false

Parameters:
changeClass - Referenced class to search for.
changeHash - Results from previous getChangeObjectReferences()
Returns:
ArrayList of ObjectIds

hasObjRefsForClass

public static boolean hasObjRefsForClass(Class changeClass,
                                         HashMap changeHash)
Returns a boolean indication of whether the Persistable object passed to getChangeObjectReferences is referenced by any instances of the input Change class

Supported API: false

Parameters:
changeClass - Referenced class to search for.
changeHash - Results from previous getChangeObjectReferences()
Returns:
boolean True if changeHash contains one or more ObjectReferences referencing Change Class

getChangeObjectReferences

public static OidArray getChangeObjectReferences(Persistable object)
                                          throws QueryException,
                                                 WTPropertyVetoException,
                                                 WTException
Given a Persistable Object query all Change tables which may reference it. Returns a OidArray where each element of the array is assumed to be an Object[] with the first element classname and second element id value.

Supported API: false

Parameters:
object - Persistable object to find all change references.
Returns:
OidArray
Throws:
QueryException
WTPropertyVetoException
WTException

getChangeObjects

public static QueryResult getChangeObjects(WTCollection objects)
                                    throws WTException
Throws:
WTException

getChunk

private static long[] getChunk(long[] ids,
                               int i)

getOid

public static ObjectIdentifier getOid(Object object)
Returns object's associated oid. Accepts not only Persistable as argument but also ObjectReference and ObjectIdentifier objects. Returns 'null' if object is null.


getId

private static long getId(Object object)
Returns object's id.