oracle.ifs.search
Class FreeFormQualification
java.lang.Object
|
+--oracle.ifs.search.SearchQualification
|
+--oracle.ifs.search.FreeFormQualification
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class FreeFormQualification
- extends SearchQualification
The FreeFormQualification provides a hook for knowledgable & admin users.
Users can specify any sql expression, which is integrated into the Search.
The provided expression is not parsed in any way, so users must provide
the exact sql.
Since the sql generated for searches always uses table aliases, for searches
with FreeFormQualifiers you must provide class aliases in the SearchClassSpecification.
In non admin mode the sqlString
cannot contain references to unsecure database objects. This is to
prevent users from bypassing the security system. But admin users can setup
SearchObjects that contain FreeFormQualifiers and give access to normal users
to execute them.
Currently FreeFormQualifiers don't support late binding. Hence the sqlString cannot
contain '?'.
//
// Usage Examples
//
//
// looking for CONTENTOBJECTS which are greater than the average
// content size
//
FreeFormQualification ffq= new FreeFormQualification();
String sqlExpression = "co.contentsize > " + "(select avg(contentsize) " +
"from odm_contentobject c, odm_document d where c.id = d.contentobject)");
ffq.setSqlExpression(sqlExpression);
- See Also:
- Serialized Form
Method Summary |
java.lang.String |
getSQLExpression()
Gets the SQL expression of this object. |
void |
setSqlExpression(java.lang.String sqlExpression)
Sets the SQL expression for this object. |
FreeFormQualification
public FreeFormQualification()
throws IfsException
- Constructs a FreeFormQualification. SQL expression needs to be
set before using this object in search.
- Throws:
IfsException
- if the operation fails
setSqlExpression
public void setSqlExpression(java.lang.String sqlExpression)
throws IfsException
- Sets the SQL expression for this object.
- Parameters:
SQL
- expression for this qualification- Throws:
IfsException
- if the operation fails
getSQLExpression
public java.lang.String getSQLExpression()
throws IfsException
- Gets the SQL expression of this object.
- Returns:
- SQL expression of this object.
- Throws:
IfsException
- if the operation fails
(c) 2002 Copyright Oracle Corporation. All rights reserved.