String maxQuantityStr, List<String> positionIdStrs, List<String> tradeIdStrs) {
minQuantityStr = StringUtils.defaultString(minQuantityStr).replace(",", "");
maxQuantityStr = StringUtils.defaultString(maxQuantityStr).replace(",", "");
FlexiBean out = createRootData();
PositionSearchRequest searchRequest = new PositionSearchRequest();
searchRequest.setPagingRequest(pr);
searchRequest.setSecurityIdValue(StringUtils.trimToNull(identifier));
if (NumberUtils.isNumber(minQuantityStr)) {
searchRequest.setMinQuantity(NumberUtils.createBigDecimal(minQuantityStr));
}
if (NumberUtils.isNumber(maxQuantityStr)) {
searchRequest.setMaxQuantity(NumberUtils.createBigDecimal(maxQuantityStr));
}
for (String positionIdStr : positionIdStrs) {
searchRequest.addPositionObjectId(ObjectId.parse(positionIdStr));
}
for (String tradeIdStr : tradeIdStrs) {
searchRequest.addPositionObjectId(ObjectId.parse(tradeIdStr));
}
out.put("searchRequest", searchRequest);
if (data().getUriInfo().getQueryParameters().size() > 0) {
PositionSearchResult searchResult = data().getPositionMaster().search(searchRequest);