Class VariableElementHandle

  • All Implemented Interfaces:
    org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.IVariableElementModel

    public class VariableElementHandle
    extends ContentElementHandle
    implements org.eclipse.birt.report.model.elements.interfaces.IVariableElementModel
    Represents a variable.
    • Constructor Detail

      • VariableElementHandle

        public VariableElementHandle​(org.eclipse.birt.report.model.core.Module module,
                                     org.eclipse.birt.report.model.core.DesignElement element)
        Constructs a variable handle with the given design and the element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.
        Parameters:
        module - the module
        element - the model representation of the element
    • Method Detail

      • getVariableName

        public java.lang.String getVariableName()
        Returns the name of the variable.
        Returns:
        the variable name
      • getValue

        public java.lang.String getValue()
        Returns the value of the variable.
        Returns:
        the variable value
      • setValue

        public void setValue​(java.lang.String value)
                      throws SemanticException
        Sets the value of the variable.
        Parameters:
        value - the value to set
        Throws:
        SemanticException
      • getType

        public java.lang.String getType()
        Gets the value of work mode property.The return value is defined in DesignChoiceConstants and can be one of:
        • VARIABLE_TYPE_REPORT
        • VARIABLE_TYPE_PAGE
        Returns:
        the work mode property value.
      • setType

        public void setType​(java.lang.String workMode)
                     throws SemanticException
        Sets the value of work mode property. The value is defined in DesignChoiceConstants and can be one of:
        • VARIABLE_TYPE_REPORT
        • VARIABLE_TYPE_PAGE
        Parameters:
        workMode - the work mode property value.
        Throws:
        SemanticException
      • getName

        public java.lang.String getName()
        Description copied from class: DesignElementHandle
        Returns the name of this element. Returns 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.
        Overrides:
        getName in class ContentElementHandle
        Returns:
        the element name, or null if the name is not set
      • setName

        public void setName​(java.lang.String name)
                     throws NameException
        Description copied from class: DesignElementHandle
        Sets the name of this element. If the name is null, then the name is cleared if this element does not require a name.
        Overrides:
        setName in class ContentElementHandle
        Parameters:
        name - the new name
        Throws:
        NameException - if the name is duplicate, or if the name is null and this element requires a name.