return carList;
}
private ConfirmationType getCarReservation(ReservationType reservation) {
ConfirmationType status = resFactory.createConfirmationType();
status.setCustomer(reservation.getCustomer());
status.setFromDate(reservation.getFromDate());
status.setToDate(reservation.getToDate());
String clazz = reservation.getCar().getClazz();
status.setCreditPoints(new BigInteger("0"));
if (clazz.equalsIgnoreCase("BASIC")) {
status.setCreditPoints(new BigInteger("120"));
} else if (clazz.equalsIgnoreCase("STANDRAD")) {
status.setCreditPoints(new BigInteger("180"));
} else if (clazz.equalsIgnoreCase("SPORT")) {
status.setCreditPoints(new BigInteger("210"));
} else if (clazz.equalsIgnoreCase("SUV")) {
status.setCreditPoints(new BigInteger("280"));
} else if (clazz.equalsIgnoreCase("DELUX")) {
status.setCreditPoints(new BigInteger("280"));
}
// status.setCode(RESStatucCodeType.OK);
if (reservation.getReservationId() != null) {
status.setReservationId(reservation.getReservationId());
}
status.setDescription("Your reservation is booked!");
RESCarType car = reservation.getCar();
status.setCar(car);
if (car != null) {
// check design model
String model = car.getDesignModel();
if ((model != null) && (model.equalsIgnoreCase("GOLF"))) {
//
// status.setCode(RESStatucCodeType.FAILED);
status.setDescription("Your reservation failed! This car is booked by an other customer already.");
}
}
return status;
}