|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.epm.structure.Relationship.Role
Represents the Role for a Binary Link. Since a role may reference either an object or a version, there are two subclasses of Role, ObjectRole and VersionRole.
Field Summary | |
private boolean |
isRoleA
|
private String |
name
|
private Class |
referencedClass
|
Constructor Summary | |
protected |
Relationship.Role(String name,
Class referencedClass)
|
Method Summary | |
abstract 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. |
abstract 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. |
boolean |
areSuitable(WTCollection objects)
Determines whether all of the objects in the given collection are suitable for this role. |
abstract QueryKey |
createQueryKey(String className,
long identifier)
Creates the appropriate type of QueryKey for this role, either an ObjectIdentifier or a VersionForeignKey. |
WTCollection |
filterObjects(WTCollection objects)
Filters out all of the objects in the given collection are not suitable for this role. |
protected String |
getClassName()
Returns the logical name of the database column that holds the name of the class of the object that this role references. |
protected abstract String |
getIdentifierName()
Returns the logical name of the database column that holds the identifier of the object that this role references. |
abstract int |
getKeyMask()
Returns the appropriate key mask for this role. |
String |
getName()
Returns the name of this role. |
WTReference |
getReference(BinaryLink link)
For the given link, returns the object or version reference that this role holds. |
Class |
getReferencedClass()
Returns the class of object that this role references. |
boolean |
isRoleA()
Returns true if this role is Role A. |
void |
selectQueryKey(QuerySpec select,
Class linkClass)
Appends to the SELECT clause such that the identifier and class name of the object that this role references is returned by the query. |
void |
setObject(BinaryLink link,
Persistable object)
Set this role on the given link such that it references the given object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private String name
private Class referencedClass
private boolean isRoleA
Constructor Detail |
protected Relationship.Role(String name, Class referencedClass)
Method Detail |
public String getName()
public boolean isRoleA()
public Class getReferencedClass()
public WTReference getReference(BinaryLink link)
public void setObject(BinaryLink link, Persistable object)
public abstract void appendJoinCriteria(QuerySpec select, Class linkClass) throws WTException
WTException
public abstract void appendRoleCriteria(QuerySpec select, Class linkClass, WTCollection objects) throws WTException
WTException
public void selectQueryKey(QuerySpec select, Class linkClass) throws WTException
WTException
public boolean areSuitable(WTCollection objects) throws WTException
WTException
public WTCollection filterObjects(WTCollection objects) throws WTException
WTException
public abstract QueryKey createQueryKey(String className, long identifier) throws WTException
WTException
protected abstract String getIdentifierName()
protected String getClassName()
public abstract int getKeyMask()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |