|
Oracle Content Management SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.search.SearchQualification | +--oracle.ifs.search.PropertyQualification
The PropertyQualification(PQ) represents a condition on a Class Property. Conecptually PropertyQualifications are similar to AttributeQualifications, except that a PQ is applied on an Object's Property instead of an Attribute.
A PropertyQualification consists of a search Class, a property name, a search Value and a comparison operator. The comparison value must be specified as a AttributeValue. For late Binding, the setlateBound function must be called, with dataType of the property specified. This is required there are no rules for mapping property names to dataTypes. Each object is free to use a property name as it chooses.
Roughly, a PropertyQualification translates to the SQL condition
exists (select list of proeprties where name = ' Specified Name' and type = 'Specified Type'
and value 'oper' 'Specified Comparison Value'
// // Usage Examples // Search for documents that are having a property value of RED // in a property called "color" PropertyQualification pq = new PropertyQualification(); pq.setClassname(Document.CLASS_NAME); pq.setPropertyName("color"); // Note that the operators used here are same as that in AttributeQualification. pq.setOperatorType(AttributeQualification.EQUAL); pq.setValue(AttributeValue.newAttributeValue("RED")); pq.setCaseIgnored(ignoreCase); // Using a date type attribute value // This looks for a particular date in a property containing Dates. PropertyQualification pq = new PropertyQualification(); pq.setClassname(Document.CLASS_NAME); pq.setPropertyName("expire-date"); pq.setOperatorType(AttributeQualification.EQUAL); pq.setValue(AttributeValue.newAttributeValue(new GregorianCalendar(1995, 0, 15).getTime())); pq.setDateComparisonLevel(AttributeQualification.DATE_COMP_MONTH); // Using DOCUMENT(or any object type) type attribute value // This looks for a particular document in a property containing DOCUMENT objects PropertyQualification pq = new PropertyQualification(); pq.setClassname(Document.CLASS_NAME); pq.setPropertyName("related-docs"); pq.setOperatorType(AttributeQualification.EQUAL); pq.setValue(AttributeValue.newAttributeValue(new Document[] {d})); // Using late bound attribute value with a property search AttributeValue srchDate = AttributeValue.newAttributeValue(new GregorianCalendar(1995, 0, 1).getTime()); PropertyQualification pq = new PropertyQualification(); pq.setClassname(Document.CLASS_NAME); pq.setPropertyName("expire-date"); pq.setOperatorType(AttributeQualification.EQUAL); pq.setLateBoundDataType(srchDate.getDataType());
Fields inherited from class oracle.ifs.search.SearchQualification |
LATE_BIND_OPER |
Constructor Summary | |
PropertyQualification()
Constructs a PropertyQualification. |
Method Summary | |
java.lang.String |
getClassname()
Returns the search class for this qualification object. |
int |
getDateComparisonLevel()
Returns the date comparison level. |
int |
getLateBoundDataType()
Get the data type if the qualification is late bound. |
int |
getOperatorType()
Gets the operator for this qualification. |
java.lang.String |
getPropertyName()
Return the name of the property being searched. |
AttributeValue |
getValue()
Return the comparison value. |
boolean |
isCaseIgnored()
Returns true if this object is set to be case insensitive. |
boolean |
isLateBound()
Returns true if the qualification is late bound. |
void |
setCaseIgnored(boolean value)
Sets up case sensitive behavior for this object. |
void |
setClassname(java.lang.String clss)
Set the Search Classname. |
void |
setDateComparisonLevel(int df)
Sets the date comparison value. |
void |
setLateBoundDataType(int dataType)
Set Qualification as Late Bound. |
void |
setOperatorType(int oper)
Sets the comparision operator. |
void |
setOperatorType(java.lang.String oper)
Sets the comparison operator. |
void |
setPropertyName(java.lang.String name)
Set the name of property used in the condition. |
void |
setValue(AttributeValue av)
Sets the comparison value. |
Methods inherited from class oracle.ifs.search.SearchQualification |
clone |
Constructor Detail |
public PropertyQualification() throws IfsException
Method Detail |
public void setClassname(java.lang.String clss) throws IfsException
Class should be a valid iFS PublicObject or SubClass or an Alias. A null class is taken to mean, use the first Result Class of the SearchSpecification.
clss
- Search Class.IfsException
- if the operation failsSearchClassSpecification
public java.lang.String getClassname() throws IfsException
IfsException
- if the operation failspublic void setPropertyName(java.lang.String name) throws IfsException
name
- name of searched property.public java.lang.String getPropertyName()
public void setValue(AttributeValue av) throws IfsException
av
- the comparison value specified as an AttrbuteValueIfsException
- 22002 if av is null.public AttributeValue getValue()
public void setLateBoundDataType(int dataType) throws IfsException
dataType
- property's dataTypeIfsException
- if the operation failspublic int getLateBoundDataType() throws IfsException
IfsException
- if the operation failspublic boolean isLateBound()
isLateBound
in class SearchQualification
public void setOperatorType(java.lang.String oper) throws IfsException
oper
- comparison operator string; this should be
one of =, <, <=, >, >=, !=, <>, IS NULL,
IS NOT NULL, LIKE or NOT LIKE.IfsException
- if specified operator is not supported.AttributeQualification
public void setOperatorType(int oper) throws IfsException
oper
- comaprison operator must be one of,
AttributeQualification.EQUAL
,
AttributeQualification.GREATER_THAN
,
AttributeQualification.GREATER_THAN_EQUAL
,
AttributeQualification.IS_NOT_NULL
,
AttributeQualification.IS_NULL
,
AttributeQualification.LESS_THAN
,
AttributeQualification.LESS_THAN_EQUAL
,
AttributeQualification.LIKE
IfsException
- if specified operator is not supported.AttributeQualification
public int getOperatorType() throws IfsException
public void setDateComparisonLevel(int df) throws IfsException
df
- date comparison level. should be one of
AttributeQualification.DATE_COMP_DAY,
AttributeQualification.DATE_COMP_MONTH,
AttributeQualification.DATE_COMP_YEAR,
AttributeQualification.DATE_COMP_SEC,
AttributeQualification.DATE_COMP_MIN,
AttributeQualification.DATE_COMP_HOURIfsException
- if the operation failsAttributeQualification
public void setCaseIgnored(boolean value) throws IfsException
IfsException
- if the operation failspublic int getDateComparisonLevel()
public boolean isCaseIgnored()
|
Oracle Content Management SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |