Oracle Content Management SDK

oracle.ifs.search
Class JoinQualification

java.lang.Object
  |
  +--oracle.ifs.search.SearchQualification
        |
        +--oracle.ifs.search.JoinQualification
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class JoinQualification
extends SearchQualification

The JoinQualification represents a join condition. A join condition has two attributes, which are tested for equality. There is no support for joining on other comparison operators. There is no support for joining on array type Attributes, and Class Properties.

A null Attribute Name implies joining on the Object's id. When you have more than one search class in your search specification, they all must be joined using appropriate join conditions. Failure to do so will result in cartesian join of the search classes for which there is no join condition.

Below is an example of constructing JoinQualification. For a example with a complete search tree, look at javadoc for AttributeSearchSpecification or ContextSearchSpecification.


 //
 // Usage Examples
 //
 //
 // Joining on a scalar attribute
 // Joining Document with DirectoryUser
 // Generates SQL of the form DOCUMENT.Owner = DIRECTORYUSER.Id
 JoinQualification jq1 = new JoinQualification();
 jq1.setLeftAttribute(Document.CLASS_NAME, PublicObject.OWNER_ATTRIBUTE);
 // Note the 'null' being passed for attribute. That implies
 // joining on ID.
 jq2.setRightAttribute(DirectoryUser.CLASS_NAME, null);

 

See Also:
Serialized Form

Fields inherited from class oracle.ifs.search.SearchQualification
LATE_BIND_OPER
 
Constructor Summary
JoinQualification()
          Constructs an JoinQualification.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this SearchQualification.
 java.lang.String getLeftAttributeClassname()
          Gets the classname of left side of this join qualification.
 java.lang.String getLeftAttributeName()
          Gets the unqualified attribute name of the left side of this join qualification.
 java.lang.String getRightAttributeClassname()
          Gets the classname of right side of this join qualification.
 java.lang.String getRightAttributeName()
          Gets the unqualified attribute name of the right side of this join qualification.
 void setLeftAttribute(java.lang.String className, java.lang.String attrName)
          Set left hand side Join Attribute.
 void setRightAttribute(java.lang.String className, java.lang.String attrName)
          Set right hand side Join Attribute.
 

Constructor Detail


JoinQualification

public JoinQualification()
Constructs an JoinQualification. There are no defaults for LHS, RHS Classes and Attributes.
Method Detail

setLeftAttribute

public void setLeftAttribute(java.lang.String className,
                             java.lang.String attrName)
Set left hand side Join Attribute. A null attrName implies that the Object's id must be used in the Join. A null Class is taken to mean, use the first Result Class of the SearchSpecification. Otherwise the className should be a valid iFS class, and attrName should be an attribute of the class.
Parameters:
className - The class of the attribute
attrName - The joining Attribute
See Also:
SearchSpecification, SearchClassSpecification

setRightAttribute

public void setRightAttribute(java.lang.String className,
                              java.lang.String attrName)
Set right hand side Join Attribute. A null attrName implies that the Object's id must be used in the Join. A null Class is taken to mean, use the first Result Class of the SearchSpecification. Otherwise the className should be a valid iFS class, and attrName should be an attribute of the class.
Parameters:
className - The class of the attribute
attrName - The joining Attribute
See Also:
SearchSpecification, SearchClassSpecification

getLeftAttributeName

public java.lang.String getLeftAttributeName()
                                      throws IfsException
Gets the unqualified attribute name of the left side of this join qualification.
Returns:
unqualified attribute name of left hand side
Throws:
IfsException - if the operation fails

getRightAttributeName

public java.lang.String getRightAttributeName()
                                       throws IfsException
Gets the unqualified attribute name of the right side of this join qualification.
Returns:
unqualified attribute name of right hand side
Throws:
IfsException - if the operation fails

getLeftAttributeClassname

public java.lang.String getLeftAttributeClassname()
                                           throws IfsException
Gets the classname of left side of this join qualification.
Returns:
classname of left hand side
Throws:
IfsException - if the operation fails

getRightAttributeClassname

public java.lang.String getRightAttributeClassname()
                                            throws IfsException
Gets the classname of right side of this join qualification.
Returns:
classname of right hand side
Throws:
IfsException - if the operation fails

clone

public java.lang.Object clone()
Returns a clone of this SearchQualification.
Overrides:
clone in class SearchQualification
Returns:
Return a clone of this JoinQualification.

Oracle Content Management SDK

(c) 2002 Copyright Oracle Corporation. All rights reserved.