|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.sdk.occa.report.data.Formula
com.crystaldecisions.sdk.occa.report.data.Filter
public class Filter
This object defines filters that are used in record selection and group selection. As the name implies,
they are used to select specified data. Initially, the filter is a simple string written in Crystal
syntax. When the file is opened, the string is parsed into an array of FilterItems
, which is
stored in the Filter
object's FilterItems property. When possible, use the IFilter
interface to manipulate this object.
Constructor Summary | |
---|---|
Filter()
|
|
Filter(FilterType filterType)
|
|
Filter(IFilter 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 a UI-friendly string representation of the filter. |
void |
doControllerModification(java.lang.Object newObject)
For internal use only. |
void |
endElement(java.lang.String eleName,
java.util.Map objState)
For internal use only. |
void |
enumerateMembers(IMemberVisitor visitor)
For internal use only. |
FilterItems |
getFilterItems()
For internal use only. |
FilterType |
getFilterType()
Gets the type of this filter. |
java.lang.String |
getFreeEditingText()
Deprecated. please use getText() |
java.lang.String |
getName()
Returns the name of the filter. |
java.lang.String |
getText()
Returns the formula string. |
boolean |
hasContent(java.lang.Object srcFilter)
|
boolean |
isDirectlyControllable()
For internal use only. |
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 |
setFilterItems(FilterItems filterItems)
For internal use only. |
void |
setFilterType(FilterType filterType)
Sets the type of this filter. |
void |
setFreeEditingText(java.lang.String freeEditingText)
Deprecated. please use setText(String) |
void |
setName(java.lang.String name)
Sets the name of the filter. |
void |
setText(java.lang.String text)
Sets the formula string. |
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.Formula |
---|
getControllableMixin, getFormulaNullTreatment, getSyntax, setFormulaNullTreatment, setSyntax |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.crystaldecisions.sdk.occa.report.data.IFormula |
---|
getFormulaNullTreatment, getSyntax, setFormulaNullTreatment, setSyntax |
Constructor Detail |
---|
public Filter(IFilter src)
public Filter()
public Filter(FilterType filterType)
Method Detail |
---|
public java.lang.Object clone(boolean deepClone)
clone
in class Formula
public java.lang.String computeText()
IFilter
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 IFilter
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 Formula
public java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
createMember
in class Formula
public java.lang.String displayText(FieldDisplayNameType type, java.util.Locale locale)
IFilter
Returns a UI-friendly string representation of the filter. This method attempts to structure the filter formula as close to a localized phrase as possible. If you do not pass in a locale, it attempts to localize the string using the user's default locale.
If the field contains a date, displayText
returns a locale-specific Date
string; if it contains a date and time, displayText
returns a locale-specific
DateTime string; if it contains a time string, displayText
returns a
locale-specific Time string.
displayText
in interface IFilter
type
- Indicates how the name of the field is displayed.locale
- Localizes the string according to a specific locale.
public void endElement(java.lang.String eleName, java.util.Map objState)
endElement
in class Formula
public FilterItems getFilterItems()
public java.lang.String getFreeEditingText()
IFilter
getFreeEditingText
in interface IFilter
String
containing the formula text that was originally used to
define the filter.public java.lang.String getText()
IFormula
Returns the formula string.
getText
in interface IFormula
getText
in class Formula
String
.public void setText(java.lang.String text)
IFormula
Sets the formula string.
setText
in interface IFormula
setText
in class Formula
text
- The formula as a String
.public java.lang.String getName()
IFilter
getName
in interface IFilter
String
containing the name of the filter.public boolean hasContent(java.lang.Object srcFilter)
hasContent
in class Formula
public void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
readElement
in class Formula
public void save(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
save
in class Formula
java.io.IOException
public void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt) throws java.io.IOException
save
in class Formula
java.io.IOException
public void saveContents(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
saveContents
in class Formula
java.io.IOException
public void setFilterItems(FilterItems filterItems)
public void setFreeEditingText(java.lang.String freeEditingText)
IFilter
setFreeEditingText
in interface IFilter
freeEditingText
- A String
containing the formula text that was
originally used to define the filter.public void setName(java.lang.String name)
IFilter
setName
in interface IFilter
name
- A String
containing the name of the filter.public void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
startElement
in class Formula
public FilterType getFilterType()
IFilter
getFilterType
in interface IFilter
FilterType
of this filterpublic void setFilterType(FilterType filterType)
IFilter
setFilterType
in interface IFilter
filterType
- a FilterType
public void doControllerModification(java.lang.Object newObject) throws ReportSDKException
doControllerModification
in class Formula
ReportSDKException
public boolean isDirectlyControllable()
isDirectlyControllable
in class Formula
public void enumerateMembers(IMemberVisitor visitor)
enumerateMembers
in class Formula
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |