com.crystaldecisions.sdk.occa.report.data
Class OperatorFilterItem

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.data.FilterItem
      extended by com.crystaldecisions.sdk.occa.report.data.OperatorFilterItem
All Implemented Interfaces:
IFilterItem, IOperatorFilterItem, IClone

public class OperatorFilterItem
extends FilterItem
implements IOperatorFilterItem, IClone

This object implements an operator that is used to combine two primitive expressions in a filter's parsed formula string. For example, in the Filter object {Customer.Country} ="USA" AND {Customer.Region} ="CA", AND is an OperatorFilterItem When possible, use the IOperatorFilterItem interface to use this object.


Constructor Summary
OperatorFilterItem()
           
OperatorFilterItem(IOperatorFilterItem src)
           
 
Method Summary
 java.lang.Object clone(boolean deepClone)
           
 java.lang.String computeText()
           Returns a String representation of the field value that can be used in a report formula.
 void copyTo(java.lang.Object destObject, boolean deepCopy)
           
 java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
           For internal use only.
 java.lang.String displayText(FieldDisplayNameType displayNameType, java.util.Locale locale)
           Returns the field's value as a localized and formatted string.
 void endElement(java.lang.String eleName, java.util.Map objState)
          For internal use only.
 java.lang.String getOperator()
          Returns the type of operation being performed on the field.
 boolean hasContent(java.lang.Object srcOperatorFilterItem)
           
 void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
          For internal use only.
 void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt)
          For internal use only.
 void save(XMLWriter writer, XMLSerializationContext ctxt)
          For internal use only.
 void saveContents(XMLWriter writer, XMLSerializationContext ctxt)
          For internal use only.
 void setOperator(java.lang.String operator)
          Sets the type of operation being performed on the field.
 void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
          For internal use only.
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.data.FilterItem
doControllerModification, enumerateMembers, getControllableMixin, isDirectlyControllable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperatorFilterItem

public OperatorFilterItem(IOperatorFilterItem src)

OperatorFilterItem

public OperatorFilterItem()
Method Detail

clone

public java.lang.Object clone(boolean deepClone)
Specified by:
clone in class FilterItem

computeText

public java.lang.String computeText()
Description copied from interface: IFilterItem

Returns a String representation of the field value that can be used in a report formula. The string is not formatted or localized. The syntax will always be Crystal syntax.

If the field contains a date, computeText returns Date(x, x, x); if it contains a date and time, computeText returns DateTime(x, x, x, x, x, x). However, when the date is 1900, 0, 1 (the Java start date), computeText returns Time(x, x, x). If you want to set a field to a time value only (that is, with no date), you should set the date to 1900, 0, 1, so that computeText will retrieve the correct information.

Specified by:
computeText in interface IFilterItem
Specified by:
computeText in class FilterItem
Returns:
A String representation of the field value that can be used in a report formula.

copyTo

public void copyTo(java.lang.Object destObject,
                   boolean deepCopy)
Specified by:
copyTo in class FilterItem

createMember

public java.lang.Object createMember(java.lang.String eleName,
                                     org.xml.sax.Attributes attrs,
                                     XMLSerializationContext ctxt,
                                     java.util.Map objState,
                                     boolean[] bLoaded)

For internal use only.


displayText

public java.lang.String displayText(FieldDisplayNameType displayNameType,
                                    java.util.Locale locale)
Description copied from interface: IFilterItem

Returns the field's value as a localized and formatted string.

Specified by:
displayText in interface IFilterItem
Specified by:
displayText in class FilterItem
Parameters:
displayNameType - How the field names in the filter should be formatted.
locale - The locale that is used to format the string. If this value is not specified and you are writing a Win32 application, the locale will be the user's default locale. If you are writing a thin client (a script that is running on a server) and this value is not specified, the server's default locale will be used.
Returns:
The field's value as a localized and formatted string.

endElement

public void endElement(java.lang.String eleName,
                       java.util.Map objState)

For internal use only.


getOperator

public java.lang.String getOperator()
Description copied from interface: IOperatorFilterItem

Returns the type of operation being performed on the field. The different types of operators are:

Specified by:
getOperator in interface IOperatorFilterItem
Returns:
The type of operator as a String.

hasContent

public boolean hasContent(java.lang.Object srcOperatorFilterItem)

readElement

public void readElement(java.lang.String eleName,
                        java.lang.String sVal,
                        org.xml.sax.Attributes attrs,
                        java.util.Map objState)

For internal use only.


save

public void save(XMLWriter writer,
                 XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

save

public void save(XMLWriter writer,
                 java.lang.String sTag,
                 XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

saveContents

public void saveContents(XMLWriter writer,
                         XMLSerializationContext ctxt)
                  throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

setOperator

public void setOperator(java.lang.String operator)
Description copied from interface: IOperatorFilterItem

Sets the type of operation being performed on the field. The different types of operators are:

Specified by:
setOperator in interface IOperatorFilterItem
Parameters:
operator - The type of operator as a String.

startElement

public void startElement(java.lang.String eleName,
                         java.util.Map objState,
                         org.xml.sax.Attributes attrs)

For internal use only.