mirror of
https://github.com/alibaba/fastjson.git
synced 2026-10-28 22:04:04 +08:00
删除无用代码
git-svn-id: http://code.alibabatech.com/svn/fastjson/trunk/fastjson@1409 fb902949-7fc4-4485-a80f-4d6ff335c879
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class Generic<T> implements Serializable{
|
||||
String header;
|
||||
T payload;
|
||||
|
||||
// List<T>
|
||||
|
||||
public String getHeader() {
|
||||
return header;
|
||||
}
|
||||
|
||||
public void setHeader(String header) {
|
||||
this.header = header;
|
||||
}
|
||||
|
||||
public T getPayload() {
|
||||
return payload;
|
||||
}
|
||||
|
||||
public void setPayload(T payload) {
|
||||
this.payload = payload;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson;
|
||||
|
||||
public class Header {
|
||||
private String taskId;
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
}
|
||||
@@ -1,418 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.time.StopWatch;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.serializer.JSONSerializer;
|
||||
import com.alibaba.fastjson.serializer.SerializeWriter;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.derbysoft.spitfire.fastjson.dto.AvailGuaranteeDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.AvailRoomStayDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.CancelPenaltyType;
|
||||
import com.derbysoft.spitfire.fastjson.dto.CancelPolicyDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.CardCode;
|
||||
import com.derbysoft.spitfire.fastjson.dto.ChargeItemDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.ChargeType;
|
||||
import com.derbysoft.spitfire.fastjson.dto.ChargeUnit;
|
||||
import com.derbysoft.spitfire.fastjson.dto.Currency;
|
||||
import com.derbysoft.spitfire.fastjson.dto.DateRangeDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.FreeMealDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.FreeMealType;
|
||||
import com.derbysoft.spitfire.fastjson.dto.GenericRS;
|
||||
import com.derbysoft.spitfire.fastjson.dto.GuaranteeType;
|
||||
import com.derbysoft.spitfire.fastjson.dto.HotelAvailRS;
|
||||
import com.derbysoft.spitfire.fastjson.dto.HotelAvailRoomStayDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.HotelRefDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.LanguageType;
|
||||
import com.derbysoft.spitfire.fastjson.dto.MealsIncludedDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.MealsIncludedType;
|
||||
import com.derbysoft.spitfire.fastjson.dto.PaymentType;
|
||||
import com.derbysoft.spitfire.fastjson.dto.ProviderChainDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.RateDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.RatePlanDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.ResponseHeader;
|
||||
import com.derbysoft.spitfire.fastjson.dto.RoomRateDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.RoomTypeDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.SimpleAmountDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.TPAExtensionsDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.UniqueIDDTO;
|
||||
import com.derbysoft.spitfire.fastjson.dto.UniqueIDType;
|
||||
|
||||
public class TestFastJson {
|
||||
|
||||
|
||||
private static final int TIMES = 10000;
|
||||
private static final int STAYS_COUNT = 10;
|
||||
|
||||
public void f_testF() {
|
||||
Generic<String> q = new Generic<String>();
|
||||
byte[] text = JSON.toJSONBytes(q, SerializerFeature.WriteClassName);
|
||||
JSON.parseObject(text, Generic.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void test() throws Exception {
|
||||
|
||||
String text = JSON.toJSONString(createTest(), SerializerFeature.WriteClassName, SerializerFeature.PrettyFormat);
|
||||
System.out.println(text);
|
||||
System.out.println("serialize finished");
|
||||
GenericRS<HotelAvailRS> o = (GenericRS<HotelAvailRS>) JSON.parseObject(text, GenericRS.class);
|
||||
|
||||
System.out.println(o);
|
||||
}
|
||||
|
||||
public void f_testFP() throws IOException {
|
||||
Generic<String> q = new Generic<String>();
|
||||
for (int x = 0; x < STAYS_COUNT; ++x) {
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
for (int i = 0; i < TIMES; ++i) {
|
||||
jsonSerialize(q);
|
||||
}
|
||||
stopWatch.stop();
|
||||
|
||||
System.out.println("JSON serialize:" + stopWatch.getTime());
|
||||
|
||||
stopWatch.reset();
|
||||
stopWatch.start();
|
||||
for (int i = 0; i < TIMES; ++i) {
|
||||
javaSerialize(q);
|
||||
}
|
||||
stopWatch.stop();
|
||||
System.out.println("JAVA serialize:" + stopWatch.getTime());
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
private <T> void jsonSerialize(T t) throws IOException {
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
SerializeWriter out = new SerializeWriter(SerializerFeature.WriteClassName);
|
||||
// SerializeWriter out = new SerializeWriter();
|
||||
JSONSerializer serializer = new JSONSerializer(out);
|
||||
serializer.write(t);
|
||||
out.writeTo(os, "UTF-8");
|
||||
}
|
||||
|
||||
private <T> void javaSerialize(T t) throws IOException {
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ObjectOutputStream oos = new ObjectOutputStream(os);
|
||||
oos.writeObject(t);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> T jsonDeserialize(byte[] bytes, Class<T> clazz) throws IOException {
|
||||
return (T) JSON.parseObject(bytes, clazz);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> T javaDeserialize(byte[] bytes) throws IOException, ClassNotFoundException {
|
||||
ByteArrayInputStream is = new ByteArrayInputStream(bytes);
|
||||
ObjectInputStream ois = new ObjectInputStream(is);
|
||||
return (T) ois.readObject();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void f_testSerializePerformance() throws IOException {
|
||||
Object obj = createExpectedHotelAvailRS();
|
||||
|
||||
for (int x = 0; x < 20; ++x) {
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
for (int i = 0; i < TIMES; ++i) {
|
||||
jsonSerialize(obj);
|
||||
}
|
||||
stopWatch.stop();
|
||||
|
||||
System.out.println("JSON serialize:" + stopWatch.getTime());
|
||||
|
||||
stopWatch.reset();
|
||||
stopWatch.start();
|
||||
for (int i = 0; i < TIMES; ++i) {
|
||||
javaSerialize(obj);
|
||||
}
|
||||
stopWatch.stop();
|
||||
System.out.println("JAVA serialize:" + stopWatch.getTime());
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void f_testDeserializePerformance() throws IOException, ClassNotFoundException {
|
||||
Object obj = createExpectedHotelAvailRS();
|
||||
byte[] bytes = JSON.toJSONBytes(obj, SerializerFeature.WriteClassName);
|
||||
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
ObjectOutputStream oos = new ObjectOutputStream(os);
|
||||
oos.writeObject(obj);
|
||||
byte[] javaBytes = os.toByteArray();
|
||||
|
||||
System.out.println(bytes.length);
|
||||
|
||||
for (int x = 0; x < 20; ++x) {
|
||||
StopWatch stopWatch = new StopWatch();
|
||||
stopWatch.start();
|
||||
for (int i = 0; i < TIMES; ++i) {
|
||||
// ByteArrayInputStream is = new ByteArrayInputStream(bytes);
|
||||
Object o = jsonDeserialize(bytes, HotelAvailRS.class);
|
||||
o.getClass();
|
||||
}
|
||||
stopWatch.stop();
|
||||
|
||||
System.out.println("JSON deserialize:" + stopWatch.getTime());
|
||||
|
||||
stopWatch.reset();
|
||||
|
||||
stopWatch.start();
|
||||
for (int i = 0; i < TIMES; ++i) {
|
||||
Object o = javaDeserialize(javaBytes);
|
||||
o.getClass();
|
||||
}
|
||||
stopWatch.stop();
|
||||
|
||||
System.out.println("JAVA deserialize:" + stopWatch.getTime());
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public GenericRS<HotelAvailRS> createTest() {
|
||||
GenericRS<HotelAvailRS> rs = new GenericRS<HotelAvailRS>();
|
||||
rs.setHeader(new ResponseHeader("dsfsdfsd"));
|
||||
HotelAvailRS hotelAvailRS = createExpectedHotelAvailRS();
|
||||
TPAExtensionsDTO extensions = new TPAExtensionsDTO();
|
||||
extensions.getElements().put("dfd", "Dfdf");
|
||||
hotelAvailRS.setTpaExtensions(extensions);
|
||||
rs.setPayload(hotelAvailRS);
|
||||
return rs;
|
||||
}
|
||||
|
||||
|
||||
// private static final String HOTEL_DESC = "foo hotel desc";
|
||||
private static final String ROOM_TYPE_CODE = "foo room type code";
|
||||
private static final String ROOM_TYPE_NAME = "foo room type name";
|
||||
private static final String RATE_PLAN_CODE = "foo rate plan code";
|
||||
private static final String RATE_PLAN_NAME = "rate plan name";
|
||||
private static final Integer ROOM_COUNT = 2;
|
||||
|
||||
// private static final Date CANCEL_POLICY_DEAD_LINE = DateUtils.parseUseDefaultFormat("2008-09-01");
|
||||
private static final String CANCEL_POLICY_DESCRIPTION = "foo cancel policy description";
|
||||
|
||||
private static final String GUARANTEE_DESCRIPTION = "foo guarantee description";
|
||||
// private static final String CARD_NUMBER = "foo card number";
|
||||
// private static final String CARD_HOLDER_NAME = "foo card holder name";
|
||||
// private static final String CARD_SERIES_CODE = "foo card series code";
|
||||
// private static final Date CARD_EXPIRE_DATE = DateUtils.parseUseDefaultFormat("2010-12-31");
|
||||
private static final Currency CURRENCY = Currency.CNY;
|
||||
|
||||
private static final PaymentType PAYMENT_TYPE_POA = PaymentType.POA;
|
||||
// private static final int DAY_COUNT = 4;
|
||||
// private static final String[] CHECKIN_DATES = {"2008-08-25", "2008-08-26", "2008-08-27", "2008-08-28"};
|
||||
// private static final String[] CHECKOUT_DATES = {"2008-08-26", "2008-08-27", "2008-08-28", "2008-08-29"};
|
||||
// private static final BigDecimal[] AMOUNT_AFTER_TAXS
|
||||
// = {new BigDecimal(800), new BigDecimal(800), new BigDecimal(800), new BigDecimal(900)};
|
||||
private static final BigDecimal[] AMOUNT_BEFORE_TAXS
|
||||
= {new BigDecimal(750), new BigDecimal(750), new BigDecimal(760), new BigDecimal(880)};
|
||||
private static final BigDecimal AMOUNT_TAX = new BigDecimal(50);
|
||||
private static final BigDecimal SERVICE_CHARGE_AMOUNT = new BigDecimal(10);
|
||||
private static final String TAX_DESC = "foo tax desc";
|
||||
private static final String SERVICE_CHARGE_DESC = "foo repository charge desc";
|
||||
|
||||
private static final String PROVIDER_CODE = "hilton";
|
||||
private static final String HOTEL_NAME = "foo hotel name";
|
||||
private static final String HOTEL_CODE = "foo hotel code";
|
||||
private static final LanguageType LANGUAGE_TYPE_CN = LanguageType.ZH_CN;
|
||||
// private static final String TASK_ID = "task id";
|
||||
private static final boolean NEED_GUARANTEE = true;
|
||||
private static final CardCode VISA = CardCode.VISA;
|
||||
// private static final String CARD_CODE = VISA.getCode();
|
||||
|
||||
private static final int NUMBER_ZERO = 0;
|
||||
private static final int NUMBER_ONE = 1;
|
||||
private static final int NUMBER_TWO = 2;
|
||||
private static final int NUMBER_THREE = 3;
|
||||
|
||||
private HotelAvailRS createExpectedHotelAvailRS() {
|
||||
HotelAvailRS payLoad = new HotelAvailRS();
|
||||
payLoad.setHotelAvailRoomStay(createExpectedHotelAvailRoomStay());
|
||||
return payLoad;
|
||||
}
|
||||
|
||||
private HotelAvailRoomStayDTO createExpectedHotelAvailRoomStay() {
|
||||
HotelAvailRoomStayDTO hotelAvailRoomStay = new HotelAvailRoomStayDTO();
|
||||
hotelAvailRoomStay.setHotelRef(createExpectedHotelRef());
|
||||
hotelAvailRoomStay.setRoomStays(createExpectedRoomStays());
|
||||
return hotelAvailRoomStay;
|
||||
}
|
||||
|
||||
private List<AvailRoomStayDTO> createExpectedRoomStays() {
|
||||
ArrayList<AvailRoomStayDTO> roomStays = new ArrayList<AvailRoomStayDTO>();
|
||||
AvailRoomStayDTO roomStay = new AvailRoomStayDTO();
|
||||
roomStay.setLanguageType(LANGUAGE_TYPE_CN);
|
||||
roomStay.setRoomType(createExpectedRoomType());
|
||||
roomStay.setRatePlan(createExpectedRatePlan());
|
||||
roomStay.setQuantity(ROOM_COUNT);
|
||||
roomStay.setRoomRate(createExpectedRoomRate());
|
||||
roomStay.setProviderChain(createExpectedProviderChain());
|
||||
for (int i = 0; i < STAYS_COUNT; ++i) {
|
||||
roomStays.add(roomStay);
|
||||
}
|
||||
|
||||
return roomStays;
|
||||
}
|
||||
|
||||
private ProviderChainDTO createExpectedProviderChain() {
|
||||
ProviderChainDTO providerChain = new ProviderChainDTO();
|
||||
List<UniqueIDDTO> providers = new ArrayList<UniqueIDDTO>();
|
||||
UniqueIDDTO provider = new UniqueIDDTO(PROVIDER_CODE, UniqueIDType.HOTEL);
|
||||
provider.setCompanyName(PROVIDER_CODE);
|
||||
providers.add(provider);
|
||||
providerChain.setProviders(providers);
|
||||
return providerChain;
|
||||
}
|
||||
|
||||
private List<AvailGuaranteeDTO> createExpectedAvailGuarantee() {
|
||||
List<AvailGuaranteeDTO> availGuarantees = new ArrayList<AvailGuaranteeDTO>();
|
||||
AvailGuaranteeDTO availGuaranteeDTO = new AvailGuaranteeDTO();
|
||||
availGuaranteeDTO.setGuaranteeType(GuaranteeType.CreditCard);
|
||||
availGuaranteeDTO.setCardCode(VISA);
|
||||
availGuaranteeDTO.setTpaExtensions(createExpectedEpaExtensions());
|
||||
availGuarantees.add(availGuaranteeDTO);
|
||||
return availGuarantees;
|
||||
}
|
||||
|
||||
private TPAExtensionsDTO createExpectedEpaExtensions() {
|
||||
TPAExtensionsDTO tpaExtensions = new TPAExtensionsDTO();
|
||||
tpaExtensions.setElement("description", GUARANTEE_DESCRIPTION);
|
||||
return tpaExtensions;
|
||||
}
|
||||
|
||||
private CancelPolicyDTO createExpectedCancelPolicy() {
|
||||
CancelPolicyDTO cancelPolicyDTO = new CancelPolicyDTO();
|
||||
cancelPolicyDTO.setCancelPenaltyType(CancelPenaltyType.UNKNOWN);
|
||||
cancelPolicyDTO.setDeadline("16:00");
|
||||
cancelPolicyDTO.setDescription(CANCEL_POLICY_DESCRIPTION);
|
||||
return cancelPolicyDTO;
|
||||
}
|
||||
|
||||
private RoomRateDTO createExpectedRoomRate() {
|
||||
RoomRateDTO roomRate = new RoomRateDTO();
|
||||
List<RateDTO> rates = new ArrayList<RateDTO>();
|
||||
rates.add(createExpectedFirstDayRate());
|
||||
rates.add(createExpectedSecondDayRate());
|
||||
rates.add(createExpectedThirdDayRate());
|
||||
rates.add(createExpectedForthDayRate());
|
||||
roomRate.setRates(rates);
|
||||
return roomRate;
|
||||
}
|
||||
|
||||
private RatePlanDTO createExpectedRatePlan() {
|
||||
RatePlanDTO ratePlan = new RatePlanDTO();
|
||||
ratePlan.setCode(RATE_PLAN_CODE);
|
||||
ratePlan.setName(RATE_PLAN_NAME);
|
||||
ratePlan.setPaymentType(PAYMENT_TYPE_POA); //TODO paymentType only cash back?
|
||||
ratePlan.setTaxes(createExpectedTaxs());
|
||||
ratePlan.setServiceCharges(createExpectedServiceCharges());
|
||||
ratePlan.setNeedGuarantee(NEED_GUARANTEE);
|
||||
ratePlan.setCancelPolicy(createExpectedCancelPolicy());
|
||||
ratePlan.setAvailGuarantees(createExpectedAvailGuarantee()); //TODO translator
|
||||
ratePlan.setFreeMeal(createExpectedFreeMeal());
|
||||
return ratePlan;
|
||||
}
|
||||
|
||||
private FreeMealDTO createExpectedFreeMeal() {
|
||||
FreeMealDTO freeMeal = new FreeMealDTO();
|
||||
freeMeal.setType(FreeMealType.NONE);
|
||||
return freeMeal;
|
||||
}
|
||||
|
||||
private RoomTypeDTO createExpectedRoomType() {
|
||||
RoomTypeDTO roomType = new RoomTypeDTO();
|
||||
roomType.setCode(ROOM_TYPE_CODE);
|
||||
roomType.setName(ROOM_TYPE_NAME);
|
||||
return roomType;
|
||||
}
|
||||
|
||||
private RateDTO createExpectedForthDayRate() {
|
||||
return createExpectedRateDTO(NUMBER_THREE);
|
||||
}
|
||||
|
||||
private RateDTO createExpectedThirdDayRate() {
|
||||
return createExpectedRateDTO(NUMBER_TWO);
|
||||
}
|
||||
|
||||
private RateDTO createExpectedSecondDayRate() {
|
||||
return createExpectedRateDTO(NUMBER_ONE);
|
||||
}
|
||||
|
||||
private RateDTO createExpectedFirstDayRate() {
|
||||
return createExpectedRateDTO(NUMBER_ZERO);
|
||||
}
|
||||
|
||||
private RateDTO createExpectedRateDTO(int index) {
|
||||
RateDTO rate = new RateDTO();
|
||||
rate.setDateRange(createExpectedDateRangeDTO());
|
||||
rate.setPureAmount(createExpectedAmountDTO(CURRENCY, AMOUNT_BEFORE_TAXS[index]));
|
||||
rate.setMealsIncluded(new MealsIncludedDTO(MealsIncludedType.UNKNOWN));
|
||||
return rate;
|
||||
}
|
||||
|
||||
private List<ChargeItemDTO> createExpectedServiceCharges() {
|
||||
List<ChargeItemDTO> serviceCharges = new ArrayList<ChargeItemDTO>();
|
||||
ChargeItemDTO serviceCharge = new ChargeItemDTO();
|
||||
serviceCharge.setUnit(ChargeUnit.PER_NIGHT);
|
||||
serviceCharge.setType(ChargeType.FIXED);
|
||||
serviceCharge.setValue(SERVICE_CHARGE_AMOUNT);
|
||||
serviceCharge.setDescription(SERVICE_CHARGE_DESC);
|
||||
serviceCharges.add(serviceCharge);
|
||||
return serviceCharges;
|
||||
}
|
||||
|
||||
private List<ChargeItemDTO> createExpectedTaxs() {
|
||||
List<ChargeItemDTO> taxs = new ArrayList<ChargeItemDTO>();
|
||||
ChargeItemDTO tax = new ChargeItemDTO();
|
||||
tax.setUnit(ChargeUnit.PER_NIGHT);
|
||||
tax.setValue(AMOUNT_TAX);
|
||||
tax.setType(ChargeType.FIXED);
|
||||
tax.setDescription(TAX_DESC);
|
||||
taxs.add(tax);
|
||||
return taxs;
|
||||
}
|
||||
|
||||
private SimpleAmountDTO createExpectedAmountDTO(Currency currency, BigDecimal amount) {
|
||||
SimpleAmountDTO simpleAmountDTO = new SimpleAmountDTO();
|
||||
simpleAmountDTO.setCurrency(currency);
|
||||
simpleAmountDTO.setAmount(amount);
|
||||
return simpleAmountDTO;
|
||||
}
|
||||
|
||||
|
||||
private DateRangeDTO createExpectedDateRangeDTO() {
|
||||
DateRangeDTO dateRangeDTO = new DateRangeDTO();
|
||||
dateRangeDTO.setStart(new Date());
|
||||
dateRangeDTO.setEnd(new Date());
|
||||
return dateRangeDTO;
|
||||
}
|
||||
|
||||
private HotelRefDTO createExpectedHotelRef() {
|
||||
HotelRefDTO hotelRef = new HotelRefDTO();
|
||||
hotelRef.setCode(HOTEL_CODE);
|
||||
hotelRef.setName(HOTEL_NAME);
|
||||
return hotelRef;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public abstract class AbstractDTO implements Serializable {
|
||||
private boolean keepgoingValidate = false;
|
||||
|
||||
private boolean checkCircularReference = true;
|
||||
|
||||
public boolean isKeepgoingValidate() {
|
||||
return keepgoingValidate;
|
||||
}
|
||||
|
||||
public void setKeepgoingValidate(boolean keepgoingValidate) {
|
||||
this.keepgoingValidate = keepgoingValidate;
|
||||
}
|
||||
|
||||
public boolean isCheckCircularReference() {
|
||||
return checkCircularReference;
|
||||
}
|
||||
|
||||
public void setCheckCircularReference(boolean checkCircularReference) {
|
||||
this.checkCircularReference = checkCircularReference;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class AbstractRS extends AbstractDTO {
|
||||
private SuccessDTO success;
|
||||
private WarningsDTO warnings;
|
||||
private ErrorsDTO errors;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum AgeQualifyingType {
|
||||
ADULT
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class AvailGuaranteeDTO extends AbstractDTO{
|
||||
private GuaranteeType guaranteeType;
|
||||
private CardCode cardCode;
|
||||
private TPAExtensionsDTO tpaExtensions;
|
||||
|
||||
public void setGuaranteeType(GuaranteeType guaranteeType) {
|
||||
this.guaranteeType = guaranteeType;
|
||||
}
|
||||
|
||||
public void setCardCode(CardCode cardCode) {
|
||||
this.cardCode = cardCode;
|
||||
}
|
||||
|
||||
public void setTpaExtensions(TPAExtensionsDTO tpaExtensions) {
|
||||
this.tpaExtensions = tpaExtensions;
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class AvailRoomStayDTO extends AbstractDTO {
|
||||
private RoomTypeDTO roomType;
|
||||
|
||||
private RatePlanDTO ratePlan;
|
||||
|
||||
private RoomRateDTO roomRate;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private ProviderChainDTO providerChain;
|
||||
|
||||
private LanguageType languageType;
|
||||
|
||||
private TPAExtensionsDTO tpaExtensions;
|
||||
|
||||
public RoomTypeDTO getRoomType() {
|
||||
return roomType;
|
||||
}
|
||||
|
||||
public void setRoomType(RoomTypeDTO roomType) {
|
||||
this.roomType = roomType;
|
||||
}
|
||||
|
||||
public RatePlanDTO getRatePlan() {
|
||||
return ratePlan;
|
||||
}
|
||||
|
||||
public void setRatePlan(RatePlanDTO ratePlan) {
|
||||
this.ratePlan = ratePlan;
|
||||
}
|
||||
|
||||
public RoomRateDTO getRoomRate() {
|
||||
return roomRate;
|
||||
}
|
||||
|
||||
public void setRoomRate(RoomRateDTO roomRate) {
|
||||
this.roomRate = roomRate;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public ProviderChainDTO getProviderChain() {
|
||||
return providerChain;
|
||||
}
|
||||
|
||||
public void setProviderChain(ProviderChainDTO providerChain) {
|
||||
this.providerChain = providerChain;
|
||||
}
|
||||
|
||||
public LanguageType getLanguageType() {
|
||||
return languageType;
|
||||
}
|
||||
|
||||
public void setLanguageType(LanguageType languageType) {
|
||||
this.languageType = languageType;
|
||||
}
|
||||
|
||||
public TPAExtensionsDTO getTpaExtensions() {
|
||||
return tpaExtensions;
|
||||
}
|
||||
|
||||
public void setTpaExtensions(TPAExtensionsDTO tpaExtensions) {
|
||||
this.tpaExtensions = tpaExtensions;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum BathType {
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum CancelPenaltyType {
|
||||
UNKNOWN
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class CancelPolicyDTO extends AbstractDTO{
|
||||
private CancelPenaltyType cancelPenaltyType;
|
||||
private String deadline;
|
||||
private String description;
|
||||
|
||||
public void setCancelPenaltyType(CancelPenaltyType cancelPenaltyType) {
|
||||
this.cancelPenaltyType = cancelPenaltyType;
|
||||
}
|
||||
|
||||
public void setDeadline(String deadline) {
|
||||
this.deadline = deadline;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum CardCode {
|
||||
VISA
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ChargeItemDTO extends AbstractDTO{
|
||||
private ChargeUnit unit;
|
||||
private ChargeType type;
|
||||
private BigDecimal value;
|
||||
private String description;
|
||||
|
||||
public void setUnit(ChargeUnit unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public void setType(ChargeType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public void setValue(BigDecimal value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum ChargeType {
|
||||
FIXED
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum ChargeUnit {
|
||||
PER_NIGHT
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum CompositeType {
|
||||
UNKNOWN
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum Currency {
|
||||
CNY
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class DateRangeDTO extends AbstractDTO{
|
||||
private Date start;
|
||||
private Date end;
|
||||
|
||||
public void setStart(Date start) {
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public void setEnd(Date end) {
|
||||
this.end = end;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class ErrorsDTO extends AbstractDTO{
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class FreeMealDTO extends AbstractDTO{
|
||||
private FreeMealType type;
|
||||
|
||||
public void setType(FreeMealType type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum FreeMealType {
|
||||
NONE
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
|
||||
public class GenericRS<T> {
|
||||
private ResponseHeader header;
|
||||
private T payload;
|
||||
|
||||
public T getPayload() {
|
||||
return payload;
|
||||
}
|
||||
|
||||
public void setPayload(T payload) {
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
public ResponseHeader getHeader() {
|
||||
return header;
|
||||
}
|
||||
|
||||
public void setHeader(ResponseHeader header) {
|
||||
this.header = header;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum GuaranteeType {
|
||||
CreditCard
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class GuestCountDTO extends AbstractDTO{
|
||||
private AgeQualifyingType ageQualifyingType;
|
||||
private int count;
|
||||
|
||||
public GuestCountDTO(AgeQualifyingType ageQualifyingType, int count) {
|
||||
this.ageQualifyingType = ageQualifyingType;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class HotelAvailRS extends AbstractRS {
|
||||
private HotelAvailRoomStayDTO hotelAvailRoomStay;
|
||||
|
||||
private TPAExtensionsDTO tpaExtensions;
|
||||
|
||||
public HotelAvailRoomStayDTO getHotelAvailRoomStay() {
|
||||
return hotelAvailRoomStay;
|
||||
}
|
||||
|
||||
public void setHotelAvailRoomStay(HotelAvailRoomStayDTO hotelAvailRoomStay) {
|
||||
this.hotelAvailRoomStay = hotelAvailRoomStay;
|
||||
}
|
||||
|
||||
public TPAExtensionsDTO getTpaExtensions() {
|
||||
return tpaExtensions;
|
||||
}
|
||||
|
||||
public void setTpaExtensions(TPAExtensionsDTO tpaExtensions) {
|
||||
this.tpaExtensions = tpaExtensions;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HotelAvailRoomStayDTO extends AbstractDTO{
|
||||
|
||||
|
||||
private List<AvailRoomStayDTO> roomStays = new ArrayList<AvailRoomStayDTO>();
|
||||
|
||||
private HotelRefDTO hotelRef;
|
||||
|
||||
private TPAExtensionsDTO tpaExtensions;
|
||||
|
||||
public List<AvailRoomStayDTO> getRoomStays() {
|
||||
return roomStays;
|
||||
}
|
||||
|
||||
public void setRoomStays(List<AvailRoomStayDTO> roomStays) {
|
||||
this.roomStays = roomStays;
|
||||
}
|
||||
|
||||
public HotelRefDTO getHotelRef() {
|
||||
return hotelRef;
|
||||
}
|
||||
|
||||
public void setHotelRef(HotelRefDTO hotelRef) {
|
||||
this.hotelRef = hotelRef;
|
||||
}
|
||||
|
||||
public TPAExtensionsDTO getTpaExtensions() {
|
||||
return tpaExtensions;
|
||||
}
|
||||
|
||||
public void setTpaExtensions(TPAExtensionsDTO tpaExtensions) {
|
||||
this.tpaExtensions = tpaExtensions;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class HotelRefDTO extends AbstractDTO{
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private String chainCode;
|
||||
|
||||
private String brandCode;
|
||||
|
||||
private TPAExtensionsDTO tpaExtensions;
|
||||
|
||||
public HotelRefDTO() {
|
||||
}
|
||||
|
||||
public HotelRefDTO(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getChainCode() {
|
||||
return chainCode;
|
||||
}
|
||||
|
||||
public void setChainCode(String chainCode) {
|
||||
this.chainCode = chainCode;
|
||||
}
|
||||
|
||||
public String getBrandCode() {
|
||||
return brandCode;
|
||||
}
|
||||
|
||||
public void setBrandCode(String brandCode) {
|
||||
this.brandCode = brandCode;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public TPAExtensionsDTO getTpaExtensions() {
|
||||
return tpaExtensions;
|
||||
}
|
||||
|
||||
public void setTpaExtensions(TPAExtensionsDTO tpaExtensions) {
|
||||
this.tpaExtensions = tpaExtensions;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class InternetDTO extends AbstractDTO{
|
||||
|
||||
private InternetType internetType;
|
||||
private String chargeInfo;
|
||||
|
||||
private TPAExtensionsDTO tpaExtensions;
|
||||
|
||||
public InternetType getInternetType() {
|
||||
return internetType;
|
||||
}
|
||||
|
||||
public void setInternetType(InternetType internetType) {
|
||||
this.internetType = internetType;
|
||||
}
|
||||
|
||||
public String getChargeInfo() {
|
||||
return chargeInfo;
|
||||
}
|
||||
|
||||
public void setChargeInfo(String chargeInfo) {
|
||||
this.chargeInfo = chargeInfo;
|
||||
}
|
||||
|
||||
public TPAExtensionsDTO getTpaExtensions() {
|
||||
return tpaExtensions;
|
||||
}
|
||||
|
||||
public void setTpaExtensions(TPAExtensionsDTO tpaExtensions) {
|
||||
this.tpaExtensions = tpaExtensions;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum InternetType {
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum LanguageType {
|
||||
ZH_CN
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class MealsIncludedDTO extends AbstractDTO{
|
||||
public MealsIncludedDTO(MealsIncludedType type) {
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum MealsIncludedType {
|
||||
UNKNOWN
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum PaymentType {
|
||||
POA,
|
||||
PREPAY
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ProviderChainDTO extends AbstractDTO{
|
||||
private List<UniqueIDDTO> providers;
|
||||
|
||||
|
||||
public List<UniqueIDDTO> getProviders() {
|
||||
return providers;
|
||||
}
|
||||
|
||||
public void setProviders(List<UniqueIDDTO> providers) {
|
||||
this.providers = providers;
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class RateDTO extends AbstractDTO{
|
||||
private DateRangeDTO dateRange;
|
||||
private SimpleAmountDTO pureAmount;
|
||||
private MealsIncludedDTO mealsIncluded;
|
||||
|
||||
public void setDateRange(DateRangeDTO dateRange) {
|
||||
this.dateRange = dateRange;
|
||||
}
|
||||
|
||||
public void setPureAmount(SimpleAmountDTO pureAmount) {
|
||||
this.pureAmount = pureAmount;
|
||||
}
|
||||
|
||||
public void setMealsIncluded(MealsIncludedDTO mealsIncluded) {
|
||||
this.mealsIncluded = mealsIncluded;
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RatePlanDTO extends AbstractDTO{
|
||||
private String code;
|
||||
private String name;
|
||||
private FreeMealDTO freeMeal;
|
||||
private PaymentType paymentType;
|
||||
private List<ChargeItemDTO> taxes;
|
||||
private List<ChargeItemDTO> serviceCharges;
|
||||
private boolean needGuarantee;
|
||||
private CancelPolicyDTO cancelPolicy;
|
||||
private List<AvailGuaranteeDTO> availGuarantees;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public FreeMealDTO getFreeMeal() {
|
||||
return freeMeal;
|
||||
}
|
||||
|
||||
public void setFreeMeal(FreeMealDTO freeMeal) {
|
||||
this.freeMeal = freeMeal;
|
||||
}
|
||||
|
||||
public PaymentType getPaymentType() {
|
||||
return paymentType;
|
||||
}
|
||||
|
||||
public void setPaymentType(PaymentType paymentType) {
|
||||
this.paymentType = paymentType;
|
||||
}
|
||||
|
||||
public List<ChargeItemDTO> getTaxes() {
|
||||
return taxes;
|
||||
}
|
||||
|
||||
public void setTaxes(List<ChargeItemDTO> taxes) {
|
||||
this.taxes = taxes;
|
||||
}
|
||||
|
||||
public List<ChargeItemDTO> getServiceCharges() {
|
||||
return serviceCharges;
|
||||
}
|
||||
|
||||
public void setServiceCharges(List<ChargeItemDTO> serviceCharges) {
|
||||
this.serviceCharges = serviceCharges;
|
||||
}
|
||||
|
||||
public boolean isNeedGuarantee() {
|
||||
return needGuarantee;
|
||||
}
|
||||
|
||||
public void setNeedGuarantee(boolean needGuarantee) {
|
||||
this.needGuarantee = needGuarantee;
|
||||
}
|
||||
|
||||
public CancelPolicyDTO getCancelPolicy() {
|
||||
return cancelPolicy;
|
||||
}
|
||||
|
||||
public void setCancelPolicy(CancelPolicyDTO cancelPolicy) {
|
||||
this.cancelPolicy = cancelPolicy;
|
||||
}
|
||||
|
||||
public List<AvailGuaranteeDTO> getAvailGuarantees() {
|
||||
return availGuarantees;
|
||||
}
|
||||
|
||||
public void setAvailGuarantees(List<AvailGuaranteeDTO> availGuarantees) {
|
||||
this.availGuarantees = availGuarantees;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class ResponseHeader {
|
||||
private String taskId;
|
||||
|
||||
public ResponseHeader() {
|
||||
|
||||
}
|
||||
|
||||
public ResponseHeader(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RoomRateDTO extends AbstractDTO{
|
||||
private List<RateDTO> rates;
|
||||
|
||||
public List<RateDTO> getRates() {
|
||||
return rates;
|
||||
}
|
||||
|
||||
public void setRates(List<RateDTO> rates) {
|
||||
this.rates = rates;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RoomStayCandidateDTO {
|
||||
public RoomStayCandidateDTO(int numberOfUnits, List<GuestCountDTO> guests) {
|
||||
//To change body of created methods use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RoomTypeDTO extends AbstractDTO{
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private String description;
|
||||
|
||||
private List<String> amenities = new ArrayList<String>();
|
||||
|
||||
private CompositeType compositeType = CompositeType.UNKNOWN;
|
||||
|
||||
private Integer floor;
|
||||
|
||||
private SmokingType smokingType = SmokingType.INDIFFERENT;
|
||||
|
||||
private String sizeMeasurement;
|
||||
|
||||
private Integer bedCount;
|
||||
|
||||
private Integer adultCount;
|
||||
|
||||
private Integer childCount;
|
||||
|
||||
private Integer maxGuestCount;
|
||||
|
||||
private Integer extraBedCount;
|
||||
|
||||
private BathType bathType;
|
||||
|
||||
private InternetDTO internet;
|
||||
|
||||
private TPAExtensionsDTO tpaExtensions;
|
||||
|
||||
public RoomTypeDTO() {
|
||||
}
|
||||
|
||||
public RoomTypeDTO(String code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<String> getAmenities() {
|
||||
return amenities;
|
||||
}
|
||||
|
||||
public void setAmenities(List<String> amenities) {
|
||||
this.amenities = amenities;
|
||||
}
|
||||
|
||||
public CompositeType getCompositeType() {
|
||||
return compositeType;
|
||||
}
|
||||
|
||||
public void setCompositeType(CompositeType compositeType) {
|
||||
this.compositeType = compositeType;
|
||||
}
|
||||
|
||||
public Integer getFloor() {
|
||||
return floor;
|
||||
}
|
||||
|
||||
public void setFloor(Integer floor) {
|
||||
this.floor = floor;
|
||||
}
|
||||
|
||||
public SmokingType getSmokingType() {
|
||||
return smokingType;
|
||||
}
|
||||
|
||||
public void setSmokingType(SmokingType smokingType) {
|
||||
this.smokingType = smokingType;
|
||||
}
|
||||
|
||||
public String getSizeMeasurement() {
|
||||
return sizeMeasurement;
|
||||
}
|
||||
|
||||
public void setSizeMeasurement(String sizeMeasurement) {
|
||||
this.sizeMeasurement = sizeMeasurement;
|
||||
}
|
||||
|
||||
public TPAExtensionsDTO getTpaExtensions() {
|
||||
return tpaExtensions;
|
||||
}
|
||||
|
||||
public void setTpaExtensions(TPAExtensionsDTO tpaExtensions) {
|
||||
this.tpaExtensions = tpaExtensions;
|
||||
}
|
||||
|
||||
public Integer getAdultCount() {
|
||||
return adultCount;
|
||||
}
|
||||
|
||||
public void setAdultCount(Integer adultCount) {
|
||||
this.adultCount = adultCount;
|
||||
}
|
||||
|
||||
public Integer getChildCount() {
|
||||
return childCount;
|
||||
}
|
||||
|
||||
public void setChildCount(Integer childCount) {
|
||||
this.childCount = childCount;
|
||||
}
|
||||
|
||||
public Integer getMaxGuestCount() {
|
||||
return maxGuestCount;
|
||||
}
|
||||
|
||||
public void setMaxGuestCount(Integer maxGuestCount) {
|
||||
this.maxGuestCount = maxGuestCount;
|
||||
}
|
||||
|
||||
public Integer getExtraBedCount() {
|
||||
return extraBedCount;
|
||||
}
|
||||
|
||||
public void setExtraBedCount(Integer extraBedCount) {
|
||||
this.extraBedCount = extraBedCount;
|
||||
}
|
||||
|
||||
public BathType getBathType() {
|
||||
return bathType;
|
||||
}
|
||||
|
||||
public void setBathType(BathType bathType) {
|
||||
this.bathType = bathType;
|
||||
}
|
||||
|
||||
public Integer getBedCount() {
|
||||
return bedCount;
|
||||
}
|
||||
|
||||
public void setBedCount(Integer bedCount) {
|
||||
this.bedCount = bedCount;
|
||||
}
|
||||
|
||||
public InternetDTO getInternet() {
|
||||
return internet;
|
||||
}
|
||||
|
||||
public void setInternet(InternetDTO internet) {
|
||||
this.internet = internet;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class SimpleAmountDTO extends AbstractDTO{
|
||||
private Currency currency;
|
||||
private BigDecimal amount;
|
||||
|
||||
public void setCurrency(Currency currency) {
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum SmokingType {
|
||||
INDIFFERENT
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class StayDateRangeDTO extends AbstractDTO {
|
||||
public StayDateRangeDTO(Date start, Date end) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SuccessDTO extends AbstractDTO{
|
||||
private List<String> messages = new ArrayList<String>();
|
||||
|
||||
public List<String> getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
||||
public void setMessages(List<String> infos) {
|
||||
this.messages = infos;
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MultiHashtable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class TPAExtensionsDTO extends AbstractDTO {
|
||||
private Map<String,String> elements = new HashMap<String, String>();
|
||||
|
||||
public Map<String,String> getElements() {
|
||||
return elements;
|
||||
}
|
||||
|
||||
public void setElements(Map<String, String> elements) {
|
||||
this.elements = elements;
|
||||
}
|
||||
|
||||
public void setElement(String key, String value) {
|
||||
elements.put(key,value);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class UniqueIDDTO extends AbstractDTO{
|
||||
private String companyName;
|
||||
|
||||
public UniqueIDDTO() {
|
||||
}
|
||||
|
||||
public UniqueIDDTO(String code, UniqueIDType type) {
|
||||
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public enum UniqueIDType {
|
||||
HOTEL
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
public class WarningDTO extends AbstractDTO{
|
||||
private String code;
|
||||
private String message;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.derbysoft.spitfire.fastjson.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class WarningsDTO extends AbstractDTO{
|
||||
private List<WarningDTO> warningList = new ArrayList<WarningDTO>();
|
||||
|
||||
public List<WarningDTO> getWarningList() {
|
||||
return warningList;
|
||||
}
|
||||
|
||||
public void setWarningList(List<WarningDTO> warnings) {
|
||||
this.warningList = warnings;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user