Package com.opengamma.strata.loader.csv
Class CsvWriterUtils
- java.lang.Object
-
- com.opengamma.strata.loader.csv.CsvWriterUtils
-
public final class CsvWriterUtils extends Object
Groups several utilities methods for CsvPlugins
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
writeAdjustablePayment(CsvOutput.CsvRowOutputWithHeaders csv, AdjustablePayment adjustablePayment, String amountField, String currencyField, String directionField, String dateField, String dateConventionField, String dateCalendarField)
Writes an AdjustablePayment object to CSVstatic void
writeBarrier(CsvOutput.CsvRowOutputWithHeaders csv, Barrier barrier, LocalDate obsDate)
Writes a Barrier object to CSVstatic void
writeCurrencyAmount(CsvOutput.CsvRowOutputWithHeaders csv, CurrencyAmount ccyAmount, String amountField, String currencyField, String directionField)
Writes a currency amount using the provided fieldsstatic void
writeFxSingle(CsvOutput.CsvRowOutputWithHeaders csv, String prefix, FxSingle product)
Write the FxSingle to CSVstatic void
writeFxVanillaOption(CsvOutput.CsvRowOutputWithHeaders csv, FxVanillaOption product)
Write a FxVanillaOption to CSVstatic void
writePremiumFields(CsvOutput.CsvRowOutputWithHeaders csv, AdjustablePayment premium)
Writes an AdjustablePayment object to CSVstatic void
writeSecurityQuantityTrade(CsvOutput.CsvRowOutputWithHeaders csv, SecurityQuantityTrade trade)
Write a SecurityQuantityTrade to CSVstatic void
writeSwap(CsvOutput.CsvRowOutputWithHeaders csv, Swap product)
Write a Swap to CSVstatic void
writeZonedDateTime(CsvOutput.CsvRowOutputWithHeaders csv, ZonedDateTime zonedDateTime, String dateField, String timeField, String zoneField)
Writes a zoned date time using the provided field
-
-
-
Method Detail
-
writePremiumFields
public static void writePremiumFields(CsvOutput.CsvRowOutputWithHeaders csv, AdjustablePayment premium)
Writes an AdjustablePayment object to CSV- Parameters:
csv
- the csv row outputpremium
- the premium
-
writeAdjustablePayment
public static void writeAdjustablePayment(CsvOutput.CsvRowOutputWithHeaders csv, AdjustablePayment adjustablePayment, String amountField, String currencyField, String directionField, String dateField, String dateConventionField, String dateCalendarField)
Writes an AdjustablePayment object to CSV- Parameters:
csv
- the csv rowadjustablePayment
- the adjustable paymentamountField
- the amount fieldcurrencyField
- the currency fielddirectionField
- the direction fielddateField
- the date fielddateConventionField
- the date convention fielddateCalendarField
- the date calendar field
-
writeCurrencyAmount
public static void writeCurrencyAmount(CsvOutput.CsvRowOutputWithHeaders csv, CurrencyAmount ccyAmount, String amountField, String currencyField, String directionField)
Writes a currency amount using the provided fields- Parameters:
csv
- the csv row outputccyAmount
- the currency amount to writeamountField
- the amount headercurrencyField
- the currency headerdirectionField
- the direction header
-
writeZonedDateTime
public static void writeZonedDateTime(CsvOutput.CsvRowOutputWithHeaders csv, ZonedDateTime zonedDateTime, String dateField, String timeField, String zoneField)
Writes a zoned date time using the provided field- Parameters:
csv
- the csv row outputzonedDateTime
- the zoned date time objectdateField
- the date fieldtimeField
- the time fieldzoneField
- the zone field
-
writeBarrier
public static void writeBarrier(CsvOutput.CsvRowOutputWithHeaders csv, Barrier barrier, LocalDate obsDate)
Writes a Barrier object to CSV- Parameters:
csv
- the csv row outputbarrier
- the barrierobsDate
- the barrier observation date
-
writeFxSingle
public static void writeFxSingle(CsvOutput.CsvRowOutputWithHeaders csv, String prefix, FxSingle product)
Write the FxSingle to CSV- Parameters:
csv
- the csv row outputprefix
- a prefix to use on leg headers (often far / near)product
- the fx single
-
writeFxVanillaOption
public static void writeFxVanillaOption(CsvOutput.CsvRowOutputWithHeaders csv, FxVanillaOption product)
Write a FxVanillaOption to CSV- Parameters:
csv
- the csv row outputproduct
- the product
-
writeSwap
public static void writeSwap(CsvOutput.CsvRowOutputWithHeaders csv, Swap product)
Write a Swap to CSV- Parameters:
csv
- the csv row outputproduct
- the swap to write
-
writeSecurityQuantityTrade
public static void writeSecurityQuantityTrade(CsvOutput.CsvRowOutputWithHeaders csv, SecurityQuantityTrade trade)
Write a SecurityQuantityTrade to CSV- Parameters:
csv
- the csv row outputtrade
- the security quantity trade
-
-