|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ContentElementHandle
org.eclipse.birt.report.model.api.FilterConditionElementHandle
Field Summary | |
protected org.eclipse.birt.report.model.core.DesignElement |
element
The target report element. |
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle |
module |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IFilterConditionElementModel |
EXPR_PROP, FILTER_TARGET_PROP, IS_OPTIONAL_PROP, MEMBER_PROP, OPERATOR_PROP, VALUE1_PROP, VALUE2_PROP |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel |
COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP |
Constructor Summary | |
FilterConditionElementHandle(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
Constructs a filter condition handle with the given design and the element. |
Method Summary | |
void |
addListener(Listener obj)
Registers a change event listener. |
void |
addUserPropertyDefn(UserPropertyDefn prop)
Adds a user-defined property definition. |
boolean |
canTransformToTemplate()
Determines if the current element can be transformed to a template element. |
java.util.Iterator |
clientsIterator()
Returns an iterator over the clients of this element. |
TemplateElementHandle |
createTemplateElement(java.lang.String name)
Creates a template element handle and transforms the current element handle to the created template element. |
java.util.Iterator |
derivedIterator()
Returns an iterator over the elements that derive from this one. |
org.eclipse.birt.report.model.core.DesignElement |
getElement()
Returns the element to which this handle is attached. |
java.lang.String |
getEventHandlerClass()
Gets a string that defines the event handle class. |
java.lang.String |
getExpr()
Returns the filter expression. |
DesignElementHandle |
getExtends()
Returns a handle to the element that this element extends. |
java.lang.String |
getFilterTarget()
Returns the filter target. |
MemberValueHandle |
getMember()
Gets the member value handle of this filter condition element if it sets. |
java.lang.String |
getName()
Returns the name of this element. |
java.lang.String |
getOperator()
Returns the operator of this filter condition. |
StyleHandle |
getPrivateStyle()
Returns a handle to work with the style properties of this element. |
java.lang.String |
getQualifiedName()
Gets the name of this element. |
java.util.List |
getUserProperties()
Returns a list of user properties defined in this element and somewhere up the inheritance chain. |
UserPropertyDefnHandle |
getUserPropertyDefnHandle(java.lang.String propName)
Returns a user-defined property handle for a top-level property. |
java.lang.String |
getValue1()
Returns the value 1 expression of this filter condition. |
java.util.List |
getValue1List()
Gets the value1 expression list of this filter condition. |
java.lang.String |
getValue2()
Returns the value 2 expression of this filter condition. |
boolean |
isOptional()
Determines whether this filte rcondition is optional or not. |
boolean |
isTemplateParameterValue()
Checks whether this element is based on a template parameter definition or not. |
void |
localize()
Localize the element, break the parent/child relationship and set all the extended properties locally. |
void |
removeListener(Listener obj)
Removes a given listener. |
void |
revertToReportItem()
if this design element is based on a template definition ContentElementHandle.isTemplateParameterValue( ) ,get rid of the template definition ) |
TemplateElementHandle |
revertToTemplate(java.lang.String name)
Creates a template element handle and transforms the current element handle to the created template element if the current element is based on a template parameter definition. |
void |
setEventHandlerClass(java.lang.String expr)
Sets the group expression. |
void |
setExpr(java.lang.String filterExpr)
Sets the filter expression. |
void |
setExtends(DesignElementHandle parent)
Sets this element to extend the given element. |
void |
setExtendsName(java.lang.String name)
Sets the name of the element that this element extends. |
void |
setFilterTarget(java.lang.String filterTarget)
Sets the filter target. |
void |
setName(java.lang.String name)
Sets the name of this element. |
void |
setOperator(java.lang.String operator)
Sets the operator of this filter condition. |
void |
setOptional(boolean isOptional)
Sets the optional status for this filter condition. |
void |
setStyle(SharedStyleHandle style)
Sets the shared style element for this element. |
void |
setStyleName(java.lang.String name)
Sets the name of the shared style for this element. |
void |
setValue1(java.util.List value1List)
Sets the value 1 expression list of this filter condition. |
void |
setValue1(java.lang.String value1Expr)
Sets the value 1 expression of this filter condition. |
void |
setValue2(java.lang.String value2Expr)
Sets the value 2 expression of this filter condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.eclipse.birt.report.model.core.DesignElement element
Constructor Detail |
public FilterConditionElementHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
module
- the moduleelement
- the model representation of the elementMethod Detail |
public java.lang.String getExpr()
public void setExpr(java.lang.String filterExpr) throws SemanticException
filterExpr
- the filter expression to set
SemanticException
- value required exceptionpublic java.lang.String getOperator()
DesignChoiceConstants
,
and they are:
FILTER_OPERATOR_EQ
FILTER_OPERATOR_NE
FILTER_OPERATOR_LT
FILTER_OPERATOR_LE
FILTER_OPERATOR_GE
FILTER_OPERATOR_GT
FILTER_OPERATOR_BETWEEN
FILTER_OPERATOR_NOT_BETWEEN
FILTER_OPERATOR_NULL
FILTER_OPERATOR_NOT_NULL
FILTER_OPERATOR_TRUE
FILTER_OPERATOR_FALSE
FILTER_OPERATOR_LIKE
FILTER_OPERATOR_TOP_N
FILTER_OPERATOR_BOTTOM_N
FILTER_OPERATOR_TOP_PERCENT
FILTER_OPERATOR_BOTTOM_PERCENT
FILTER_OPERATOR_ANY
public void setOperator(java.lang.String operator) throws SemanticException
DesignChoiceConstants
,
and they are:
FILTER_OPERATOR_EQ
FILTER_OPERATOR_NE
FILTER_OPERATOR_LT
FILTER_OPERATOR_LE
FILTER_OPERATOR_GE
FILTER_OPERATOR_GT
FILTER_OPERATOR_BETWEEN
FILTER_OPERATOR_NOT_BETWEEN
FILTER_OPERATOR_NULL
FILTER_OPERATOR_NOT_NULL
FILTER_OPERATOR_TRUE
FILTER_OPERATOR_FALSE
FILTER_OPERATOR_LIKE
FILTER_OPERATOR_TOP_N
FILTER_OPERATOR_BOTTOM_N
FILTER_OPERATOR_TOP_PERCENT
FILTER_OPERATOR_BOTTOM_PERCENT
FILTER_OPERATOR_ANY
operator
- the operator to set
SemanticException
- if operator is not in the choice list.public java.lang.String getValue1()
public java.util.List getValue1List()
public void setValue1(java.lang.String value1Expr) throws SemanticException
value1Expr
- the value 1 expression to set
SemanticException
public void setValue1(java.util.List value1List) throws SemanticException
value1List
- the value 1 expression list to set
SemanticException
- if the instance in the list is not validpublic java.lang.String getValue2()
public void setValue2(java.lang.String value2Expr) throws SemanticException
value2Expr
- the value 2 expression to set
SemanticException
public java.lang.String getFilterTarget()
DesignChoiceConstants
,
and they are:
FILTER_TARGET_DATA_SET
FILTER_TARGET_RESULT_SET
public void setFilterTarget(java.lang.String filterTarget) throws SemanticException
DesignChoiceConstants
,
and they are:
FILTER_TARGET_DATA_SET
FILTER_TARGET_RESULT_SET
filterTarget
- the filter target to set
SemanticException
- if the value is not one of the above.public MemberValueHandle getMember()
public boolean isOptional()
public void setOptional(boolean isOptional) throws SemanticException
isOptional
- true if this filter is optional, otherwise false
SemanticException
public final org.eclipse.birt.report.model.core.DesignElement getElement()
DesignElementHandle
getElement
in class DesignElementHandle
public final void addListener(Listener obj)
DesignElementHandle
addListener
in class DesignElementHandle
obj
- the listener to registerpublic final void addUserPropertyDefn(UserPropertyDefn prop) throws UserPropertyException
DesignElementHandle
addUserPropertyDefn
in class DesignElementHandle
prop
- the user property definition to add. The name and property
type must be valid.
UserPropertyException
- if the element is not allowed to have user property or the
user property definition is invalid, or if the value of the
user-defined choice is invalid for the type of user property
definition, the property type is incorrect.public final boolean isTemplateParameterValue()
DesignElementHandle
DesignElementHandle.revertToTemplate(String)
to assure that this element can be
reverted to a template element. If this method returns false, method
revertToTemplate(String)
must fail too.
isTemplateParameterValue
in class DesignElementHandle
public final void localize() throws SemanticException
DesignElementHandle
localize
in class DesignElementHandle
SemanticException
- the element can not be localized properly. It may be because
that the element is not extended from a parent, or that same
properties can not be localized on the element or the content
elements inside it.public final void removeListener(Listener obj)
DesignElementHandle
removeListener
in class DesignElementHandle
obj
- the listener to de-registerpublic final void revertToReportItem() throws SemanticException
DesignElementHandle
DesignElementHandle.isTemplateParameterValue( )
,get rid of the template definition )
revertToReportItem
in class DesignElementHandle
SemanticException
public final TemplateElementHandle revertToTemplate(java.lang.String name) throws SemanticException
DesignElementHandle
revertToTemplate
in class DesignElementHandle
name
- the name of created template element handle
SemanticException
- if the current element can not be transformed to a template
element, current element has no template parameter
definition, current module is not a report design or some
containing contexts don't matchpublic final boolean canTransformToTemplate()
DesignElementHandle
canTransformToTemplate
in class DesignElementHandle
public final java.util.Iterator clientsIterator()
DesignElementHandle
clientsIterator
in class DesignElementHandle
getNext( )
method is of type
DesignElementHandle
. Nothing will be iterated over an
element that is not ReferenceableElement
.public final TemplateElementHandle createTemplateElement(java.lang.String name) throws SemanticException
DesignElementHandle
createTemplateElement
in class DesignElementHandle
name
- the name of created template element handle
SemanticException
- if the current element can not be transformed to a template
element, current module is not a report design or some
containing contexts don't matchpublic final java.util.Iterator derivedIterator()
DesignElementHandle
derivedIterator
in class DesignElementHandle
getNext( )
method
is of type DesignElementHandle
.public final java.lang.String getName()
DesignElementHandle
null
if the
element does not have a name. Many elements do not require a name. The
name does not inherit. If this element does not have a name, it will not
inherit the name of its parent element.
getName
in class DesignElementHandle
public final StyleHandle getPrivateStyle()
DesignElementHandle
Note a key difference between this method and the
getStyle( )
method. This method returns a handle to the
this element. The getStyle( )
method returns a
handle to the shared style, if any, that this element references.
getPrivateStyle
in class DesignElementHandle
null
if this element does not have style
properties.public final java.lang.String getQualifiedName()
DesignElementHandle
getName()
, plus the namespace of the module that the
element is contained, if the element name resides in the whole design
tree scope; otherwise we will append the name of the holder where the
element name resides. If the element is existed in the current
module,this method and getName()
will return identical
results.
getQualifiedName
in class DesignElementHandle
public final java.util.List getUserProperties()
DesignElementHandle
UserPropertyDefn
.
getUserProperties
in class DesignElementHandle
public final UserPropertyDefnHandle getUserPropertyDefnHandle(java.lang.String propName)
DesignElementHandle
getUserPropertyDefnHandle
in class DesignElementHandle
propName
- the name of the property to get
null
if
the no property exists with the given name or it is not a
user-defined property.public final void setEventHandlerClass(java.lang.String expr) throws SemanticException
DesignElementHandle
setEventHandlerClass
in class DesignElementHandle
expr
- the expression to set
SemanticException
- If the expression is invalid.DesignElementHandle.getEventHandlerClass()
public final void setExtends(DesignElementHandle parent) throws ExtendsException
DesignElementHandle
setExtends
in class DesignElementHandle
parent
- handle to the element that this element is to extend. If
null
, then this element will no longer extend
another element.
ExtendsException
- if the parent element is of the wrong type as this element.public final void setExtendsName(java.lang.String name) throws ExtendsException
DesignElementHandle
setExtendsName
in class DesignElementHandle
name
- the name of the element that this one is to extend
ExtendsException
- if no element exists with the given name, or if the element
is of the wrong type.public final void setName(java.lang.String name) throws NameException
DesignElementHandle
null
, then
the name is cleared if this element does not require a name.
setName
in class DesignElementHandle
name
- the new name
NameException
- if the name is duplicate, or if the name is null
and this element requires a name.public java.lang.String getEventHandlerClass()
DesignElementHandle
getEventHandlerClass
in class DesignElementHandle
DesignElementHandle.setEventHandlerClass(String)
public DesignElementHandle getExtends()
DesignElementHandle
getExtends
in class DesignElementHandle
null
if this element
does not have a parent, or if the extends name does not resolve
to a valid element.public void setStyle(SharedStyleHandle style) throws StyleException
DesignElementHandle
setStyle
in class DesignElementHandle
style
- the handle to the shared style. If null, then the shared style
is cleared.
StyleException
- if this element does not support a style.DesignElementHandle.getStyle()
public void setStyleName(java.lang.String name) throws StyleException
DesignElementHandle
setStyleName
in class DesignElementHandle
name
- the name of the shared style. If null
, then
the shared style name is cleared.
StyleException
- If the name is not valid, or if this element does not support
a style.DesignElementHandle.getStyle()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |