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

## oracle.ifs.search
Class PropertyQualification

    java.lang.Object
      oracle.ifs.search.SearchQualification
          oracle.ifs.search.PropertyQualification

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

    public class PropertyQualification

extends SearchQualification

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());

See Also:
  Serialized Form
(Published)

Field Summary
`protected java.lang.String` | `m_Class` The Search Class.
`protected int` | `m_CompOper` The comparison operator.
`protected int` | `m_DataType` The dataType of the Attribute.
`protected int` | `m_DateCompLevel` The Date Comparison Level.
`protected java.util.Date` | `m_DateValue` The comparison value as a Date.
`protected boolean` | `m_IgnoreCase` IgnoreCase flag.
`protected boolean` | `m_IsLateBound` Is the Qualification dynamically bound?
`protected java.lang.String` | `m_PropertyName` The property on which the condition is to be applied.
`protected AttributeValue` | `m_Value` The comparison value.
`static java.lang.String` | `PROPERTY_CLASS` The name of the Property Class.
`static java.lang.String` | `PROPERTY_COLUMN_IN_LIBRARYOBJECT_CLASS` The name of the joinig attribute on the LibraryObject Class Table
`static java.lang.String` | `PROPERTY_COLUMN_IN_PROPERTY_CLASS` The name of the joining attribute on the Property Class Table

Fields inherited from class oracle.ifs.search.SearchQualification
`LATE_BIND_OPER`

Constructor Summary
`PropertyQualification()` Constructs a PropertyQualification.

Method Summary
`protected void` | `accept(oracle.ifs.search.SearchQualificationVisitor v)` Accepts a SearchQualificationVisitor.
`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.
`static S_Attribute` | `propertyAttribute(S_LibrarySession sess, int attributeDataType)` Used to get the Attribute on the Property Class for the specified dataType.
`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.
`protected void` | `validateDataType(int dataType)` Checks if dataType is a valid iFS type.

Methods inherited from class oracle.ifs.search.SearchQualification
`clone`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROPERTY_CLASS

    public static final java.lang.String PROPERTY_CLASS

  Description copied from class: `PropertyQualification`
  The name of the Property Class.

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_COLUMN_IN_PROPERTY_CLASS

    public static final java.lang.String PROPERTY_COLUMN_IN_PROPERTY_CLASS

  Description copied from class: `PropertyQualification`
  The name of the joining attribute on the Property Class Table

  See Also:
    Constant Field Values
  (Unpublished)

### PROPERTY_COLUMN_IN_LIBRARYOBJECT_CLASS

    public static final java.lang.String PROPERTY_COLUMN_IN_LIBRARYOBJECT_CLASS

  Description copied from class: `PropertyQualification`
  The name of the joinig attribute on the LibraryObject Class Table

  See Also:
    Constant Field Values
  (Unpublished)

### m_Class

    protected java.lang.String m_Class

  Description copied from class: `PropertyQualification`
  The Search Class. defaults to the first Result Class of the SearchSpecification.

  See Also:
    `SearchClassSpecification`
  (Unpublished)

### m_PropertyName

    protected java.lang.String m_PropertyName

  Description copied from class: `PropertyQualification`
  The property on which the condition is to be applied.

  (Unpublished)

### m_Value

    protected AttributeValue m_Value

  Description copied from class: `PropertyQualification`
  The comparison value.

  (Unpublished)

### m_DateValue

    protected java.util.Date m_DateValue

  Description copied from class: `PropertyQualification`
  The comparison value as a Date.

  (Unpublished)

### m_DataType

    protected int m_DataType

  Description copied from class: `PropertyQualification`
  The dataType of the Attribute. See Attribute for a list of valid types.

  See Also:
    `Attribute`
  (Unpublished)

### m_IsLateBound

    protected boolean m_IsLateBound

  Description copied from class: `PropertyQualification`
  Is the Qualification dynamically bound?

  (Unpublished)

### m_CompOper

    protected int m_CompOper

  Description copied from class: `PropertyQualification`
  The comparison operator. These are the same as the AttributeQualification operators.

  See Also:
    `AttributeQualification`
  (Unpublished)

### m_DateCompLevel

    protected int m_DateCompLevel

  Description copied from class: `PropertyQualification`
  The Date Comparison Level. Based on this, dates are compared to the year, month, day, hour, minute or second. This has the same semantics as on AttributeQualification.

  See Also:
    `AttributeQualification`
  (Unpublished)

### m_IgnoreCase

    protected boolean m_IgnoreCase

  Description copied from class: `PropertyQualification`
  IgnoreCase flag. If this is set to true, then STRING based searches will not be case sensitive.

  See Also:
    `AttributeQualification`
  (Unpublished)

Constructor Detail

### PropertyQualification

    public PropertyQualification()
                          throws IfsException

  Constructs a PropertyQualification. The Date Comparison Level is set to DATE_COMP_SEC, and the comparison operator is set to EQUAL. There are no defaulst for the propertyName, and Search Class.

  Throws:
    `IfsException`
  (Published)

Method Detail

### propertyAttribute

    public static final S_Attribute propertyAttribute(S_LibrarySession sess,
                                                      int attributeDataType)
                                               throws IfsException

  Description copied from class: `PropertyQualification`
  Used to get the Attribute on the Property Class for the specified dataType.

  Parameters:
    `sess` - The LibrarySession to use for retriving Property Class information
    `attributeDataType` - the type of Attribute. Must be a valid iFS type.
  Returns:
    Property Attribute for the specified type
  Throws:
    `IfsException` - 10400 if type is not valid. or IfsException if retrival of Property Class information from sess fails.
  (Unpublished)

### setClassname

    public void setClassname(java.lang.String clss)
                      throws IfsException

  Description copied from class: `PropertyQualification`
  Set the Search Classname.

  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.

  Parameters:
    `clss` - Search Class.
  Throws:
    `IfsException` - if the operation fails
  See Also:
    `SearchClassSpecification`
  (Published)

### getClassname

    public java.lang.String getClassname()
                                  throws IfsException

  Description copied from class: `PropertyQualification`
  Returns the search class for this qualification object.

  Returns:
    search class.
  Throws:
    `IfsException` - if the operation fails
  (Published)

### setPropertyName

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

  Description copied from class: `PropertyQualification`
  Set the name of property used in the condition. Property Name cannot be null.

  Parameters:
    `name` - name of searched property.
  Throws:
    `IfsException`
  (Published)

### getPropertyName

    public java.lang.String getPropertyName()

  Description copied from class: `PropertyQualification`
  Return the name of the property being searched.

  Returns:
    searched property.
  (Published)

### setValue

    public void setValue(AttributeValue av)
                  throws IfsException

  Description copied from class: `PropertyQualification`
  Sets the comparison value. Irrespective of value, Qualification is assumed not to be late bound. Use setLateBound to specify Qualification as Late Bound. The dataType of the specified AttributeValue is assumed to be the dataType of the property.

  Parameters:
    `av` - the comparison value specified as an AttrbuteValue
  Throws:
    `IfsException` - 22002 if av is null.
  (Published)

### getValue

    public AttributeValue getValue()

  Description copied from class: `PropertyQualification`
  Return the comparison value.

  Returns:
    comparison value.
  (Published)

### setLateBoundDataType

    public void setLateBoundDataType(int dataType)
                              throws IfsException

  Description copied from class: `PropertyQualification`
  Set Qualification as Late Bound. The dataType of the property needs to be specified. Note there are no rules for mapping property names to datatypes. A property name can be used by different objects to mean differen things.

  Parameters:
    `dataType` - property's dataType
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getLateBoundDataType

    public int getLateBoundDataType()
                             throws IfsException

  Description copied from class: `PropertyQualification`
  Get the data type if the qualification is late bound. If the qualification is not late bound, it throws IfsException.

  Returns:
    data type of this qualification if it is late bound
  Throws:
    `IfsException` - if the operation fails
  (Published)

### isLateBound

    public boolean isLateBound()

  Description copied from class: `PropertyQualification`
  Returns true if the qualification is late bound.

  Overrides:
    `isLateBound` in class `SearchQualification`
  Returns:
    whether Qualification is late bound.
  (Published)

### setOperatorType

    public void setOperatorType(java.lang.String oper)
                         throws IfsException

  Description copied from class: `PropertyQualification`
  Sets the comparison operator. This variant lets the user pass in a string to represent the operator instead on the integer.

  Parameters:
    `oper` - comparison operator string; this should be one of =, <, <=, >, >=, !=, <>, IS NULL, IS NOT NULL, LIKE or NOT LIKE.
  Throws:
    `IfsException` - if specified operator is not supported.
  See Also:
    `AttributeQualification`
  (Published)

### setOperatorType

    public void setOperatorType(int oper)
                         throws IfsException

  Description copied from class: `PropertyQualification`
  Sets the comparision operator.

  Parameters:
    `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`
  Throws:
    `IfsException` - if specified operator is not supported.
  See Also:
    `AttributeQualification`
  (Published)

### getOperatorType

    public int getOperatorType()
                        throws IfsException

  Description copied from class: `PropertyQualification`
  Gets the operator for this qualification.

  Returns:
    the operator of the Qualification.
  Throws:
    `IfsException`
  (Published)

### setDateComparisonLevel

    public void setDateComparisonLevel(int df)
                                throws IfsException

  Description copied from class: `PropertyQualification`
  Sets the date comparison value. The default is DATE_COMP_SEC. If df is not valid, date comparison level is set to the default.

  Parameters:
    `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_HOUR
  Throws:
    `IfsException` - if the operation fails
  See Also:
    `AttributeQualification`
  (Published)

### setCaseIgnored

    public void setCaseIgnored(boolean value)
                        throws IfsException

  Description copied from class: `PropertyQualification`
  Sets up case sensitive behavior for this object. If the value is true search with respect to this qualification will ignore case. Default behavior is case sensitive.

  Parameters:
    `value` - If true, the searches will be case insensitive.
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getDateComparisonLevel

    public int getDateComparisonLevel()

  Description copied from class: `PropertyQualification`
  Returns the date comparison level.

  Returns:
    date comparison level.
  (Published)

### isCaseIgnored

    public boolean isCaseIgnored()

  Description copied from class: `PropertyQualification`
  Returns true if this object is set to be case insensitive.

  Returns:
    boolean True or False.
  (Published)

### accept

    protected void accept(oracle.ifs.search.SearchQualificationVisitor v)
                   throws IfsException

  Description copied from class: `PropertyQualification`
  Accepts a SearchQualificationVisitor. Calls visitPropertyQualifier on the visitor. The code in visitPropertyQualifier is specific to the Visitor.

  Specified by:
    `accept` in class `SearchQualification`
  Parameters:
    `v` - SearchQualificationVisitor
  Throws:
    `IfsException` - thrown if Visitor code throws.
  (Unpublished)

### validateDataType

    protected void validateDataType(int dataType)
                             throws IfsException

  Description copied from class: `PropertyQualification`
  Checks if dataType is a valid iFS type.

  Parameters:
    `dataType` - int value representing a dataType.
  Throws:
    `IfsException` - 22113 if dataType is invalid.
  (Unpublished)

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