|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.search.SearchQualification | +--oracle.ifs.search.JoinQualification
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();
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 |
public JoinQualification()
Method Detail |
public void setLeftAttribute(java.lang.String className, java.lang.String attrName)
className
- The class of the attributeattrName
- The joining AttributeSearchSpecification
,
SearchClassSpecification
public void setRightAttribute(java.lang.String className, java.lang.String attrName)
className
- The class of the attributeattrName
- The joining AttributeSearchSpecification
,
SearchClassSpecification
public java.lang.String getLeftAttributeName() throws IfsException
IfsException
- if the operation failspublic java.lang.String getRightAttributeName() throws IfsException
IfsException
- if the operation failspublic java.lang.String getLeftAttributeClassname() throws IfsException
IfsException
- if the operation failspublic java.lang.String getRightAttributeClassname() throws IfsException
IfsException
- if the operation failspublic java.lang.Object clone()
clone
in class SearchQualification
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |