Oracle Content Management SDK

oracle.ifs.search
Class FolderRestrictQualification

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

public class FolderRestrictQualification
extends SearchQualification

The FolderRestrictQualification(FRQ) represents a condition to restrict the Search to a particular area of the folder Hierarchy. FRQs apply only to classes that can be foldered.

A FRQ is represented by the Search Class and a Folder. The Folder represents the root of the hierarchy under consideration. Users can also specify the depth of the Search. For e.g. a depth of 2 implies only objects that are upto 2 levels below the Start Folder should be considered. The default is to consider objects to an unlimited depth. Search class is used to specify the class that is being looked for in the folder.

Note that late binding is not supported for the specification of the starting folder. FRQs are converted into a SubSelect containing a 'connect-by' clause in SQL. Such queries are expensive, and should be used judiciously.


 //
 // Usage Examples
 //
 // Simple Folder restriction condition
 // Get all documents that are under a particular folder
 FolderRestrictQualification frq1 = new FoldereRestrictQualification();
 Folder startFolder;
 frq1.setStartFolder(startFolder);
 frq1.setSearchClassname(Document.CLASS_NAME);

 //
 // If you prefer to use the AttributeValue, then use this.
 //
 AttributeValue av = AttributeValue.newAttributeValue(startFolder); 
 frq1.setStartFolder(av);
 //
 // To search for all Public objects that are foldered,
 //
 frq1.setSearchClassName(PublicObject.CLASS_NAME);

 

See Also:
Serialized Form

Fields inherited from class oracle.ifs.search.SearchQualification
LATE_BIND_OPER
 
Constructor Summary
FolderRestrictQualification()
          Constructs a FolderRestrictQualification.
 
Method Summary
 java.lang.String getSearchClassname()
          Returns the name of the search class.
 Folder getStartingFolder(LibrarySession session)
          Returns the start folder
 boolean isMultiLevel()
          Return whether the search is for items directly in the starting folder, or at any level below the starting folder.
 void setMultiLevel(boolean multiLevel)
          Sets whether the search is for items directly in the starting folder, or at any level below the starting folder.
 void setSearchClassname(java.lang.String className)
          Sets the SearchClass.
 void setStartFolder(AttributeValue av)
          Sets the startFolder.
 void setStartFolder(Folder folder)
          Sets the startFolder.
 
Methods inherited from class oracle.ifs.search.SearchQualification
clone
 

Constructor Detail


FolderRestrictQualification

public FolderRestrictQualification()
Constructs a FolderRestrictQualification. The search depth is set to null, implying searching the entire hierarchy. There are no defaults for Class & StartFolder.
Method Detail

setSearchClassname

public void setSearchClassname(java.lang.String className)
Sets the SearchClass. ClassName should be a valid iFS class. A null Class is taken to mean, use the first Result Class of the SearchSpecification. If the class is a FOLDER, then current folder will also be returned in the result.
Parameters:
className - The class of the attribute
See Also:
SearchSpecification, SearchClassSpecification

getSearchClassname

public java.lang.String getSearchClassname()
Returns the name of the search class.
Returns:
search class.

setStartFolder

public void setStartFolder(AttributeValue av)
                    throws IfsException
Sets the startFolder. AttributeValue should encapsulate a folder object.
Parameters:
value - the start Folder.
Throws:
IfsException - 22002 if value is null.

setStartFolder

public void setStartFolder(Folder folder)
                    throws IfsException
Sets the startFolder.
Parameters:
value - the start Folder.
Throws:
IfsException - 22002 if value is null.

getStartingFolder

public Folder getStartingFolder(LibrarySession session)
                         throws IfsException
Returns the start folder
Parameters:
session - LibrarySession
Returns:
start folder
Throws:
IfsException - if the operation fails

setMultiLevel

public void setMultiLevel(boolean multiLevel)
                   throws IfsException
Sets whether the search is for items directly in the starting folder, or at any level below the starting folder.
Parameters:
multiLevel - if true, the search is for any level; if false, the search is only for items directly in the starting folder.

isMultiLevel

public boolean isMultiLevel()
Return whether the search is for items directly in the starting folder, or at any level below the starting folder.
Returns:
true if search is for any level, and false if the search is only for items directly in the starting folder.

Oracle Content Management SDK

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