/** * <p> * The remaining upfront cost of the reservation. * </p> * * @param remainingUpfrontValue * The remaining upfront cost of the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withRemainingUpfrontValue(String remainingUpfrontValue) { setRemainingUpfrontValue(remainingUpfrontValue); 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 remaining upfront cost of the reservation. * </p> * * @param remainingUpfrontValue * The remaining upfront cost of the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withRemainingUpfrontValue(String remainingUpfrontValue) { setRemainingUpfrontValue(remainingUpfrontValue); 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; } } } }