Class TradeReport
- java.lang.Object
-
- com.opengamma.strata.report.trade.TradeReport
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TradeReport.Builder
The bean-builder forTradeReport
.static class
TradeReport.Meta
The meta-bean forTradeReport
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TradeReport.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
ImmutableList<String>
getColumnHeaders()
Gets the report column headers.ImmutableList<TradeReportColumn>
getColumns()
Gets the report columns, which may contain information required for formatting.ImmutableTable<Integer,Integer,Result<?>>
getData()
Gets the calculation results.int
getRowCount()
Gets the number of rows in the report table.Instant
getRunInstant()
Gets the instant at which the report was run.LocalDate
getValuationDate()
Gets the valuation date.int
hashCode()
static TradeReport.Meta
meta()
The meta-bean forTradeReport
.TradeReport.Meta
metaBean()
static TradeReport
of(ReportCalculationResults calculationResults, TradeReportTemplate reportTemplate)
Returns a new trade report.TradeReport.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
void
writeAsciiTable(OutputStream out)
Writes this report out as an ASCII table.void
writeCsv(OutputStream out)
Writes this report out in a CSV format.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.report.Report
getColumnCount, toAsciiTableString
-
-
-
-
Method Detail
-
of
public static TradeReport of(ReportCalculationResults calculationResults, TradeReportTemplate reportTemplate)
Returns a new trade report.- Parameters:
calculationResults
- the results of the calculationsreportTemplate
- 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 interfaceReport
- Returns:
- the number of rows in the report table
-
getColumnHeaders
public ImmutableList<String> getColumnHeaders()
Description copied from interface:Report
Gets the report column headers.- Specified by:
getColumnHeaders
in interfaceReport
- Returns:
- the column headers
-
writeCsv
public void writeCsv(OutputStream out)
Description copied from interface:Report
Writes this report out in a CSV format.
-
writeAsciiTable
public void writeAsciiTable(OutputStream out)
Description copied from interface:Report
Writes this report out as an ASCII table.- Specified by:
writeAsciiTable
in interfaceReport
- Parameters:
out
- the output stream to write to
-
meta
public static TradeReport.Meta meta()
The meta-bean forTradeReport
.- 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 interfaceorg.joda.beans.Bean
-
getValuationDate
public LocalDate getValuationDate()
Gets the valuation date.- Specified by:
getValuationDate
in interfaceReport
- 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 interfaceReport
- 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
-
getData
public ImmutableTable<Integer,Integer,Result<?>> getData()
Gets the calculation results.- 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
-
-