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 SearchClassSpecification

    java.lang.Object

      |

      +--oracle.ifs.search.SearchClassSpecification

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

public final class SearchClassSpecification
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

A SearchClassSpecification represents the from and select clauses of select statement. In iFS Searches always return objects and not attributes. So the select list is a list of classes and not attributes.

For each Searched class users can specify whether subclass objects should be included in the search. Users can also specify whether deleted objects of the class should be included. The default behavior is to include subclass objects and to exclude deleted objects.

Users can also specify aliases for the searched classes. This is useful on joins on the same class. If a user specifies an alias for a class, then the alias must be used in place of the class in all the Qualifiers, SortSpecifications, and ResultClass lists. Using the className in place of the alias will cause IfsException-22701 to be thrown.

The aliases must be unique within a SearchClassSpecification. Also the same class cannot be specified more than once without an alias. This will cause IfsException-22700 to be thrown. ``

>      // Code Sample
>      //
>      // Following code constructs a SearchClassSpecification of the form
>      // SELECT Document, Category
>      // FROM Document, Category, Folder
>      //
>      // Array of class names
>      String [] classNames = new String[] {"Document", "Category", "Folder"}
>      //
>      // Construct the SearchClassSpec
>      SearchClassSpecification scp = new SearchClassSpecification(classNames);
>      //
>      // Add Result Classes. These are Document and Category.
>      //
>      scp.addResultClass("Document");
>      scp.addResultClass("Category");

See Also:
  Serialized Form

Constructor Summary
`SearchClassSpecification()` Constructs an empty SearchClassSpecification.
`SearchClassSpecification(java.lang.String[] sClasses)` construct SearchClassSpecification, initializing with the set of classes Calls SearchClassSpecification(sClasses, null, null, null)
`SearchClassSpecification(java.lang.String[] sClasses, boolean[] delBehavior, boolean[] recBehavior)` construct SearchClassSpecification, initializing with the set of classes, delete behavior, and recursive behavior.
`SearchClassSpecification(java.lang.String[] sClasses, java.lang.String[] sAliases, boolean[] delBehavior, boolean[] recBehavior)` construct SearchClassSpecification, initializing with the set of classes, aliases, delete behavior, and recursive behavior.

Method Summary
`void` | `addResultClass(java.lang.String name)` Add name to the ResultClass list.
`void` | `addSearchClass(java.lang.String sClass)` Adds the class to the list of Searched Classes.
`void` | `addSearchClass(java.lang.String sClass, java.lang.String sAlias)` Adds the class to the list of Searched Classes.
`void` | `addSearchClasses(java.lang.String[] sClasses)` Add search classes to list of classes.
`void` | `addSearchClasses(java.lang.String[] sClasses, java.lang.String[] sAliases)` add search classes to list of classes.
`java.lang.Object` | `clone()` Returns a clone of this SearchClassSpecification.
`boolean[]` | `getRecursiveBehavior()` Returns recursive behavior of classes
`java.lang.String[]` | `getResultClassenames()` Gets list of result classes
`java.lang.String[]` | `getSearchClassAliases()` Gets list of search aliases.
`java.lang.String[]` | `getSearchClassnames()` Returns list of search classes

Constructor Detail

### SearchClassSpecification

    public SearchClassSpecification()
                             throws IfsException

  Constructs an empty SearchClassSpecification. Class lists are empty.
  Throws:
    `IfsException` - if operation fails.

### SearchClassSpecification

    public SearchClassSpecification(java.lang.String[] sClasses)
                             throws IfsException

  construct SearchClassSpecification, initializing with the set of classes Calls SearchClassSpecification(sClasses, null, null, null)
  Parameters:
    `searchClasses` - list of classes to search over.
  Throws:
    `IfsException` - if operation fails.

### SearchClassSpecification

    public SearchClassSpecification(java.lang.String[] sClasses,
                                    boolean[] delBehavior,
                                    boolean[] recBehavior)
                             throws IfsException

  construct SearchClassSpecification, initializing with the set of classes, delete behavior, and recursive behavior. Calls SearchClassSpecification(sClasses, null, delBehavior, recBehavior)
  Parameters:
    `searchClasses` - list of classes to search over.
    `delBehavior` - array of boolean describing delete behavior for each class.
    `recBehavior` - array of boolean describing recursive behavior for each class.
  Throws:
    `IfsException` - if operation fails.

### SearchClassSpecification

    public SearchClassSpecification(java.lang.String[] sClasses,
                                    java.lang.String[] sAliases,
                                    boolean[] delBehavior,
                                    boolean[] recBehavior)
                             throws IfsException

  construct SearchClassSpecification, initializing with the set of classes, aliases, delete behavior, and recursive behavior. Calls addSearchClasses(sClasses, sAliases, delBehavior, recBehavior)
  Parameters:
    `sClasses` - list of classes to search over.
    `sAliases` - Aliases for the classes
    `delBehavior` - array of boolean describing delete behavior for each class.
    `recBehavior` - array of boolean describing recursive behavior for each class.
  Throws:
    `IfsException` - if operation fails.

Method Detail

### addSearchClasses

    public void addSearchClasses(java.lang.String[] sClasses)
                          throws IfsException

  Add search classes to list of classes. Calls addSearchClass for each entry in the array.
  Parameters:
    `sClasses` - list of classes.
  Throws:
    `IfsException` - if the operation fails

### addSearchClasses

    public void addSearchClasses(java.lang.String[] sClasses,
                                 java.lang.String[] sAliases)
                          throws IfsException

  add search classes to list of classes. Calls addSearchClass for each entry in the array.
  Parameters:
    `sClasses` - list of classes.
    `sAliases` - Aliases for the classes. For unspecified values, alias is assumed to be null.
  Throws:
    `IfsException` - if operation fails.

### addSearchClass

    public void addSearchClass(java.lang.String sClass)
                        throws IfsException

  Adds the class to the list of Searched Classes.
  Parameters:
    `sClass` - the iFS class being searched
  Throws:
    `IfsException` - if operation fails.

### addSearchClass

    public void addSearchClass(java.lang.String sClass,
                               java.lang.String sAlias)
                        throws IfsException

  Adds the class to the list of Searched Classes.
  Parameters:
    `sClass` - the iFS class being searched
    `sAlias` - the Alias for the Class, if this is null an internal alias is generated. User must use ClassName in Quals, SortSpec etc.
  Throws:
    `IfsException` - 22702 if sClass is null.

### getSearchClassnames

    public java.lang.String[] getSearchClassnames()

  Returns list of search classes
  Returns:
    list of search classes

### getSearchClassAliases

    public java.lang.String[] getSearchClassAliases()
                                             throws IfsException

  Gets list of search aliases.
  Returns:
    list of search aliases.
  Throws:
    `IfsException` - if the operation fails

### getRecursiveBehavior

    public boolean[] getRecursiveBehavior()

  Returns recursive behavior of classes
  Returns:
    recursive behavior of classes

### addResultClass

    public void addResultClass(java.lang.String name)
                        throws IfsException

  Add name to the ResultClass list. Name must be a user specified alias or classname.
  Parameters:
    `name` - For classes w/o aliases, this should be the className; o.w. this should be the alias.
  Throws:
    `IfsException` - 22701 if name is not valid

### getResultClassenames

    public java.lang.String[] getResultClassenames()
                                            throws IfsException

  Gets list of result classes
  Returns:
    list of result classes
  Throws:
    `IfsException` - if the operation fails

### clone

    public java.lang.Object clone()

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

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