Package com.betfair.baseline.v2.to

Examples of com.betfair.baseline.v2.to.BodyParamMapDateTimeKeyObject


    Map<String,SomeComplexObject> requestMap = message.getComplexMap();
    Object[] requestMapKeys = requestMap.keySet().toArray();
    Arrays.sort(requestMapKeys);

    if (requestMap.size() == 1 && requestMapKeys[0].toString().equalsIgnoreCase("DELEGATE")) {
      ComplexMapOperationResponseObjectDelegate delegate = new ComplexMapOperationResponseObjectDelegateImpl();
      return new ComplexMapOperationResponseObject(delegate);
    }
    else {

      Map<String,SomeComplexObject> responseMap = new LinkedHashMap<String,SomeComplexObject>();
View Full Code Here


        LargeRequest result = new LargeRequest();
        result.setObjects(new ArrayList<ComplexObject>());
        result.setSize(size);
        result.setOddOrEven(size % 2 == 0 ? LargeRequestOddOrEvenEnum.EVEN : LargeRequestOddOrEvenEnum.ODD);
        for (int i = 0; i < size; i++) {
            ComplexObject o = new ComplexObject();
            o.setName("name " + i);
            o.setValue1(i);
            o.setValue2(i + 1);
            result.getObjects().add(o);
        }
        return result;
    }
View Full Code Here

        ctx.setRequestLogExtension(new BaselineLogExtension(size, null, null));
        MapDataType result = new MapDataType();
        result.setCache(new HashMap<Integer, ComplexObject>());
        result.setSomeMap(new HashMap<String, ComplexObject>());
        for (int i = 0; i < size; i++) {
            ComplexObject o = new ComplexObject();
            o.setName("name " + i);
            o.setValue1(i);
            o.setValue2(i + 1);
            result.getCache().put(i, o);
            result.getSomeMap().put(String.valueOf(i), o);
        }

        return result;
View Full Code Here

      responseComplexObject.setStringParameter(requestComplexObject.getStringParameter());

      responseSet.add(responseComplexObject);
    }

    ComplexSetOperationResponseObject response = new ComplexSetOperationResponseObject();
    response.setResponseSet(responseSet);
    return response;
  }
View Full Code Here

    @KPITimedEvent(value = "Baseline.service.testDateRetrieval", catchFailures = true)
    @Override
    public DateContainer testDateRetrieval(RequestContext ctx, DateContainer inputDates, TimeConstraints timeConstraints) throws SimpleException {
        ctx.setRequestLogExtension(new BaselineLogExtension(inputDates.getFirst(), inputDates.getLast(), inputDates.getDifference()));
        DateContainer response = new DateContainer();
        response.setFirst(inputDates.getFirst());
        response.setLast(inputDates.getLast());
        response.setName("First Passed Date: " + inputDates.getFirst() + ", Second Passed Date: " + inputDates.getLast());
        List<Date> dateList = inputDates.getAllDates();
        response.setAllDates(dateList);
        response.setDifference(inputDates.getDifference());
        return response;
    }
View Full Code Here

    for (Date object : requestList) {
      responseList.add(object);
    }

    DateTimeListOperationResponseObject responseObject = new DateTimeListOperationResponseObject();
    responseObject.setResponseList(responseList);

    return responseObject;

  }
View Full Code Here

    for (String key : requestMap.keySet()) {
      responseMap.put(key, requestMap.get(key));
    }

    DateTimeMapOperationResponseObject responseObject = new DateTimeMapOperationResponseObject();
    responseObject.setResponseMap(responseMap);

    return responseObject;

  }
View Full Code Here

  @Override
  public DateTimeOperationResponseObject dateTimeOperation(RequestContext ctx, BodyParamDateTimeObject message, TimeConstraints timeConstraints) throws SimpleException {

    ctx.setRequestLogExtension(new BaselineLogExtension(message, null, null));

    DateTimeOperationResponseObject responseObject = new DateTimeOperationResponseObject();

    Date requestDate = message.getDateTimeParameter();
    Date createdDate = new Date(requestDate.getTime());

    responseObject.setLocalTime(requestDate);
    responseObject.setLocalTime2(createdDate);

    return responseObject;

  }
View Full Code Here

    for (Date object : requestSet) {
      responseSet.add(object);
    }

    DateTimeSetOperationResponseObject responseObject = new DateTimeSetOperationResponseObject();
    responseObject.setResponseSet(responseSet);

    return responseObject;

  }
View Full Code Here

  public DoubleOperationResponseObject doubleOperation(RequestContext ctx, Double headerParam, Double queryParam,
      BodyParamDoubleObject message, TimeConstraints timeConstraints) throws SimpleException {

    ctx.setRequestLogExtension(new BaselineLogExtension(message, null, null));

    DoubleOperationResponseObject returnObject = new DoubleOperationResponseObject();

    returnObject.setBodyParameter(message.getBodyParameter());
    returnObject.setHeaderParameter(headerParam);
    returnObject.setQueryParameter(queryParam);

    return returnObject;
  }
View Full Code Here

TOP

Related Classes of com.betfair.baseline.v2.to.BodyParamMapDateTimeKeyObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.