wt.epm.structure
Class Relationship.ObjectRole

java.lang.Object
  extended bywt.epm.structure.Relationship.Role
      extended bywt.epm.structure.Relationship.ObjectRole
Enclosing class:
Relationship

protected static class Relationship.ObjectRole
extends Relationship.Role


Field Summary
 
Fields inherited from class wt.epm.structure.Relationship.Role
 
Constructor Summary
protected Relationship.ObjectRole(String name, Class referencedClass)
           
 
Method Summary
 void appendJoinCriteria(QuerySpec select, Class linkClass)
          Appends a JOIN condition to input QuerySpec that joins this role of the given link class with the object class that this role references.
 void appendRoleCriteria(QuerySpec select, Class linkClass, WTCollection objects)
          Appends a seach condition to the input QuerySpec that finds all links of the given class where this role of the link references one of the objects in the given collection.
 QueryKey createQueryKey(String className, long identifier)
          Creates the appropriate type of QueryKey for this role, either an ObjectIdentifier or a VersionForeignKey.
protected  String getIdentifierName()
          Returns the logical name of the database column that holds the identifier of the object that this role references.
 int getKeyMask()
          Returns the appropriate key mask for this role.
 
Methods inherited from class wt.epm.structure.Relationship.Role
areSuitable, filterObjects, getClassName, getName, getReference, getReferencedClass, isRoleA, selectQueryKey, setObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Relationship.ObjectRole

protected Relationship.ObjectRole(String name,
                                  Class referencedClass)
Method Detail

appendJoinCriteria

public void appendJoinCriteria(QuerySpec select,
                               Class linkClass)
                        throws WTException
Description copied from class: Relationship.Role
Appends a JOIN condition to input QuerySpec that joins this role of the given link class with the object class that this role references.

Specified by:
appendJoinCriteria in class Relationship.Role
Throws:
WTException

appendRoleCriteria

public void appendRoleCriteria(QuerySpec select,
                               Class linkClass,
                               WTCollection objects)
                        throws WTException
Description copied from class: Relationship.Role
Appends a seach condition to the input QuerySpec that finds all links of the given class where this role of the link references one of the objects in the given collection.

Specified by:
appendRoleCriteria in class Relationship.Role
Throws:
WTException

createQueryKey

public QueryKey createQueryKey(String className,
                               long identifier)
                        throws WTException
Description copied from class: Relationship.Role
Creates the appropriate type of QueryKey for this role, either an ObjectIdentifier or a VersionForeignKey.

Specified by:
createQueryKey in class Relationship.Role
Throws:
WTException

getIdentifierName

protected String getIdentifierName()
Description copied from class: Relationship.Role
Returns the logical name of the database column that holds the identifier of the object that this role references.

Specified by:
getIdentifierName in class Relationship.Role

getKeyMask

public int getKeyMask()
Description copied from class: Relationship.Role
Returns the appropriate key mask for this role. A key mask determines what types of QueryKeys can be stored in a WTCollection or WTKeyedMap.

Specified by:
getKeyMask in class Relationship.Role