wt.query.qml
Class JoinInfo

java.lang.Object
  extended bywt.query.qml.JoinInfo
Direct Known Subclasses:
LinkJoinInfo, ReferenceJoinInfo

public abstract class JoinInfo
extends Object


Field Summary
static String LATEST
           
private static LinkJoinInfo linkJoinInfo
           
static String OBJECT_ID
           
static String OBJECT_REFERENCE
           
private static ReferenceJoinInfo referenceJoinInfo
           
static String VERSION_ID
           
static String VERSION_REFERENCE
           
 
Constructor Summary
JoinInfo()
           
 
Method Summary
protected  Hashtable buildLinkMap(String classA, String classB, Hashtable a_linkMap, Locale a_locale)
          Builds a Hashtable of valid join classes using introspection information.
protected  Hashtable buildLinkMap(String a_classA, Vector a_classesB, Hashtable a_linkMap, Locale a_locale)
          Builds a Hashtable of valid join classes using introspection information.
protected abstract  Hashtable buildLinkMap(Vector classesA, String classB, Hashtable a_linkMap, Locale a_locale)
          Builds a Hashtable of valid join classes using introspection information.
protected abstract  Hashtable buildLinkMap(Vector a_classes, String a_classA, String a_classB, Locale a_locale)
           
protected  Hashtable buildLinkMap(Vector classesA, Vector classesB, Hashtable a_linkMap, Locale a_locale)
           
 Vector buildLinks(Vector a_classes, String a_classA, String a_classB, Locale a_locale)
           
 Vector buildLinks(Vector a_classesA, Vector a_classesB, Locale a_locale)
           
protected static Vector buildLinkVector(Hashtable a_links)
           
static LinkJoinInfo getLinkJoinInfo()
           
static ReferenceJoinInfo getReferenceJoinInfo()
           
protected static boolean isAssignableFrom(Class validClass, Vector classes)
          Checks if the class is assignable from any class in classes.
protected static boolean isAssignableFrom(Vector a_parentClasses, Class a_targetClass)
          Checks if the class is assignable from any class in classes.
protected static Vector loadClasses(Vector a_classes)
           
protected abstract  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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_ID

public static final String OBJECT_ID
See Also:
Constant Field Values

VERSION_ID

public static final String VERSION_ID
See Also:
Constant Field Values

OBJECT_REFERENCE

public static final String OBJECT_REFERENCE
See Also:
Constant Field Values

VERSION_REFERENCE

public static final String VERSION_REFERENCE
See Also:
Constant Field Values

LATEST

public static final String LATEST
See Also:
Constant Field Values

linkJoinInfo

private static final LinkJoinInfo linkJoinInfo

referenceJoinInfo

private static final ReferenceJoinInfo referenceJoinInfo
Constructor Detail

JoinInfo

public JoinInfo()
Method Detail

getLinkJoinInfo

public static LinkJoinInfo getLinkJoinInfo()

getReferenceJoinInfo

public static ReferenceJoinInfo getReferenceJoinInfo()

buildLinks

public Vector buildLinks(Vector a_classes,
                         String a_classA,
                         String a_classB,
                         Locale a_locale)
                  throws WTException
Throws:
WTException

buildLinks

public Vector buildLinks(Vector a_classesA,
                         Vector a_classesB,
                         Locale a_locale)
                  throws WTException
Throws:
WTException

validateLink

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

buildLinkMap

protected Hashtable buildLinkMap(Vector classesA,
                                 Vector classesB,
                                 Hashtable a_linkMap,
                                 Locale a_locale)
                          throws WTException
Throws:
WTException

buildLinkMap

protected Hashtable buildLinkMap(String classA,
                                 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 joinassociations between classA and classB.

Parameters:
classA - class 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

protected Hashtable buildLinkMap(String a_classA,
                                 Vector a_classesB,
                                 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 join associations between classA and the classesB Vector.

Parameters:
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

protected abstract 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.

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

protected abstract Hashtable buildLinkMap(Vector a_classes,
                                          String a_classA,
                                          String a_classB,
                                          Locale a_locale)
                                   throws WTException
Throws:
WTException

postProcessLinkMap

protected abstract Hashtable postProcessLinkMap(Hashtable a_linkMap,
                                                Locale a_locale)
                                         throws WTException
Perform any necessary link map post-processing.

Throws:
WTException

buildLinkVector

protected static Vector buildLinkVector(Hashtable a_links)

loadClasses

protected static Vector loadClasses(Vector a_classes)
                             throws ClassNotFoundException
Throws:
ClassNotFoundException

isAssignableFrom

protected static boolean isAssignableFrom(Class validClass,
                                          Vector classes)
Checks if the class is assignable from any class in classes.

Parameters:
validClass - class to check
classes - list of classes to validate against
Returns:
true if the class is assignable from any class in classes.

isAssignableFrom

protected static boolean isAssignableFrom(Vector a_parentClasses,
                                          Class a_targetClass)
Checks if the class is assignable from any class in classes.

Parameters:
a_parentClasses - Vector of parent classes to check
a_targetClass - class to check against
Returns:
true if any of the parent classes is assignable from the target class