Class APnLVectorSubstitutionRestService<T extends PnLVectorSubstitutionDTO>
- java.lang.Object
-
- com.activeviam.risk.ref.rest.services.impl.APnLVectorSubstitutionRestService<T>
-
- Type Parameters:
T
- T
- All Implemented Interfaces:
IPnLVectorSubstitutionRestService<T>
- Direct Known Subclasses:
PnLVectorSubstitutionRestService
public abstract class APnLVectorSubstitutionRestService<T extends PnLVectorSubstitutionDTO> extends Object implements IPnLVectorSubstitutionRestService<T>
Abstract implementation of IPnLVectorSubstitutionRestService
-
-
Field Summary
Fields Modifier and Type Field Description protected com.qfs.store.IDatastore
datastore
-
Constructor Summary
Constructors Constructor Description APnLVectorSubstitutionRestService(com.qfs.store.IDatastore datastore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.qfs.condition.ICondition
generateTradeCondition(PnLVectorSubstitutionDTO dto)
Generate the ICondition used to retrieve the data corresponding to the trades to substituteSet<String>
getPreviousAsOfDates(com.qfs.condition.ICondition condition)
Retrieve the set of previous as of dates for a given IConditionjavax.ws.rs.core.Response
getPreviousAsOfDates(String tradeId, String asOfDate, String scenarioSet, String calculationId, String riskFactor)
RESTFul call to retrieve the previous as of dates for a given set of criteriaMap<String,com.qfs.vector.IVector>
getPreviousDayVectors(PnLVectorSubstitutionDTO dto)
Retrieve the PnL vectors for previous dayLocalDate
parseAsOfDate(String asOfDate)
Parse the as of date string representation into a LocalDate-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.activeviam.risk.ref.rest.services.IPnLVectorSubstitutionRestService
submit
-
-
-
-
Method Detail
-
generateTradeCondition
public com.qfs.condition.ICondition generateTradeCondition(PnLVectorSubstitutionDTO dto)
Generate the ICondition used to retrieve the data corresponding to the trades to substitute- Parameters:
dto
- the DTO- Returns:
- ICondition
-
getPreviousDayVectors
public Map<String,com.qfs.vector.IVector> getPreviousDayVectors(PnLVectorSubstitutionDTO dto)
Retrieve the PnL vectors for previous day- Parameters:
dto
- the DTO- Returns:
- A map with the risk factor as key and the PnL vector as value
-
getPreviousAsOfDates
public javax.ws.rs.core.Response getPreviousAsOfDates(String tradeId, String asOfDate, String scenarioSet, String calculationId, String riskFactor)
RESTFul call to retrieve the previous as of dates for a given set of criteria- Specified by:
getPreviousAsOfDates
in interfaceIPnLVectorSubstitutionRestService<T extends PnLVectorSubstitutionDTO>
- Parameters:
tradeId
- the tradeIdasOfDate
- the asOfDatescenarioSet
- the scenarioSetcalculationId
- the calculationIdriskFactor
- the riskFactor- Returns:
- Response
-
getPreviousAsOfDates
public Set<String> getPreviousAsOfDates(com.qfs.condition.ICondition condition)
Retrieve the set of previous as of dates for a given ICondition- Parameters:
condition
- the ICondition- Returns:
- the set of as of dates
-
-