|
|||||||||
| 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:
RangeFieldThis represents the field that is being used in the expression. In the case of the example above, this would be the Customer.Name field.
OperationThe Operation property is used to indicate which operator will be used to evaluate the expression. The example uses the equals operator.
ValuesThis 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)
|
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)
|
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)
|
void |
save(XMLWriter writer,
java.lang.String sTag,
XMLSerializationContext ctxt)
|
void |
save(XMLWriter writer,
XMLSerializationContext ctxt)
|
void |
saveContents(XMLWriter writer,
XMLSerializationContext ctxt)
|
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)
|
| 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 FilterItempublic 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 IFilterItemcomputeText in class FilterItemString 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)
public java.lang.String displayText(FieldDisplayNameType type,
java.util.Locale locale)
IFilterItemReturns the field's value as a localized and formatted string.
displayText in interface IFilterItemdisplayText in class FilterItemtype - 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)
public boolean getInclusive()
IFieldRangeFilterItemReturns 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 IFieldRangeFilterItemtrue if the value is included in the comparison,
and false otherwise.public SelectionOperation getOperation()
IFieldRangeFilterItemReturns the type of operation being performed on the field that is being used as a filter.
getOperation in interface IFieldRangeFilterItemSelectionOperation object.public IField getRangeField()
IFieldRangeFilterItemReturns 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 IFieldRangeFilterItemIField.public Values getValues()
IFieldRangeFilterItemReturns 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 IFieldRangeFilterItemValues 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)
public void save(XMLWriter writer,
XMLSerializationContext ctxt)
throws java.io.IOException
java.io.IOException
public void save(XMLWriter writer,
java.lang.String sTag,
XMLSerializationContext ctxt)
throws java.io.IOException
java.io.IOException
public void saveContents(XMLWriter writer,
XMLSerializationContext ctxt)
throws java.io.IOException
java.io.IOExceptionpublic void setInclusive(boolean inclusive)
IFieldRangeFilterItemSets 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 IFieldRangeFilterIteminclusive - true if the value is included in the comparison,
and false otherwise.public void setOperation(SelectionOperation operation)
IFieldRangeFilterItemSets the type of operation being performed on the field that is being used as a filter.
setOperation in interface IFieldRangeFilterItemoperation - The SelectionOperation object.public void setRangeField(IField rangeField)
IFieldRangeFilterItemSets 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 IFieldRangeFilterItemrangeField - The range field as an IField.public void setValues(Values values)
IFieldRangeFilterItemSets 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 IFieldRangeFilterItemvalues - The values as a Values object.
public void startElement(java.lang.String eleName,
java.util.Map objState,
org.xml.sax.Attributes attrs)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||