|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.sdk.occa.report.data.FilterItem
com.crystaldecisions.sdk.occa.report.data.FieldRangeFilterItem
public class FieldRangeFilterItem
This object is used to represent a primitive
expression in a filter string. A primitive expression is an
expression that contains a field, an operator, and another
field or value, for example Customer.Name = "Joel"
. It is the simplest
expression using a operator that one may have in a formula.
The following diagram illustrates the relationship between a formula string and
the FieldRangeFilterItem
object.
The primitive expression is broken up into three parts and each part is represented by a member property:
RangeField
This represents the field that is being used in the expression. In the case of the example above, this would be the Customer.Name field.
Operation
The Operation property is used to indicate which operator will be used to evaluate the expression. The example uses the equals operator.
Values
This contains the values that are used to compare against the RangeField property using the specified operation. A value may fall into one of two categories represented by the following objects:
ConstantValue
objectThe value is a literal constant that needs no evaluation. For example, 3.1, "Joel", "2/2/2000".
ExpressionValue
objectThe value is a expression that needs to be evaluated. For example, 2+2, 4x5.
Note: A primitive expression may have more than one value. For example, the IN operator can have more than one value that it uses to evaluate the expression. For example, Customer.Name IN ["Joel","Tomi"]. There are two values here: "Joel" and "Tomi".
For more information on how a filter string is parsed,
see the IFilter
interface.
Constructor Summary | |
---|---|
FieldRangeFilterItem()
|
|
FieldRangeFilterItem(IFieldRangeFilterItem 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 type,
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. |
void |
enumerateMembers(IMemberVisitor visitor)
|
boolean |
getInclusive()
Returns whether, if the operator compares a range, the compared value is included in the comparison. |
SelectionOperation |
getOperation()
Returns the type of operation being performed on the field that is being used as a filter. |
IField |
getRangeField()
Returns the range field that represents the field that is being used in the operation. |
Values |
getValues()
Returns the values that are being compared with those in the range field. |
boolean |
hasContent(java.lang.Object srcFieldRangeFilterItem)
|
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 |
setInclusive(boolean inclusive)
Sets whether, if the operator compares a range, the compared value is included in the comparison. |
void |
setOperation(SelectionOperation operation)
Sets the type of operation being performed on the field that is being used as a filter. |
void |
setRangeField(IField rangeField)
Sets the range field that represents the field that is being used in the operation. |
void |
setValues(Values values)
Sets the values that are being compared with those in the range 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, getControllableMixin, isDirectlyControllable |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldRangeFilterItem(IFieldRangeFilterItem src)
public FieldRangeFilterItem()
Method Detail |
---|
public java.lang.Object clone(boolean deepClone)
clone
in class FilterItem
public java.lang.String computeText()
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.
computeText
in interface IFilterItem
computeText
in class FilterItem
String
representation of the field value that can be used in a report formula.public void copyTo(java.lang.Object destObject, boolean deepCopy)
copyTo
in class FilterItem
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.
public java.lang.String displayText(FieldDisplayNameType type, java.util.Locale locale)
IFilterItem
Returns the field's value as a localized and formatted string.
displayText
in interface IFilterItem
displayText
in class FilterItem
type
- 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.
public void endElement(java.lang.String eleName, java.util.Map objState)
For internal use only.
public boolean getInclusive()
IFieldRangeFilterItem
Returns whether, if the operator compares a range, the compared value is included in the comparison. If, for example, the "greater than" operator is used, if Inclusive is True, then the operator will effectively be "greater than or equal to".
getInclusive
in interface IFieldRangeFilterItem
true
if the value is included in the comparison,
and false
otherwise.public SelectionOperation getOperation()
IFieldRangeFilterItem
Returns the type of operation being performed on the field that is being used as a filter.
getOperation
in interface IFieldRangeFilterItem
SelectionOperation
object.public IField getRangeField()
IFieldRangeFilterItem
Returns the range field that represents the field that is being used in the operation. The range field is the field that is being used in the filter to determine the result of the expression.
getRangeField
in interface IFieldRangeFilterItem
IField
.public Values getValues()
IFieldRangeFilterItem
Returns the values that are being compared with those in the range field. There are two different types of values that are stored: constant values, which represent a literal value, and expression values, which are values that require evaluation.
getValues
in interface IFieldRangeFilterItem
Values
object.public boolean hasContent(java.lang.Object srcFieldRangeFilterItem)
public void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
For internal use only.
public void save(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void saveContents(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void setInclusive(boolean inclusive)
IFieldRangeFilterItem
Sets whether, if the operator compares a range, the compared value is included in the comparison. If, for example, the "greater than" operator is used, if Inclusive is True, then the operator will effectively be "greater than or equal to".
setInclusive
in interface IFieldRangeFilterItem
inclusive
- true
if the value is included in the comparison,
and false
otherwise.public void setOperation(SelectionOperation operation)
IFieldRangeFilterItem
Sets the type of operation being performed on the field that is being used as a filter.
setOperation
in interface IFieldRangeFilterItem
operation
- The SelectionOperation
object.public void setRangeField(IField rangeField)
IFieldRangeFilterItem
Sets the range field that represents the field that is being used in the operation. The range field is the field that is being used in the filter to determine the result of the expression.
setRangeField
in interface IFieldRangeFilterItem
rangeField
- The range field as an IField
.public void setValues(Values values)
IFieldRangeFilterItem
Sets the values that are being compared with those in the range field. There are two different types of values that are stored: constant values, which represent a literal value, and expression values, which are values that require evaluation.
setValues
in interface IFieldRangeFilterItem
values
- The values as a Values
object.public void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
For internal use only.
public void enumerateMembers(IMemberVisitor visitor)
enumerateMembers
in class FilterItem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |