wt.query.qml
Class LinkJoinInfo

java.lang.Object
  extended bywt.query.qml.JoinInfo
      extended bywt.query.qml.LinkJoinInfo
All Implemented Interfaces:
RemoteAccess

public class LinkJoinInfo
extends JoinInfo
implements RemoteAccess


Field Summary
private static String CLASSNAME
           
static boolean DEBUG
           
private static Class[] GET_VALID_ROLES_METHOD_ARG_TYPES
           
private static Class[] IS_SWAPPABLE_METHOD_ARG_TYPES
           
private static Class[] LINK_ROLES_METHOD_ARG_TYPES
           
private static DebugWriter LOG
           
private static Class[] METHOD_ARG_TYPES
           
static int ROLE_COUNT
           
static int ROLE_FROM_INDEX
           
static int ROLE_FROM_NAME_INDEX
           
static int ROLE_TO_INDEX
           
static int ROLE_TO_NAME_INDEX
           
 
Fields inherited from class wt.query.qml.JoinInfo
LATEST, OBJECT_ID, OBJECT_REFERENCE, VERSION_ID, VERSION_REFERENCE
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
LinkJoinInfo()
           
 
Method Summary
private static Hashtable _buildLinkMap(Vector classesA, Class classB, Hashtable links, Locale a_locale)
           
static Hashtable _buildLinkMap(Vector classesA, String classB, Hashtable links, Locale a_locale)
           
private static Vector _getValidRoles(Class a_fromClass, Class a_toClass, Class a_linkClass, int a_fromToRole, Locale a_locale)
           
static Vector _getValidRoles(String a_fromClass, String a_toClass, String a_linkClass, int a_fromToRole, Locale a_locale)
           
private static boolean _isSwappable(Class a_fromClass, Class a_toClass, String a_linkClass)
           
static boolean _isSwappable(String a_fromClass, String a_toClass, String a_linkClass)
           
private static boolean _validateLinkRoles(Class a_linkClass, Class a_classA, Class a_classB)
           
static boolean _validateLinkRoles(String a_linkClass, String a_classA, String a_classB)
           
protected  Hashtable buildLinkMap(Vector classesA, String classB, Hashtable a_linkMap, Locale a_locale)
          Builds a Hashtable of valid join classes using introspection information.
protected  Hashtable buildLinkMap(Vector a_classes, String a_classA, String a_classB, Locale a_locale)
           
 boolean compareRole(String a_fromClass, String a_toClass, String a_linkClass, String a_role, int compareRole, Locale a_locale)
           
 Vector filterLinks(String a_class, Vector links, Locale a_locale)
           
static Vector getValidRoles(String a_fromClass, String a_toClass, String a_linkClass, int a_fromToRole, Locale a_locale)
           
static boolean isSwappable(String a_fromClass, String a_toClass, String a_linkClass)
           
protected  Hashtable postProcessLinkMap(Hashtable a_linkMap, Locale a_locale)
          Perform any necessary link map post-processing.
 boolean validateLink(String a_link, String a_classA, String a_classB, Locale a_locale)
           
static boolean validateLinkRoles(String a_linkClass, String a_classA, String a_classB)
           
 
Methods inherited from class wt.query.qml.JoinInfo
buildLinkMap, buildLinkMap, buildLinkMap, buildLinks, buildLinks, buildLinkVector, getLinkJoinInfo, getReferenceJoinInfo, isAssignableFrom, isAssignableFrom, loadClasses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

private static final String CLASSNAME

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG

ROLE_FROM_INDEX

public static final int ROLE_FROM_INDEX
See Also:
Constant Field Values

ROLE_TO_INDEX

public static final int ROLE_TO_INDEX
See Also:
Constant Field Values

ROLE_FROM_NAME_INDEX

public static final int ROLE_FROM_NAME_INDEX
See Also:
Constant Field Values

ROLE_TO_NAME_INDEX

public static final int ROLE_TO_NAME_INDEX
See Also:
Constant Field Values

ROLE_COUNT

public static final int ROLE_COUNT
See Also:
Constant Field Values

METHOD_ARG_TYPES

private static final Class[] METHOD_ARG_TYPES

LINK_ROLES_METHOD_ARG_TYPES

private static final Class[] LINK_ROLES_METHOD_ARG_TYPES

GET_VALID_ROLES_METHOD_ARG_TYPES

private static final Class[] GET_VALID_ROLES_METHOD_ARG_TYPES

IS_SWAPPABLE_METHOD_ARG_TYPES

private static final Class[] IS_SWAPPABLE_METHOD_ARG_TYPES
Constructor Detail

LinkJoinInfo

public LinkJoinInfo()
Method Detail

validateLink

public boolean validateLink(String a_link,
                            String a_classA,
                            String a_classB,
                            Locale a_locale)
                     throws WTException
Overrides:
validateLink in class JoinInfo
Throws:
WTException

validateLinkRoles

public static boolean validateLinkRoles(String a_linkClass,
                                        String a_classA,
                                        String a_classB)
                                 throws WTException
Throws:
WTException

_validateLinkRoles

public static boolean _validateLinkRoles(String a_linkClass,
                                         String a_classA,
                                         String a_classB)
                                  throws WTException,
                                         ClassNotFoundException
Throws:
WTException
ClassNotFoundException

_validateLinkRoles

private static boolean _validateLinkRoles(Class a_linkClass,
                                          Class a_classA,
                                          Class a_classB)
                                   throws WTException
Throws:
WTException

buildLinkMap

protected Hashtable buildLinkMap(Vector a_classes,
                                 String a_classA,
                                 String a_classB,
                                 Locale a_locale)
                          throws WTException
Specified by:
buildLinkMap in class JoinInfo
Throws:
WTException

buildLinkMap

protected Hashtable buildLinkMap(Vector classesA,
                                 String classB,
                                 Hashtable a_linkMap,
                                 Locale a_locale)
                          throws WTException
Builds a Hashtable of valid join classes using introspection information. A join class is included for all valid link associations between classes in classesA and classB.

Specified by:
buildLinkMap in class JoinInfo
Parameters:
classesA - classes to check
classB - class to check
a_linkMap - existing map to add join classes to
a_locale - Locale for display names
Returns:
Hashtable where keys are the join Class and the elements are ClassInfo
Throws:
WTException

_buildLinkMap

public static Hashtable _buildLinkMap(Vector classesA,
                                      String classB,
                                      Hashtable links,
                                      Locale a_locale)
                               throws WTException,
                                      ClassNotFoundException
Throws:
WTException
ClassNotFoundException

_buildLinkMap

private static Hashtable _buildLinkMap(Vector classesA,
                                       Class classB,
                                       Hashtable links,
                                       Locale a_locale)
                                throws WTException
Throws:
WTException

postProcessLinkMap

protected Hashtable postProcessLinkMap(Hashtable a_linkMap,
                                       Locale a_locale)
                                throws WTException
Description copied from class: JoinInfo
Perform any necessary link map post-processing.

Specified by:
postProcessLinkMap in class JoinInfo
Throws:
WTException

filterLinks

public Vector filterLinks(String a_class,
                          Vector links,
                          Locale a_locale)
                   throws WTException
Throws:
WTException

getValidRoles

public static Vector getValidRoles(String a_fromClass,
                                   String a_toClass,
                                   String a_linkClass,
                                   int a_fromToRole,
                                   Locale a_locale)
                            throws WTException
Throws:
WTException

_getValidRoles

public static Vector _getValidRoles(String a_fromClass,
                                    String a_toClass,
                                    String a_linkClass,
                                    int a_fromToRole,
                                    Locale a_locale)
                             throws ClassNotFoundException
Throws:
ClassNotFoundException

_getValidRoles

private static Vector _getValidRoles(Class a_fromClass,
                                     Class a_toClass,
                                     Class a_linkClass,
                                     int a_fromToRole,
                                     Locale a_locale)

compareRole

public boolean compareRole(String a_fromClass,
                           String a_toClass,
                           String a_linkClass,
                           String a_role,
                           int compareRole,
                           Locale a_locale)

isSwappable

public static boolean isSwappable(String a_fromClass,
                                  String a_toClass,
                                  String a_linkClass)
                           throws WTException
Throws:
WTException

_isSwappable

public static boolean _isSwappable(String a_fromClass,
                                   String a_toClass,
                                   String a_linkClass)
                            throws WTException,
                                   ClassNotFoundException
Throws:
WTException
ClassNotFoundException

_isSwappable

private static boolean _isSwappable(Class a_fromClass,
                                    Class a_toClass,
                                    String a_linkClass)
                             throws WTException
Throws:
WTException