Interface Report

    • Method Detail

      • getQuery

        String getQuery()
        Get the value for Query. (The optional SQL for the Report.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getLimit

        Long getLimit()
        Get the value for Limit. (The limit on the number of results in the final dataset.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getReportQueryType

        ReportQueryType getReportQueryType()
        Get the value for ReportQueryType. (The type of query the data for the report is retrieved from.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setQuery

        void setQuery​(String newQuery)
        Set the value for Query. (The optional SQL for the Report.) This value is optional.
        Parameters:
        newQuery - the new value for Query.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setLimit

        void setLimit​(Long newLimit)
        Set the value for Limit. (The limit on the number of results in the final dataset.) This value is optional.
        Parameters:
        newLimit - the new value for Limit.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setReportQueryType

        void setReportQueryType​(ReportQueryType newReportQueryType)
        Set the value for ReportQueryType. (The type of query the data for the report is retrieved from.) This value is mandatory.
        Parameters:
        newReportQueryType - the new value for ReportQueryType. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • createAllReportColumns

        void createAllReportColumns()
        Create all the report columns from the query list of fields.
      • generate

        void generate​(ReportDestination formatter)
               throws com.redwood.scheduler.api.exception.ReportGenerationException
        Generate the report and output the results to the ReportDestination.
        Parameters:
        formatter - The destination for the Report results.
        Throws:
        com.redwood.scheduler.api.exception.ReportGenerationException - The report generation failed.
      • generate

        void generate​(ReportDestination formatter,
                      Map<String,​Object> parameters)
               throws com.redwood.scheduler.api.exception.ReportGenerationException
        Generate the report and output the results to the ReportDestination.
        Parameters:
        formatter - The destination for the Report results.
        parameters - The parameters for the report.
        Throws:
        com.redwood.scheduler.api.exception.ReportGenerationException - The report generation failed.
      • getDefaultParameters

        Map<String,​Object> getDefaultParameters()
        Get a map of the default parameter values.
        Returns:
        A map of the default parameter values match to the uniqueid of the ReportParameter.
      • validate

        void validate​(ReportDestination formatter,
                      Map<String,​Object> parameters)
               throws com.redwood.scheduler.api.exception.ReportValidationException
        Validate the report.
        Parameters:
        formatter - The destination for the Report results.
        parameters - The parameters for the report.
        Throws:
        com.redwood.scheduler.api.exception.ReportValidationException - The report validation failed.
      • getQueryFilter

        QueryFilter getQueryFilter()
        Get the QueryFilter.
        Returns:
        QueryFilter
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setQueryFilter

        void setQueryFilter​(QueryFilter newQueryFilter)
        Set the value for QueryFilter. This value is optional.
        Parameters:
        newQueryFilter - is the object to set QueryFilter to. The optional filter for a Report
      • getReportColumns

        RWIterable<ReportColumn> getReportColumns()
        Get an RWIterable over a collection of ReportColumns, the collection will be ordered by ColumnOrder. If the collection is empty, an empty iterator will be returned, that is, this method will never return null. The columns for a Report
        Specified by:
        getReportColumns in interface ReportComp
        Returns:
        An RWIterable over a collection of ReportColumn objects , the collection will be ordered by ColumnOrder.
      • getReportColumnByName

        ReportColumn getReportColumnByName​(String name)
        Get the ReportColumn by Name.
        Parameters:
        name -
        Returns:
        the ReportColumn, or null if it could not be found
      • getReportColumnByColumnOrder

        ReportColumn getReportColumnByColumnOrder​(Long columnOrder)
        Get the ReportColumn by ColumnOrder.
        Parameters:
        columnOrder -
        Returns:
        the ReportColumn, or null if it could not be found
      • getReportSorts

        RWIterable<ReportSort> getReportSorts()
        Get an RWIterable over a collection of ReportSorts, the collection will be ordered by SortOrder. If the collection is empty, an empty iterator will be returned, that is, this method will never return null. The sorts for a Report
        Specified by:
        getReportSorts in interface ReportComp
        Returns:
        An RWIterable over a collection of ReportSort objects , the collection will be ordered by SortOrder.
      • getReportSortBySortOrder

        ReportSort getReportSortBySortOrder​(Long sortOrder)
        Get the ReportSort by SortOrder.
        Parameters:
        sortOrder -
        Returns:
        the ReportSort, or null if it could not be found