Package org.marketcetera.trade.service
Interface ReportService
-
public interface ReportServiceProvides access to reports.- Since:
- 2.4.2
- Version:
- $Id$
- Author:
- Colin DuPlantis
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddReport(HasFIXMessage inMessage, BrokerID inBrokerID, UserID inUserId)Add the given report to the system data flow.voidassignReportId(HasMutableReportID inReport)Assign a report id to the given report.voiddelete(ReportID inReportId)Delete the report with the given report ID.List<IncomingMessage>findIncomingMessagesForIdIn(Set<Long> inIds)Finds the incoming messages with the given ids.intfindLastSequenceNumberFor(quickfix.SessionID inSessionId, Date inDate)Finds the last sequence number known for the given session since the given moment in time.List<Long>findUnhandledIncomingMessageIds(quickfix.SessionID inSessionId, Set<String> inMessageTypes, Date inSince)Finds the ids of the unhandled incoming FIX messages of the given types for the given session since the given date.Map<PositionKey<ConvertibleBond>,BigDecimal>getAllConvertibleBondPositionsAsOf(User inUser, Date inDate)Gets all convertible bond positions as of the given date visible to the given user.Map<PositionKey<Currency>,BigDecimal>getAllCurrencyPositionsAsOf(User inUser, Date inDate)Gets all currency positions as of the given date visible to the given user.Map<PositionKey<Equity>,BigDecimal>getAllEquityPositionsAsOf(User inUser, Date inDate)Gets all equity positions as of the given date visible to the given user.Map<PositionKey<Future>,BigDecimal>getAllFuturePositionsAsOf(User inUser, Date inDate)Gets all future positions as of the given date visible to the given user.Map<PositionKey<Option>,BigDecimal>getAllOptionPositionsAsOf(User inUser, Date inDate)Gets all option positions as of the given date visible to the given user.Map<PositionKey<? extends Instrument>,BigDecimal>getAllPositionsAsOf(User inUser, Date inDate)Get all positions as of the given date visible to the given user.CollectionPageResponse<AverageFillPrice>getAverageFillPrices(PageRequest inPageRequest)Get the average fill price values.BigDecimalgetConvertibleBondPositionAsOf(User inUser, Date inDate, ConvertibleBond inConvertibleBond)Gets the position of the given convertible bond as of the given date visible to the given user.BigDecimalgetCurrencyPositionAsOf(User inUser, Date inDate, Currency inCurrency)Gets the position of the given currency as of the given date visible to the given user.BigDecimalgetEquityPositionAsOf(User inUser, Date inDate, Equity inEquity)Gets the position of the given equity as of the given date from the point of view of the given user.org.springframework.data.domain.Page<? extends ExecutionReportSummary>getExecutions(int inPageNumber, int inPageSize)Get a page of executions from oldest to newest.CollectionPageResponse<ExecutionReportSummary>getFills(PageRequest inPageRequest)Get fills with the given page request.BigDecimalgetFuturePositionAsOf(User inUser, Date inDate, Future inFuture)Gets the position of the given future as of the given date visible to the given user.Optional<ExecutionReport>getLatestExecutionReportForOrderChain(OrderID inOrderId)Get the most recent execution report for the order chain represented by the given order id.List<ReportBaseImpl>getOpenOrders(User inUser)Gets the open orders visible to the given user.BigDecimalgetOptionPositionAsOf(User inUser, Date inDate, Option inOption)Gets the position of the given option as of the given date visible to the given user.Map<PositionKey<Option>,BigDecimal>getOptionPositionsAsOf(User inUser, Date inDate, String[] inSymbols)Gets the positions of the options of the given root symbols as of the given date visible to the given user.OrderStatusgetOrderStatusForOrderChain(OrderID inOrderId)Get the order status of the most recent order in the order chain to which the given order id belongs.BigDecimalgetPositionAsOf(User inUser, Date inDate, Instrument inInstrument)Get the position of the given instrument as of the given date from the point of view of the given user.ReportgetReportFor(ReportID inReportId)Gets the report for the given report ID.CollectionPageResponse<Report>getReports(PageRequest inPageRequest)Get reports with the given page request.List<ReportBase>getReportsSince(User inUser, Date inDate)Gets the reports visible to the given user since the given date.OrderIDgetRootOrderIdFor(OrderID inOrderID)Gets the order ID of the root of this order chain.intpurgeReportsBefore(Date inPurgeDate)Purges reports before the given date.Reportsave(Report inReport)Saves the given report.Reportsave(ReportBase inReport)Saves the given report.
-
-
-
Method Detail
-
save
Report save(Report inReport)
Saves the given report.- Parameters:
inReport- aReportvalue- Returns:
- a
Reportvalue
-
getReportFor
Report getReportFor(ReportID inReportId)
Gets the report for the given report ID.- Parameters:
inReportId- aReportIDvalue- Returns:
- a
Reportvalue ornull
-
getOrderStatusForOrderChain
OrderStatus getOrderStatusForOrderChain(OrderID inOrderId)
Get the order status of the most recent order in the order chain to which the given order id belongs.- Parameters:
inOrderId- anOrderIDvalue- Returns:
- an
OrderStatusvalue
-
getReports
CollectionPageResponse<Report> getReports(PageRequest inPageRequest)
Get reports with the given page request.- Parameters:
inPageRequest- aPageRequestvalue- Returns:
- a
CollectionPageResponse<Report>value
-
getFills
CollectionPageResponse<ExecutionReportSummary> getFills(PageRequest inPageRequest)
Get fills with the given page request.- Parameters:
inPageRequest- aPageRequestvalue- Returns:
- a
CollectionPageResponse<ExecutionReportSummary>value
-
getLatestExecutionReportForOrderChain
Optional<ExecutionReport> getLatestExecutionReportForOrderChain(OrderID inOrderId)
Get the most recent execution report for the order chain represented by the given order id.The given
OrderIDcan be either from any order in the chain or the root order id for the chain. In either case, the most recent execution report for the entire chain will be returned, not the given order necessarily.If no execution report exists for any order in the given chain, the call will return nothing.
- Parameters:
inOrderId- anOrderIDvalue- Returns:
- an
Optional<ExecutionReport>value
-
purgeReportsBefore
int purgeReportsBefore(Date inPurgeDate)
Purges reports before the given date.- Parameters:
inPurgeDate- aDatevalue- Returns:
- an
intvalue containing the number of reports purged
-
getReportsSince
List<ReportBase> getReportsSince(User inUser, Date inDate)
Gets the reports visible to the given user since the given date.- Parameters:
inUser- aUservalueinDate- aDatevalue- Returns:
- a
List<ReportBase>value
-
getPositionAsOf
BigDecimal getPositionAsOf(User inUser, Date inDate, Instrument inInstrument)
Get the position of the given instrument as of the given date from the point of view of the given user.- Parameters:
inUser- aUservalueinDate- aDatevalueinInstrument- anInstrumentvalue- Returns:
- a
BigDecimalvalue
-
getEquityPositionAsOf
BigDecimal getEquityPositionAsOf(User inUser, Date inDate, Equity inEquity)
Gets the position of the given equity as of the given date from the point of view of the given user.- Parameters:
inUser- aUservalueinDate- aDatevalueinEquity- anEquityvalue- Returns:
- a
BigDecimalvalue
-
getOpenOrders
List<ReportBaseImpl> getOpenOrders(User inUser)
Gets the open orders visible to the given user.- Parameters:
inUser- aUservalue- Returns:
- a
List<ReportBaseImplvalue
-
getAllEquityPositionsAsOf
Map<PositionKey<Equity>,BigDecimal> getAllEquityPositionsAsOf(User inUser, Date inDate)
Gets all equity positions as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalue- Returns:
- a
Map<PositionKey<Equity>,BigDecimal<value
-
getCurrencyPositionAsOf
BigDecimal getCurrencyPositionAsOf(User inUser, Date inDate, Currency inCurrency)
Gets the position of the given currency as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalueinCurrency- aCurrencyvalue- Returns:
- a
BigDecimalvalue
-
getAllPositionsAsOf
Map<PositionKey<? extends Instrument>,BigDecimal> getAllPositionsAsOf(User inUser, Date inDate)
Get all positions as of the given date visible to the given user.- Parameters:
inUser- aUservalue aUservalueinDate- aDatevalue- Returns:
- a
Map<PositionKey<? extends Instrument>,BigDecimal<value
-
getAllCurrencyPositionsAsOf
Map<PositionKey<Currency>,BigDecimal> getAllCurrencyPositionsAsOf(User inUser, Date inDate)
Gets all currency positions as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalue- Returns:
- a
Map<PositionKey<Currency>,BigDecimal<value
-
getAllConvertibleBondPositionsAsOf
Map<PositionKey<ConvertibleBond>,BigDecimal> getAllConvertibleBondPositionsAsOf(User inUser, Date inDate)
Gets all convertible bond positions as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalue- Returns:
- a
Map<PositionKey<ConvertibleBond>,BigDecimal<value
-
getAllFuturePositionsAsOf
Map<PositionKey<Future>,BigDecimal> getAllFuturePositionsAsOf(User inUser, Date inDate)
Gets all future positions as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalue- Returns:
- a
Map<PositionKey<Future>,BigDecimal<value
-
getFuturePositionAsOf
BigDecimal getFuturePositionAsOf(User inUser, Date inDate, Future inFuture)
Gets the position of the given future as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalueinFuture- aFuturevalue- Returns:
- a
BigDecimalvalue
-
getConvertibleBondPositionAsOf
BigDecimal getConvertibleBondPositionAsOf(User inUser, Date inDate, ConvertibleBond inConvertibleBond)
Gets the position of the given convertible bond as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalueinConvertibleBond- aConvertibleBondvalue- Returns:
- a
BigDecimalvalue
-
getOptionPositionAsOf
BigDecimal getOptionPositionAsOf(User inUser, Date inDate, Option inOption)
Gets the position of the given option as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalueinOption- anOptionvalue- Returns:
- a
BigDecimalvalue
-
getAllOptionPositionsAsOf
Map<PositionKey<Option>,BigDecimal> getAllOptionPositionsAsOf(User inUser, Date inDate)
Gets all option positions as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalue- Returns:
- a
Map<PositionKey<Option>,BigDecimal<value
-
getOptionPositionsAsOf
Map<PositionKey<Option>,BigDecimal> getOptionPositionsAsOf(User inUser, Date inDate, String[] inSymbols)
Gets the positions of the options of the given root symbols as of the given date visible to the given user.- Parameters:
inUser- aUservalueinDate- aDatevalueinSymbols- aString[]value- Returns:
- a
Map<PositionKey<Option>,BigDecimal<value
-
save
Report save(ReportBase inReport)
Saves the given report.- Parameters:
inReport- aReportBasevalue
-
delete
void delete(ReportID inReportId)
Delete the report with the given report ID.- Parameters:
inReportId- aReportIDvalue
-
getRootOrderIdFor
OrderID getRootOrderIdFor(OrderID inOrderID)
Gets the order ID of the root of this order chain.- Parameters:
inOrderID- anOrderIDvalue- Returns:
- an
OrderIDvalue ornull
-
findLastSequenceNumberFor
int findLastSequenceNumberFor(quickfix.SessionID inSessionId, Date inDate)Finds the last sequence number known for the given session since the given moment in time.- Parameters:
inSessionId- aquickfix.SessionIDvalueinDate- aDatevalue- Returns:
- an
intvalue
-
findUnhandledIncomingMessageIds
List<Long> findUnhandledIncomingMessageIds(quickfix.SessionID inSessionId, Set<String> inMessageTypes, Date inSince)
Finds the ids of the unhandled incoming FIX messages of the given types for the given session since the given date.- Parameters:
inSessionId- aquickfix.SessionIDvalueinMessageTypes- aSet<String>valueinSince- aDatevalue- Returns:
- a
List<Long>value
-
findIncomingMessagesForIdIn
List<IncomingMessage> findIncomingMessagesForIdIn(Set<Long> inIds)
Finds the incoming messages with the given ids.- Parameters:
inIds- aSet<Long>value- Returns:
- a
List<IncomingMessage>value
-
getExecutions
org.springframework.data.domain.Page<? extends ExecutionReportSummary> getExecutions(int inPageNumber, int inPageSize)
Get a page of executions from oldest to newest.- Parameters:
inPageNumber- anintvalueinPageSize- anintvalue- Returns:
- a
Page<ExecutionReportSummary>value
-
assignReportId
void assignReportId(HasMutableReportID inReport)
Assign a report id to the given report.- Parameters:
inReport- aHasMutableReportIDvalue
-
addReport
void addReport(HasFIXMessage inMessage, BrokerID inBrokerID, UserID inUserId)
Add the given report to the system data flow.Reports added this way will be added to the system data bus. Reports will be persisted and become part of the system record. The report will be owned by the given user.
This will affect reported positions
.- Parameters:
inMessage- aHasFIXMessagevalueinBrokerID- aBrokerIDvalueinUserId- aUserIDvalue
-
getAverageFillPrices
CollectionPageResponse<AverageFillPrice> getAverageFillPrices(PageRequest inPageRequest)
Get the average fill price values.- Parameters:
inPageRequest- aPageRequestvalue- Returns:
- a
CollectionPageResponse<AverageFillPrice>value
-
-