wt.dataservice
Class DatastoreAssociationUtilities

java.lang.Object
  extended bywt.dataservice.DatastoreAssociationUtilities

public class DatastoreAssociationUtilities
extends Object

Utility methods for processing associations at based on introspection, datastore, and configuration information. information.


Field Summary
private static String CLASSNAME
           
static boolean DATASTORE_REFERENTIAL_INTEGRITY_ENABLED
           
static boolean DEBUG
           
private static DebugWriter LOG
           
private static HashMap REMOVE_EVENT_PARTICIPANT_MAP
           
 
Constructor Summary
DatastoreAssociationUtilities()
           
 
Method Summary
private static List buildDescendentNonRemoveEventParticipantClassInfos(ClassInfo a_targetClassInfo, List a_list)
           
static List buildNonRemoveEventParticipantCascadeRoleClassInfos(RoleDescriptor a_roleDescriptor)
          This method builds a list of valid role ClassInfos if the role is Cascade and the class does not require remove event participation.
private static HashSet buildValidLinks(LinkInfo a_linkInfo, boolean a_isRoleA, ClassInfo a_targetClassInfo, HashSet a_set)
          This method builds a set of valid links for the specified Link and role.
private static HashSet buildValidLinks(RoleDescriptor[] a_roles, ClassInfo a_targetClassInfo)
          This method builds a set of valid links for the specified Roles.
static Class getReferenceType(LinkInfo a_linkInfo, String a_role)
          This method returns the reference type on the specifiedlink class for the specified role name.
static Class getReferenceType(PropertyDescriptor a_property)
          This method returns the reference type on the specifiedlink class for the specified role name.
private static Boolean isDescendentRemoveEventParticipant(ClassInfo a_targetClassInfo)
          This method indicates if the specified target class or any of its descendents requires "remove event" participation.
static boolean isRemoveEventParticipant(ClassInfo a_targetClassInfo)
          This method indicates if the specified target class requires "remove event" participation.
private static Boolean isRemoveEventParticipantCompute(ClassInfo a_targetClassInfo)
          This method indicates if the specified target class requires "remove event" participation.
private static Boolean isRemoveEventParticipantLookup(ClassInfo a_targetClassInfo, boolean a_recursive)
          This method indicates if the specified target class requires "remove event" participation.
static boolean isSchemaReferentialIntegrityEnabled(ClassInfo a_targetClassInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATASTORE_REFERENTIAL_INTEGRITY_ENABLED

public static final boolean DATASTORE_REFERENTIAL_INTEGRITY_ENABLED

REMOVE_EVENT_PARTICIPANT_MAP

private static final HashMap REMOVE_EVENT_PARTICIPANT_MAP

CLASSNAME

private static final String CLASSNAME

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

DatastoreAssociationUtilities

public DatastoreAssociationUtilities()
Method Detail

getReferenceType

public static Class getReferenceType(LinkInfo a_linkInfo,
                                     String a_role)
                              throws WTException
This method returns the reference type on the specifiedlink class for the specified role name.

Supported API: false

Parameters:
a_role -
Throws:
WTException

getReferenceType

public static Class getReferenceType(PropertyDescriptor a_property)
                              throws WTException
This method returns the reference type on the specifiedlink class for the specified role name. T

Supported API: false

Throws:
WTException

isSchemaReferentialIntegrityEnabled

public static boolean isSchemaReferentialIntegrityEnabled(ClassInfo a_targetClassInfo)
                                                   throws WTException
Throws:
WTException

isRemoveEventParticipant

public static boolean isRemoveEventParticipant(ClassInfo a_targetClassInfo)
                                        throws WTException
This method indicates if the specified target class requires "remove event" participation.

Supported API: false

Parameters:
a_targetClassInfo -
Throws:
WTException

buildNonRemoveEventParticipantCascadeRoleClassInfos

public static List buildNonRemoveEventParticipantCascadeRoleClassInfos(RoleDescriptor a_roleDescriptor)
                                                                throws WTException
This method builds a list of valid role ClassInfos if the role is Cascade and the class does not require remove event participation.

Supported API: false

Parameters:
a_roleDescriptor -
Throws:
WTException

isRemoveEventParticipantLookup

private static Boolean isRemoveEventParticipantLookup(ClassInfo a_targetClassInfo,
                                                      boolean a_recursive)
                                               throws WTException
This method indicates if the specified target class requires "remove event" participation.

Supported API: false

Parameters:
a_targetClassInfo -
Throws:
WTException

isRemoveEventParticipantCompute

private static Boolean isRemoveEventParticipantCompute(ClassInfo a_targetClassInfo)
                                                throws WTException
This method indicates if the specified target class requires "remove event" participation.

Supported API: false

Parameters:
a_targetClassInfo -
Throws:
WTException

isDescendentRemoveEventParticipant

private static Boolean isDescendentRemoveEventParticipant(ClassInfo a_targetClassInfo)
                                                   throws WTException
This method indicates if the specified target class or any of its descendents requires "remove event" participation.

Supported API: false

Parameters:
a_targetClassInfo -
Throws:
WTException

buildDescendentNonRemoveEventParticipantClassInfos

private static List buildDescendentNonRemoveEventParticipantClassInfos(ClassInfo a_targetClassInfo,
                                                                       List a_list)
                                                                throws WTException
Throws:
WTException

buildValidLinks

private static HashSet buildValidLinks(RoleDescriptor[] a_roles,
                                       ClassInfo a_targetClassInfo)
                                throws WTException
This method builds a set of valid links for the specified Roles.

Supported API: false

Parameters:
a_roles - array of roles to process
a_targetClassInfo - target class for the association
Throws:
WTException

buildValidLinks

private static HashSet buildValidLinks(LinkInfo a_linkInfo,
                                       boolean a_isRoleA,
                                       ClassInfo a_targetClassInfo,
                                       HashSet a_set)
                                throws WTException
This method builds a set of valid links for the specified Link and role.

Supported API: false

Parameters:
a_linkInfo - Link class to check
a_isRoleA - indicates which role
a_targetClassInfo - target class for the association
Throws:
WTException