/** * <p> * The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining). * </p> * * @param remainingTotalValue * The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours * remaining). * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withRemainingTotalValue(String remainingTotalValue) { setRemainingTotalValue(remainingTotalValue); return this; }
public ReservationValue unmarshall(StaxUnmarshallerContext context) throws Exception { ReservationValue reservationValue = new ReservationValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return reservationValue; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("hourlyPrice", targetDepth)) { reservationValue.setHourlyPrice(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("remainingTotalValue", targetDepth)) { reservationValue.setRemainingTotalValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("remainingUpfrontValue", targetDepth)) { reservationValue.setRemainingUpfrontValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return reservationValue; } } } }
/** * <p> * The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining). * </p> * * @param remainingTotalValue * The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours * remaining). * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withRemainingTotalValue(String remainingTotalValue) { setRemainingTotalValue(remainingTotalValue); return this; }
public ReservationValue unmarshall(StaxUnmarshallerContext context) throws Exception { ReservationValue reservationValue = new ReservationValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return reservationValue; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("hourlyPrice", targetDepth)) { reservationValue.setHourlyPrice(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("remainingTotalValue", targetDepth)) { reservationValue.setRemainingTotalValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("remainingUpfrontValue", targetDepth)) { reservationValue.setRemainingUpfrontValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return reservationValue; } } } }