Class DataSourceHandle

  • All Implemented Interfaces:
    org.eclipse.birt.report.model.elements.interfaces.IDataSourceModel, org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
    Direct Known Subclasses:
    OdaDataSourceHandle, ScriptDataSourceHandle

    public abstract class DataSourceHandle
    extends ReportElementHandle
    implements org.eclipse.birt.report.model.elements.interfaces.IDataSourceModel
    This abstract class represents a data source element: a connection to an external data provider such as an SQL database.

    The application can implement methods to execute code on the two primary data source events: open and close.

    See Also:
    DataSource
    • Constructor Detail

      • DataSourceHandle

        public DataSourceHandle​(org.eclipse.birt.report.model.core.Module module,
                                org.eclipse.birt.report.model.core.DesignElement element)
        Constructs a handle of DataSource with the given design and 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

      • getBeforeOpen

        public java.lang.String getBeforeOpen()
        Returns the code of the beforeOpen method. This is the script called just before opening the data source.
        Returns:
        the code of the method
      • setBeforeOpen

        public void setBeforeOpen​(java.lang.String code)
                           throws SemanticException
        Sets the code for the beforeOpen method. This is the script called just before opening the data source.
        Parameters:
        code - the code for the method
        Throws:
        SemanticException - if the method is locked.
      • getBeforeClose

        public java.lang.String getBeforeClose()
        Returns the code of the beforeClose method. This is the script called just before closing the data source.
        Returns:
        the code of the method
      • setBeforeClose

        public void setBeforeClose​(java.lang.String code)
                            throws SemanticException
        Sets the code for the beforeClose method. This is the script called just before closing the data source.
        Parameters:
        code - the code for the method
        Throws:
        SemanticException - if the method is locked.
      • getAfterOpen

        public java.lang.String getAfterOpen()
        Returns the code of the afterOpen method. This is the script called just after opening the data source.
        Returns:
        the code of the method
      • setAfterOpen

        public void setAfterOpen​(java.lang.String code)
                          throws SemanticException
        Sets the code for the afterOpen method. This is the script called just after opening the data source.
        Parameters:
        code - the code for the method
        Throws:
        SemanticException - if the method is locked.
      • getAfterClose

        public java.lang.String getAfterClose()
        Returns the code of the afterClose method. This is the script called just after closing the data source.
        Returns:
        the code of the method
      • setAfterClose

        public void setAfterClose​(java.lang.String code)
                           throws SemanticException
        Sets the code for the afterClose method. This is the script called just after closing the data source.
        Parameters:
        code - the code for the method
        Throws:
        SemanticException - if the method is locked.