Interface ReportService


  • public interface ReportService
    Provides access to reports.
    Since:
    2.4.2
    Version:
    $Id$
    Author:
    Colin DuPlantis
    • Method Detail

      • save

        Report save​(Report inReport)
        Saves the given report.
        Parameters:
        inReport - a Report value
        Returns:
        a Report value
      • getReportFor

        Report getReportFor​(ReportID inReportId)
        Gets the report for the given report ID.
        Parameters:
        inReportId - a ReportID value
        Returns:
        a Report value or null
      • 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 - an OrderID value
        Returns:
        an OrderStatus value
      • getReports

        CollectionPageResponse<Report> getReports​(PageRequest inPageRequest)
        Get reports with the given page request.
        Parameters:
        inPageRequest - a PageRequest value
        Returns:
        a CollectionPageResponse<Report> 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 OrderID can 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 - an OrderID value
        Returns:
        an Optional<ExecutionReport> value
      • purgeReportsBefore

        int purgeReportsBefore​(Date inPurgeDate)
        Purges reports before the given date.
        Parameters:
        inPurgeDate - a Date value
        Returns:
        an int value 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 - a User value
        inDate - a Date value
        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 - a User value
        inDate - a Date value
        inInstrument - an Instrument value
        Returns:
        a BigDecimal value
      • 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 - a User value
        inDate - a Date value
        inEquity - an Equity value
        Returns:
        a BigDecimal value
      • getOpenOrders

        List<ReportBaseImpl> getOpenOrders​(User inUser)
        Gets the open orders visible to the given user.
        Parameters:
        inUser - a User value
        Returns:
        a List<ReportBaseImpl value
      • 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 - a User value
        inDate - a Date value
        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 - a User value
        inDate - a Date value
        inCurrency - a Currency value
        Returns:
        a BigDecimal value
      • 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 - a User value a User value
        inDate - a Date value
        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 - a User value
        inDate - a Date value
        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 - a User value
        inDate - a Date value
        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 - a User value
        inDate - a Date value
        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 - a User value
        inDate - a Date value
        inFuture - a Future value
        Returns:
        a BigDecimal value
      • 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 - a User value
        inDate - a Date value
        inConvertibleBond - a ConvertibleBond value
        Returns:
        a BigDecimal value
      • 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 - a User value
        inDate - a Date value
        inOption - an Option value
        Returns:
        a BigDecimal value
      • 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 - a User value
        inDate - a Date value
        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 - a User value
        inDate - a Date value
        inSymbols - a String[] value
        Returns:
        a Map<PositionKey<Option>,BigDecimal< value
      • save

        Report save​(ReportBase inReport)
        Saves the given report.
        Parameters:
        inReport - a ReportBase value
      • delete

        void delete​(ReportID inReportId)
        Delete the report with the given report ID.
        Parameters:
        inReportId - a ReportID value
      • getRootOrderIdFor

        OrderID getRootOrderIdFor​(OrderID inOrderID)
        Gets the order ID of the root of this order chain.
        Parameters:
        inOrderID - an OrderID value
        Returns:
        an OrderID value or null
      • 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 - a quickfix.SessionID value
        inDate - a Date value
        Returns:
        an int value
      • 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 - a quickfix.SessionID value
        inMessageTypes - a Set<String> value
        inSince - a Date value
        Returns:
        a List<Long> value
      • findIncomingMessagesForIdIn

        List<IncomingMessage> findIncomingMessagesForIdIn​(Set<Long> inIds)
        Finds the incoming messages with the given ids.
        Parameters:
        inIds - a Set<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 - an int value
        inPageSize - an int value
        Returns:
        a Page<ExecutionReportSummary> value
      • assignReportId

        void assignReportId​(HasMutableReportID inReport)
        Assign a report id to the given report.
        Parameters:
        inReport - a HasMutableReportID value
      • 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 - a HasFIXMessage value
        inBrokerID - a BrokerID value
        inUserId - a UserID value
      • getAverageFillPrices

        CollectionPageResponse<AverageFillPrice> getAverageFillPrices​(PageRequest inPageRequest)
        Get the average fill price values.
        Parameters:
        inPageRequest - a PageRequest value
        Returns:
        a CollectionPageResponse<AverageFillPrice> value