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 SearchSpecification

    java.lang.Object

      |

      +--oracle.ifs.search.SearchSpecification

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

Direct Known Subclasses:
  AttributeSearchSpecification

public abstract class SearchSpecification
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A SearchSpecification defines a Search. It contains all the elements that define a Search, namely SearchClassSpecification, SearchSortSpecification and SearchQualification. The Search and SearchObject deal with SearchSpecification objects. Currently there are two kinds of SearchSpecifications AttributeSearchSpecifications and ContextSearchSpecifications.

Below is an example of how to do a simple content search, using a ContextSearchSpecification.

>      // 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);
>      //
>      // 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( "?" );
>      cq.setName(ctxClauseName[0]);
>      //
>      // now join with CONTENTOBJECT
>      JoinQualification jq = new JoinQualification();
>      jq.setLeftAttribute("DOCUMENT", "CONTENTOBJECT");
>      jq.setRightAttribute("CONTENTOBJECT", null);
>      //
>      SearchClause sc = new SearchClause( cq, jq, SearchClause.AND );
>      //
>      ContextSearchSpecification cp = new ContextSearchSpecification();
>      cp.setContextClassname("CONTENTOBJECT");
>      cp.setSearchClassSpecification(new SearchClassSpecification(new String[]
>                             {"DOCUMENT", "CONTENTOBJECT"}));
>      cp.setSearchQualification(sc);
>      cp.setSearchSortSpecification(sortSpec);
>      //
>      Search s = new Search(sess, cp);
>      //
>      AttributeValue[] bindValue = new AttributeValue[1];
>      bindValue[0] = AttributeValue.newAttributeValue( queryExpr );
>      //
>      s.open(bindValue);
>      ...
>      s.close();

See Also:
  `AttributeSearchSpecification`, `ContextSearchSpecification`, `Search`, `SearchObject`, Serialized Form

Method Summary
`java.lang.Object` | `clone()` Returns a clone of this SearchQualification.
`abstract java.lang.String[]` | `getResultClasses()` Returns all Result Classes
`abstract SearchClassSpecification` | `getSearchClassSpecification()` Returns the SearchClassSpecification associated with this SearchSpecification.

Method Detail

### getResultClasses

    public abstract java.lang.String[] getResultClasses()

  Returns all Result Classes

### getSearchClassSpecification

    public abstract SearchClassSpecification getSearchClassSpecification()
                                                                  throws IfsException

  Returns the SearchClassSpecification associated with this SearchSpecification.
  Returns:
    SearchClassSpecification associated with this SearchSpecification.
  Throws:
    `IfsException` - if the operation fails

### clone

    public java.lang.Object clone()

  Returns a clone of this SearchQualification.
  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    Return a clone of this SearchQualification.

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