Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 represents two attributes, which are tested for equality. There is no support for joining on other comparison operators. There is no support for joining on MV Attributes, and Class Properties.

A null Attribute Name implies joining on the Object's id.

Below is an example of joining across three different classes, in a mixed attribute/content search.

>      // specify sort order
>      String [] ctxClauseName = {"Test1"};     // order by SCORE
>      // set DESCENDING sort order
>      boolean [] sortOrders = {false};
>      //
>      SearchSortSpecification sortSpec =
>        new SearchSortSpecification(
>          new String[] {"DOCUMENT"},
>          new String[] {ContextQualification.ORDER_PREFIX + "." +
>                        ctxClauseName[0]}, sortOrders);
>      //
>      JoinQualification jq1 = new JoinQualification();
>      jq1.setLeftAttribute("CATEGORY", "ASSOCIATEDPUBLICOBJECT");
>      jq1.setRightAttribute("DOCUMENT", null);
>      //
>      AttributeQualification aq1 = new AttributeQualification();
>      aq1.setAttribute("CATEGORY", "NAME");
>      aq1.setOperatorType(AttributeQualification.EQUAL);
>      aq1.setValue("Business");
>      //
>      SearchClause sc = new SearchClause(jq1, aq1, SearchClause.AND);
>      //
>      JoinQualification jq2 = new JoinQualification();
>      jq2.setLeftAttribute("FORMAT", null);
>      jq2.setRightAttribute("CONTENTOBJECT", "FORMAT");
>      //
>      sc = new SearchClause(sc, jq2, SearchClause.AND);
>      //
>      JoinQualification jq3 = new JoinQualification();
>      jq3.setLeftAttribute("DOCUMENT", "CONTENTOBJECT");
>      jq3.setRightAttribute("CONTENTOBJECT", null);
>      //
>      sc = new SearchClause(sc, jq3, SearchClause.AND);
>      //
>      AttributeQualification aq2 = new AttributeQualification();
>      aq2.setAttribute("FORMAT", "NAME");
>      aq2.setOperatorType(AttributeQualification.EQUAL);
>      aq2.setValue("Text");
>      //
>      sc = new SearchClause(sc, aq2, SearchClause.AND);
>      //
>      // create a query expression using interMedia Text query syntax
>      String searchWord1 = "hierarchy";
>      String searchWord2 = "interfaces";
>      String queryOperator = " & ";
>      String queryExpr = searchWord1 + queryOperator + searchWord2;
>      //
>      // create a ContextQualification and specify the query expression
>      ContextQualification cq = new ContextQualification();
>      cq.setQuery(queryExpr);
>      cq.setName(ctxClauseName[0]);
>      //
>      // add to the SearchClause
>      sc = new SearchClause( sc, cq, SearchClause.AND );
>      //
>      SearchClassSpecification scp = new SearchClassSpecification( new String[]
>        {"DOCUMENT", "CONTENTOBJECT", "CATEGORY", "FORMAT"});
>      // we're only interested in DOCUMENT and CATEGORY objects in the result set
>      scp.addResultClass("DOCUMENT");
>      scp.addResultClass("CATEGORY");
>      //
>      ContextSearchSpecification cp = new ContextSearchSpecification();
>      cp.setContextClassname("CONTENTOBJECT");
>      cp.setSearchClassSpecification(scp);
>      cp.setSearchQualification(sc);
>      cp.setSearchSortSpecification(sortSpec);
>      //
>      Search s = new Search(sess, cp);
>      //
>      s.open();
>      ...
>      s.close();

See Also:
  Serialized Form

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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD