Class CsvMarketPriceWriter
java.lang.Object
com.bluebell.greenhouse.sol.writers.AbstractWriter<MarketPrice>
com.bluebell.greenhouse.sol.writers.market.price.impl.CsvMarketPriceWriter
- All Implemented Interfaces:
MarketPriceWriter
@Component("csvMarketPriceWriter")
public class CsvMarketPriceWriter
extends AbstractWriter<MarketPrice>
implements MarketPriceWriter
Implementation of
MarketPriceWriter for csv values.- Version:
- 1.0.10
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwriteMarketPrices(SymbolAlias symbolAlias, MarketTimeInterval timeInterval, String delimiter) Writes market prices for the givenSymbolAliasand interval using unix timestamps.writeMarketPrices(SymbolAlias symbolAlias, MarketTimeInterval timeInterval, String delimiter, String dateTimeFormat) Writes market prices for the givenSymbolAliasand interval using the provided date time format when present.writeMarketPrices(SymbolAlias symbolAlias, MarketTimeInterval timeInterval, LocalDateTime start, LocalDateTime end, String delimiter, String dateTimeFormat) Writes market prices for the givenSymbolAliasand interval, filtered by the optional start and end period bounds.voidwriteMarketPrices(SymbolAlias symbolAlias, MarketTimeInterval timeInterval, LocalDateTime start, LocalDateTime end, String delimiter, String dateTimeFormat, Writer writer) Writes market prices for the givenSymbolAliasand interval to the provided writer, filtered by the optional start and end period bounds.Methods inherited from class AbstractWriter
writeDelimitedString, writeDelimitedStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MarketPriceWriter
validateWriterParameters
-
Constructor Details
-
CsvMarketPriceWriter
public CsvMarketPriceWriter()
-
-
Method Details
-
writeMarketPrices
public String writeMarketPrices(SymbolAlias symbolAlias, MarketTimeInterval timeInterval, String delimiter) Writes market prices for the givenSymbolAliasand interval using unix timestamps.- Specified by:
writeMarketPricesin interfaceMarketPriceWriter- Parameters:
symbolAlias-SymbolAliastimeInterval-MarketTimeIntervaldelimiter- delimiter- Returns:
- string
-
writeMarketPrices
public String writeMarketPrices(SymbolAlias symbolAlias, MarketTimeInterval timeInterval, String delimiter, String dateTimeFormat) Writes market prices for the givenSymbolAliasand interval using the provided date time format when present.- Specified by:
writeMarketPricesin interfaceMarketPriceWriter- Parameters:
symbolAlias-SymbolAliastimeInterval-MarketTimeIntervaldelimiter- delimiterdateTimeFormat- optional date time format- Returns:
- string
-
writeMarketPrices
public String writeMarketPrices(SymbolAlias symbolAlias, MarketTimeInterval timeInterval, LocalDateTime start, LocalDateTime end, String delimiter, String dateTimeFormat) Writes market prices for the givenSymbolAliasand interval, filtered by the optional start and end period bounds.- Specified by:
writeMarketPricesin interfaceMarketPriceWriter- Parameters:
symbolAlias-SymbolAliastimeInterval-MarketTimeIntervalstart- optional start date time, inclusiveend- optional end date time, exclusivedelimiter- delimiterdateTimeFormat- optional date time format- Returns:
- string
-
writeMarketPrices
public void writeMarketPrices(SymbolAlias symbolAlias, MarketTimeInterval timeInterval, LocalDateTime start, LocalDateTime end, String delimiter, String dateTimeFormat, Writer writer) throws IOException Writes market prices for the givenSymbolAliasand interval to the provided writer, filtered by the optional start and end period bounds.- Specified by:
writeMarketPricesin interfaceMarketPriceWriter- Parameters:
symbolAlias-SymbolAliastimeInterval-MarketTimeIntervalstart- optional start date time, inclusiveend- optional end date time, exclusivedelimiter- delimiterdateTimeFormat- optional date time formatwriter- destination writer- Throws:
IOException- io exception while writing
-