Class TradeReport

  • All Implemented Interfaces:
    Report, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class TradeReport
    extends Object
    implements Report, org.joda.beans.ImmutableBean
    Represents a trade report.
    • Method Detail

      • of

        public static TradeReport of​(ReportCalculationResults calculationResults,
                                     TradeReportTemplate reportTemplate)
        Returns a new trade report.
        Parameters:
        calculationResults - the results of the calculations
        reportTemplate - the template used to generate the report
        Returns:
        a new trade report
      • getRowCount

        public int getRowCount()
        Description copied from interface: Report
        Gets the number of rows in the report table.
        Specified by:
        getRowCount in interface Report
        Returns:
        the number of rows in the report table
      • writeCsv

        public void writeCsv​(OutputStream out)
        Description copied from interface: Report
        Writes this report out in a CSV format.
        Specified by:
        writeCsv in interface Report
        Parameters:
        out - the output stream to write to
      • writeAsciiTable

        public void writeAsciiTable​(OutputStream out)
        Description copied from interface: Report
        Writes this report out as an ASCII table.
        Specified by:
        writeAsciiTable in interface Report
        Parameters:
        out - the output stream to write to
      • meta

        public static TradeReport.Meta meta()
        The meta-bean for TradeReport.
        Returns:
        the meta-bean, not null
      • builder

        public static TradeReport.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • metaBean

        public TradeReport.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getValuationDate

        public LocalDate getValuationDate()
        Gets the valuation date.
        Specified by:
        getValuationDate in interface Report
        Returns:
        the value of the property, not null
      • getRunInstant

        public Instant getRunInstant()
        Gets the instant at which the report was run.
        Specified by:
        getRunInstant in interface Report
        Returns:
        the value of the property, not null
      • getColumns

        public ImmutableList<TradeReportColumn> getColumns()
        Gets the report columns, which may contain information required for formatting.
        Returns:
        the value of the property, not null
      • toBuilder

        public TradeReport.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object