public class FolderRestrictQualification extends SearchQualification
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);
Modifier and Type | Field and Description |
---|---|
protected static String |
BASE_INCLUSION_CLASS
Base Relationship Class.
|
protected static String |
INCLUSION_CLASS
Folder Relationship class.
|
protected String |
m_Class
Search Class.
|
protected Integer |
m_MaxLevels
Specifies how deep should the hierarchy be traversed.
|
protected AttributeValue |
m_StartFolderAttributeValue
For backward compatibility, the Startng folder can be
specified as an AttributeValue, which gets validated later.
|
protected Long |
m_StartFolderId
Id of Specified Root of Search Hierarchy.
|
LATE_BIND_OPER
Constructor and Description |
---|
FolderRestrictQualification()
Constructs a FolderRestrictQualification.
|
Modifier and Type | Method and Description |
---|---|
protected void |
accept(oracle.ifs.search.SearchQualificationVisitor v)
Accepts a SearchQualificationVisitor.
|
String |
getSearchClassname()
Returns the name of the search class.
|
Long |
getStartFolderId()
Returns the startFolder ID.
|
Folder |
getStartingFolder(LibrarySession session)
Returns the start folder
|
protected boolean |
isLateBound()
Checks if Qualification is Late Bound.
|
boolean |
isMultiLevel()
Return whether the search is for items directly in the starting folder,
or at any level below the starting folder.
|
protected void |
resolveStartFolder(LibrarySession session)
Resolve the startFolder.
|
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(String className)
Sets the SearchClass.
|
void |
setStartFolder(AttributeValue av)
Sets the startFolder.
|
void |
setStartFolder(Folder folder)
Sets the startFolder.
|
clone
protected static String INCLUSION_CLASS
protected static String BASE_INCLUSION_CLASS
protected String m_Class
protected Long m_StartFolderId
protected AttributeValue m_StartFolderAttributeValue
protected Integer m_MaxLevels
public FolderRestrictQualification()
public void setSearchClassname(String className)
className
- The class of the attributeSearchSpecification
,
SearchClassSpecification
public String getSearchClassname()
public void setStartFolder(AttributeValue av) throws IfsException
av
- the start Folder.IfsException
- 22002 if value is null.public void setStartFolder(Folder folder) throws IfsException
folder
- the start Folder.IfsException
- 22002 if value is null.public Folder getStartingFolder(LibrarySession session) throws IfsException
session
- LibrarySessionIfsException
- if the operation failspublic Long getStartFolderId() throws IfsException
IfsException
protected void resolveStartFolder(LibrarySession session) throws IfsException
session
- the sessionIfsException
public void setMultiLevel(boolean multiLevel) throws IfsException
multiLevel
- if true, the search is for any level; if false,
the search is only for items directly in the
starting folder.IfsException
public boolean isMultiLevel()
protected boolean isLateBound()
isLateBound
in class SearchQualification
protected void accept(oracle.ifs.search.SearchQualificationVisitor v) throws IfsException
accept
in class SearchQualification
v
- SearchQualificationVisitorIfsException
- thrown if Visitor code throws.Copyright © 2023. All rights reserved.