|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.association.AssociationRuntimeUtilities
Utility methods for processing associations at runtime. These methods take into account static introspection information as well as runtime information.
Nested Class Summary | |
private static class |
AssociationRuntimeUtilities.RoleDescriptorKey
|
Field Summary | |
static int |
CASCADE_ROLE_QUERY_OID_COUNT
|
static int |
CASCADE_ROLE_QUERY_ROLE_OID_INDEX
|
private static String |
CLASSNAME
|
static boolean |
DEBUG
|
private static DebugWriter |
LOG
|
static int |
OWNED_LINK_QUERY_LINK_OID_INDEX
|
static int |
OWNED_LINK_QUERY_OID_COUNT
|
static int |
OWNED_LINK_QUERY_ROLE_OID_INDEX
|
Constructor Summary | |
AssociationRuntimeUtilities()
|
Method Summary | |
static Map |
buildCascadeMap(ClassInfo a_targetClassInfo)
This method returns a Map of RoleDescriptors for the specified target class. |
static QuerySpec |
buildComponentRoleSpec(long[] a_objectIds,
RoleDescriptor a_role,
Class a_referenceType,
Class a_validClass,
String[] a_validClassNames,
boolean a_selectLinkObjects,
boolean a_linkObjectIds,
ClassInfo a_targetClassInfo)
This method builds a query to return role ObjectIdentifier columns and optionally link ObjectIdentifier columns (if a_selectLinkObjects=true) for the specified role. |
private static List |
buildDescendentRuntimeReferentialIntegrityClassInfos(ClassInfo a_targetClassInfo,
List a_list)
|
static List |
buildNonOwnerList(ClassInfo a_targetClassInfo)
This method returns a List of RoleDescriptors for associations that the specified target class can take part in. |
static List |
buildOwnerList(ClassInfo a_targetClassInfo)
This method returns a List of RoleDescriptors for associations that the specified target class can take part in. |
private static List |
buildOwnerList(ClassInfo a_targetClassInfo,
boolean a_checkOwner)
This method returns a List of RoleDescriptors for associations that the specified target class can take part in. |
static StatementSpec |
buildRoleSpec(long[] a_objectIds,
Collection a_roles,
Map a_roleValidClassMap,
boolean a_selectLinkObjects,
boolean a_linkObjectIds,
ClassInfo a_targetClassInfo)
This method builds a query to return role ObjectIdentifier columns and optionally link ObjectIdentifier columns (if a_selectLinkObjects=true) for the specified roles. |
static boolean |
isRoleParticipant(ClassInfo a_targetClassInfo)
This method indicates if the specified target class participates as a role object in another association. |
static boolean |
isRuntimeReferentialIntegrityProcessingRequired(ClassInfo a_targetClassInfo)
This method indicates if the specified target class requires "remove event" participation. |
private static HashSet |
processOwnerList(LinkInfo a_linkInfo,
boolean a_isRoleA,
ClassInfo a_targetClassInfo,
boolean a_checkOwner,
HashSet a_set)
This method processes the specified LinkInfo to determine if it is a valid Role for the target class for the specified owner check. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String CLASSNAME
public static final boolean DEBUG
private static final DebugWriter LOG
public static final int OWNED_LINK_QUERY_OID_COUNT
public static final int OWNED_LINK_QUERY_LINK_OID_INDEX
public static final int OWNED_LINK_QUERY_ROLE_OID_INDEX
public static final int CASCADE_ROLE_QUERY_OID_COUNT
public static final int CASCADE_ROLE_QUERY_ROLE_OID_INDEX
Constructor Detail |
public AssociationRuntimeUtilities()
Method Detail |
public static List buildNonOwnerList(ClassInfo a_targetClassInfo) throws WTException
a_targetClassInfo
-
WTException
public static List buildOwnerList(ClassInfo a_targetClassInfo) throws WTException
a_targetClassInfo
-
WTException
public static Map buildCascadeMap(ClassInfo a_targetClassInfo) throws WTException
a_targetClassInfo
-
WTException
public static StatementSpec buildRoleSpec(long[] a_objectIds, Collection a_roles, Map a_roleValidClassMap, boolean a_selectLinkObjects, boolean a_linkObjectIds, ClassInfo a_targetClassInfo) throws WTException
a_objectIds
- ObjectIdentifier IDs to use in criteriaa_roles
- Collection of roles to build the query fora_roleValidClassMap
- indicates associated valid classes (optional)a_selectLinkObjects
- indicates if link OIDs should be selected
in addition to role OIDsa_linkObjectIds
- indicates if the ObjectIdentifier ID criteria
should use the link class (true) or the role class (false)a_targetClassInfo
- specifies the exact role target class
(if known)
WTException
public static QuerySpec buildComponentRoleSpec(long[] a_objectIds, RoleDescriptor a_role, Class a_referenceType, Class a_validClass, String[] a_validClassNames, boolean a_selectLinkObjects, boolean a_linkObjectIds, ClassInfo a_targetClassInfo) throws WTException
a_objectIds
- ObjectIdentifier IDs to use in criteriaa_role
- Role to build the query fora_referenceType
- WTReference class that implements this Rolea_validClass
- valid role classa_selectLinkObjects
- indicates if link OIDs should be selected
in addition to role OIDsa_linkObjectIds
- indicates if the ObjectIdentifier ID criteria
should use the link class (true) or the role class (false)
WTException
public static boolean isRuntimeReferentialIntegrityProcessingRequired(ClassInfo a_targetClassInfo) throws WTException
a_targetClassInfo
-
WTException
public static boolean isRoleParticipant(ClassInfo a_targetClassInfo) throws WTException
a_targetClassInfo
-
WTException
private static List buildDescendentRuntimeReferentialIntegrityClassInfos(ClassInfo a_targetClassInfo, List a_list) throws WTException
WTException
private static List buildOwnerList(ClassInfo a_targetClassInfo, boolean a_checkOwner) throws WTException
a_targetClassInfo
- target class to checka_checkOwner
- check for "owner=true" or "owner= false"
WTException
private static HashSet processOwnerList(LinkInfo a_linkInfo, boolean a_isRoleA, ClassInfo a_targetClassInfo, boolean a_checkOwner, HashSet a_set) throws WTException
a_linkInfo
- Link class to checka_isRoleA
- indicates which rolea_targetClassInfo
- target class for the associationa_checkOwner
- check for "owner=true" or "owner= false"
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |