| Line 31... |
Line 31... |
| 31 |
|
31 |
|
| 32 |
public Coupon getCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
32 |
public Coupon getCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
| 33 |
|
33 |
|
| 34 |
public boolean isGiftVoucher(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
34 |
public boolean isGiftVoucher(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
| 35 |
|
35 |
|
| - |
|
36 |
public boolean isCodApplicable(String couponCode) throws PromotionException, org.apache.thrift.TException;
|
| - |
|
37 |
|
| 36 |
public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException;
|
38 |
public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException;
|
| 37 |
|
39 |
|
| 38 |
public Promotion getPromotionById(long promotionId) throws PromotionException, org.apache.thrift.TException;
|
40 |
public Promotion getPromotionById(long promotionId) throws PromotionException, org.apache.thrift.TException;
|
| 39 |
|
41 |
|
| 40 |
public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException;
|
42 |
public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException;
|
| Line 55... |
Line 57... |
| 55 |
*
|
57 |
*
|
| 56 |
* @param promotionId
|
58 |
* @param promotionId
|
| 57 |
* @param endOn
|
59 |
* @param endOn
|
| 58 |
* @param email
|
60 |
* @param email
|
| 59 |
* @param amount
|
61 |
* @param amount
|
| - |
|
62 |
* @param isCod
|
| 60 |
* @param usage
|
63 |
* @param usage
|
| 61 |
*/
|
64 |
*/
|
| 62 |
public String createCoupon(long promotionId, long endOn, String email, long amount, long usage) throws PromotionException, org.apache.thrift.TException;
|
65 |
public String createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage) throws PromotionException, org.apache.thrift.TException;
|
| 63 |
|
66 |
|
| 64 |
/**
|
67 |
/**
|
| 65 |
* Returns the count of successful payments done using a given coupon
|
68 |
* Returns the count of successful payments done using a given coupon
|
| 66 |
*
|
69 |
*
|
| 67 |
* @param couponCode
|
70 |
* @param couponCode
|
| Line 93... |
Line 96... |
| 93 |
|
96 |
|
| 94 |
public void getCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
97 |
public void getCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
| 95 |
|
98 |
|
| 96 |
public void isGiftVoucher(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isGiftVoucher_call> resultHandler) throws org.apache.thrift.TException;
|
99 |
public void isGiftVoucher(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isGiftVoucher_call> resultHandler) throws org.apache.thrift.TException;
|
| 97 |
|
100 |
|
| - |
|
101 |
public void isCodApplicable(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isCodApplicable_call> resultHandler) throws org.apache.thrift.TException;
|
| - |
|
102 |
|
| 98 |
public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPromotions_call> resultHandler) throws org.apache.thrift.TException;
|
103 |
public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPromotions_call> resultHandler) throws org.apache.thrift.TException;
|
| 99 |
|
104 |
|
| 100 |
public void getPromotionById(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPromotionById_call> resultHandler) throws org.apache.thrift.TException;
|
105 |
public void getPromotionById(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPromotionById_call> resultHandler) throws org.apache.thrift.TException;
|
| 101 |
|
106 |
|
| 102 |
public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException;
|
107 |
public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException;
|
| Line 107... |
Line 112... |
| 107 |
|
112 |
|
| 108 |
public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
|
113 |
public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
|
| 109 |
|
114 |
|
| 110 |
public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
|
115 |
public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
|
| 111 |
|
116 |
|
| 112 |
public void createCoupon(long promotionId, long endOn, String email, long amount, long usage, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
117 |
public void createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
| 113 |
|
118 |
|
| 114 |
public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
119 |
public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
|
| 115 |
|
120 |
|
| 116 |
public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
|
121 |
public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
|
| 117 |
|
122 |
|
| Line 223... |
Line 228... |
| 223 |
throw result.pex;
|
228 |
throw result.pex;
|
| 224 |
}
|
229 |
}
|
| 225 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isGiftVoucher failed: unknown result");
|
230 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isGiftVoucher failed: unknown result");
|
| 226 |
}
|
231 |
}
|
| 227 |
|
232 |
|
| - |
|
233 |
public boolean isCodApplicable(String couponCode) throws PromotionException, org.apache.thrift.TException
|
| - |
|
234 |
{
|
| - |
|
235 |
send_isCodApplicable(couponCode);
|
| - |
|
236 |
return recv_isCodApplicable();
|
| - |
|
237 |
}
|
| - |
|
238 |
|
| - |
|
239 |
public void send_isCodApplicable(String couponCode) throws org.apache.thrift.TException
|
| - |
|
240 |
{
|
| - |
|
241 |
isCodApplicable_args args = new isCodApplicable_args();
|
| - |
|
242 |
args.setCouponCode(couponCode);
|
| - |
|
243 |
sendBase("isCodApplicable", args);
|
| - |
|
244 |
}
|
| - |
|
245 |
|
| - |
|
246 |
public boolean recv_isCodApplicable() throws PromotionException, org.apache.thrift.TException
|
| - |
|
247 |
{
|
| - |
|
248 |
isCodApplicable_result result = new isCodApplicable_result();
|
| - |
|
249 |
receiveBase(result, "isCodApplicable");
|
| - |
|
250 |
if (result.isSetSuccess()) {
|
| - |
|
251 |
return result.success;
|
| - |
|
252 |
}
|
| - |
|
253 |
if (result.pex != null) {
|
| - |
|
254 |
throw result.pex;
|
| - |
|
255 |
}
|
| - |
|
256 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isCodApplicable failed: unknown result");
|
| - |
|
257 |
}
|
| - |
|
258 |
|
| 228 |
public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException
|
259 |
public List<Promotion> getAllPromotions() throws PromotionException, org.apache.thrift.TException
|
| 229 |
{
|
260 |
{
|
| 230 |
send_getAllPromotions();
|
261 |
send_getAllPromotions();
|
| 231 |
return recv_getAllPromotions();
|
262 |
return recv_getAllPromotions();
|
| 232 |
}
|
263 |
}
|
| Line 402... |
Line 433... |
| 402 |
throw result.pex;
|
433 |
throw result.pex;
|
| 403 |
}
|
434 |
}
|
| 404 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
|
435 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
|
| 405 |
}
|
436 |
}
|
| 406 |
|
437 |
|
| 407 |
public String createCoupon(long promotionId, long endOn, String email, long amount, long usage) throws PromotionException, org.apache.thrift.TException
|
438 |
public String createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage) throws PromotionException, org.apache.thrift.TException
|
| 408 |
{
|
439 |
{
|
| 409 |
send_createCoupon(promotionId, endOn, email, amount, usage);
|
440 |
send_createCoupon(promotionId, endOn, email, amount, isCod, usage);
|
| 410 |
return recv_createCoupon();
|
441 |
return recv_createCoupon();
|
| 411 |
}
|
442 |
}
|
| 412 |
|
443 |
|
| 413 |
public void send_createCoupon(long promotionId, long endOn, String email, long amount, long usage) throws org.apache.thrift.TException
|
444 |
public void send_createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage) throws org.apache.thrift.TException
|
| 414 |
{
|
445 |
{
|
| 415 |
createCoupon_args args = new createCoupon_args();
|
446 |
createCoupon_args args = new createCoupon_args();
|
| 416 |
args.setPromotionId(promotionId);
|
447 |
args.setPromotionId(promotionId);
|
| 417 |
args.setEndOn(endOn);
|
448 |
args.setEndOn(endOn);
|
| 418 |
args.setEmail(email);
|
449 |
args.setEmail(email);
|
| 419 |
args.setAmount(amount);
|
450 |
args.setAmount(amount);
|
| - |
|
451 |
args.setIsCod(isCod);
|
| 420 |
args.setUsage(usage);
|
452 |
args.setUsage(usage);
|
| 421 |
sendBase("createCoupon", args);
|
453 |
sendBase("createCoupon", args);
|
| 422 |
}
|
454 |
}
|
| 423 |
|
455 |
|
| 424 |
public String recv_createCoupon() throws PromotionException, org.apache.thrift.TException
|
456 |
public String recv_createCoupon() throws PromotionException, org.apache.thrift.TException
|
| Line 723... |
Line 755... |
| 723 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
755 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
| 724 |
return (new Client(prot)).recv_isGiftVoucher();
|
756 |
return (new Client(prot)).recv_isGiftVoucher();
|
| 725 |
}
|
757 |
}
|
| 726 |
}
|
758 |
}
|
| 727 |
|
759 |
|
| - |
|
760 |
public void isCodApplicable(String couponCode, org.apache.thrift.async.AsyncMethodCallback<isCodApplicable_call> resultHandler) throws org.apache.thrift.TException {
|
| - |
|
761 |
checkReady();
|
| - |
|
762 |
isCodApplicable_call method_call = new isCodApplicable_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
|
| - |
|
763 |
this.___currentMethod = method_call;
|
| - |
|
764 |
___manager.call(method_call);
|
| - |
|
765 |
}
|
| - |
|
766 |
|
| - |
|
767 |
public static class isCodApplicable_call extends org.apache.thrift.async.TAsyncMethodCall {
|
| - |
|
768 |
private String couponCode;
|
| - |
|
769 |
public isCodApplicable_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<isCodApplicable_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
| - |
|
770 |
super(client, protocolFactory, transport, resultHandler, false);
|
| - |
|
771 |
this.couponCode = couponCode;
|
| - |
|
772 |
}
|
| - |
|
773 |
|
| - |
|
774 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
| - |
|
775 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isCodApplicable", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
| - |
|
776 |
isCodApplicable_args args = new isCodApplicable_args();
|
| - |
|
777 |
args.setCouponCode(couponCode);
|
| - |
|
778 |
args.write(prot);
|
| - |
|
779 |
prot.writeMessageEnd();
|
| - |
|
780 |
}
|
| - |
|
781 |
|
| - |
|
782 |
public boolean getResult() throws PromotionException, org.apache.thrift.TException {
|
| - |
|
783 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
| - |
|
784 |
throw new IllegalStateException("Method call not finished!");
|
| - |
|
785 |
}
|
| - |
|
786 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
| - |
|
787 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
| - |
|
788 |
return (new Client(prot)).recv_isCodApplicable();
|
| - |
|
789 |
}
|
| - |
|
790 |
}
|
| - |
|
791 |
|
| 728 |
public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<getAllPromotions_call> resultHandler) throws org.apache.thrift.TException {
|
792 |
public void getAllPromotions(org.apache.thrift.async.AsyncMethodCallback<getAllPromotions_call> resultHandler) throws org.apache.thrift.TException {
|
| 729 |
checkReady();
|
793 |
checkReady();
|
| 730 |
getAllPromotions_call method_call = new getAllPromotions_call(resultHandler, this, ___protocolFactory, ___transport);
|
794 |
getAllPromotions_call method_call = new getAllPromotions_call(resultHandler, this, ___protocolFactory, ___transport);
|
| 731 |
this.___currentMethod = method_call;
|
795 |
this.___currentMethod = method_call;
|
| 732 |
___manager.call(method_call);
|
796 |
___manager.call(method_call);
|
| Line 956... |
Line 1020... |
| 956 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
1020 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
| 957 |
return (new Client(prot)).recv_getActiveCoupons();
|
1021 |
return (new Client(prot)).recv_getActiveCoupons();
|
| 958 |
}
|
1022 |
}
|
| 959 |
}
|
1023 |
}
|
| 960 |
|
1024 |
|
| 961 |
public void createCoupon(long promotionId, long endOn, String email, long amount, long usage, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler) throws org.apache.thrift.TException {
|
1025 |
public void createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler) throws org.apache.thrift.TException {
|
| 962 |
checkReady();
|
1026 |
checkReady();
|
| 963 |
createCoupon_call method_call = new createCoupon_call(promotionId, endOn, email, amount, usage, resultHandler, this, ___protocolFactory, ___transport);
|
1027 |
createCoupon_call method_call = new createCoupon_call(promotionId, endOn, email, amount, isCod, usage, resultHandler, this, ___protocolFactory, ___transport);
|
| 964 |
this.___currentMethod = method_call;
|
1028 |
this.___currentMethod = method_call;
|
| 965 |
___manager.call(method_call);
|
1029 |
___manager.call(method_call);
|
| 966 |
}
|
1030 |
}
|
| 967 |
|
1031 |
|
| 968 |
public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
|
1032 |
public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
|
| 969 |
private long promotionId;
|
1033 |
private long promotionId;
|
| 970 |
private long endOn;
|
1034 |
private long endOn;
|
| 971 |
private String email;
|
1035 |
private String email;
|
| 972 |
private long amount;
|
1036 |
private long amount;
|
| - |
|
1037 |
private boolean isCod;
|
| 973 |
private long usage;
|
1038 |
private long usage;
|
| 974 |
public createCoupon_call(long promotionId, long endOn, String email, long amount, long usage, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
1039 |
public createCoupon_call(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
| 975 |
super(client, protocolFactory, transport, resultHandler, false);
|
1040 |
super(client, protocolFactory, transport, resultHandler, false);
|
| 976 |
this.promotionId = promotionId;
|
1041 |
this.promotionId = promotionId;
|
| 977 |
this.endOn = endOn;
|
1042 |
this.endOn = endOn;
|
| 978 |
this.email = email;
|
1043 |
this.email = email;
|
| 979 |
this.amount = amount;
|
1044 |
this.amount = amount;
|
| - |
|
1045 |
this.isCod = isCod;
|
| 980 |
this.usage = usage;
|
1046 |
this.usage = usage;
|
| 981 |
}
|
1047 |
}
|
| 982 |
|
1048 |
|
| 983 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
1049 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
| 984 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
1050 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
| 985 |
createCoupon_args args = new createCoupon_args();
|
1051 |
createCoupon_args args = new createCoupon_args();
|
| 986 |
args.setPromotionId(promotionId);
|
1052 |
args.setPromotionId(promotionId);
|
| 987 |
args.setEndOn(endOn);
|
1053 |
args.setEndOn(endOn);
|
| 988 |
args.setEmail(email);
|
1054 |
args.setEmail(email);
|
| 989 |
args.setAmount(amount);
|
1055 |
args.setAmount(amount);
|
| - |
|
1056 |
args.setIsCod(isCod);
|
| 990 |
args.setUsage(usage);
|
1057 |
args.setUsage(usage);
|
| 991 |
args.write(prot);
|
1058 |
args.write(prot);
|
| 992 |
prot.writeMessageEnd();
|
1059 |
prot.writeMessageEnd();
|
| 993 |
}
|
1060 |
}
|
| 994 |
|
1061 |
|
| Line 1252... |
Line 1319... |
| 1252 |
|
1319 |
|
| 1253 |
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
|
1320 |
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
|
| 1254 |
processMap.put("createPromotion", new createPromotion());
|
1321 |
processMap.put("createPromotion", new createPromotion());
|
| 1255 |
processMap.put("getCoupon", new getCoupon());
|
1322 |
processMap.put("getCoupon", new getCoupon());
|
| 1256 |
processMap.put("isGiftVoucher", new isGiftVoucher());
|
1323 |
processMap.put("isGiftVoucher", new isGiftVoucher());
|
| - |
|
1324 |
processMap.put("isCodApplicable", new isCodApplicable());
|
| 1257 |
processMap.put("getAllPromotions", new getAllPromotions());
|
1325 |
processMap.put("getAllPromotions", new getAllPromotions());
|
| 1258 |
processMap.put("getPromotionById", new getPromotionById());
|
1326 |
processMap.put("getPromotionById", new getPromotionById());
|
| 1259 |
processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
|
1327 |
processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
|
| 1260 |
processMap.put("applyCoupon", new applyCoupon());
|
1328 |
processMap.put("applyCoupon", new applyCoupon());
|
| 1261 |
processMap.put("trackCouponUsage", new trackCouponUsage());
|
1329 |
processMap.put("trackCouponUsage", new trackCouponUsage());
|
| Line 1331... |
Line 1399... |
| 1331 |
}
|
1399 |
}
|
| 1332 |
return result;
|
1400 |
return result;
|
| 1333 |
}
|
1401 |
}
|
| 1334 |
}
|
1402 |
}
|
| 1335 |
|
1403 |
|
| - |
|
1404 |
private static class isCodApplicable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isCodApplicable_args> {
|
| - |
|
1405 |
public isCodApplicable() {
|
| - |
|
1406 |
super("isCodApplicable");
|
| - |
|
1407 |
}
|
| - |
|
1408 |
|
| - |
|
1409 |
protected isCodApplicable_args getEmptyArgsInstance() {
|
| - |
|
1410 |
return new isCodApplicable_args();
|
| - |
|
1411 |
}
|
| - |
|
1412 |
|
| - |
|
1413 |
protected isCodApplicable_result getResult(I iface, isCodApplicable_args args) throws org.apache.thrift.TException {
|
| - |
|
1414 |
isCodApplicable_result result = new isCodApplicable_result();
|
| - |
|
1415 |
try {
|
| - |
|
1416 |
result.success = iface.isCodApplicable(args.couponCode);
|
| - |
|
1417 |
result.setSuccessIsSet(true);
|
| - |
|
1418 |
} catch (PromotionException pex) {
|
| - |
|
1419 |
result.pex = pex;
|
| - |
|
1420 |
}
|
| - |
|
1421 |
return result;
|
| - |
|
1422 |
}
|
| - |
|
1423 |
}
|
| - |
|
1424 |
|
| 1336 |
private static class getAllPromotions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPromotions_args> {
|
1425 |
private static class getAllPromotions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPromotions_args> {
|
| 1337 |
public getAllPromotions() {
|
1426 |
public getAllPromotions() {
|
| 1338 |
super("getAllPromotions");
|
1427 |
super("getAllPromotions");
|
| 1339 |
}
|
1428 |
}
|
| 1340 |
|
1429 |
|
| Line 1484... |
Line 1573... |
| 1484 |
}
|
1573 |
}
|
| 1485 |
|
1574 |
|
| 1486 |
protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
|
1575 |
protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
|
| 1487 |
createCoupon_result result = new createCoupon_result();
|
1576 |
createCoupon_result result = new createCoupon_result();
|
| 1488 |
try {
|
1577 |
try {
|
| 1489 |
result.success = iface.createCoupon(args.promotionId, args.endOn, args.email, args.amount, args.usage);
|
1578 |
result.success = iface.createCoupon(args.promotionId, args.endOn, args.email, args.amount, args.isCod, args.usage);
|
| 1490 |
} catch (PromotionException pex) {
|
1579 |
} catch (PromotionException pex) {
|
| 1491 |
result.pex = pex;
|
1580 |
result.pex = pex;
|
| 1492 |
}
|
1581 |
}
|
| 1493 |
return result;
|
1582 |
return result;
|
| 1494 |
}
|
1583 |
}
|
| Line 3814... |
Line 3903... |
| 3814 |
}
|
3903 |
}
|
| 3815 |
}
|
3904 |
}
|
| 3816 |
|
3905 |
|
| 3817 |
}
|
3906 |
}
|
| 3818 |
|
3907 |
|
| - |
|
3908 |
public static class isCodApplicable_args implements org.apache.thrift.TBase<isCodApplicable_args, isCodApplicable_args._Fields>, java.io.Serializable, Cloneable {
|
| - |
|
3909 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCodApplicable_args");
|
| - |
|
3910 |
|
| - |
|
3911 |
private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
|
| - |
|
3912 |
|
| - |
|
3913 |
private String couponCode; // required
|
| - |
|
3914 |
|
| - |
|
3915 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| - |
|
3916 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| - |
|
3917 |
COUPON_CODE((short)1, "couponCode");
|
| - |
|
3918 |
|
| - |
|
3919 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
| - |
|
3920 |
|
| - |
|
3921 |
static {
|
| - |
|
3922 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
| - |
|
3923 |
byName.put(field.getFieldName(), field);
|
| - |
|
3924 |
}
|
| - |
|
3925 |
}
|
| - |
|
3926 |
|
| - |
|
3927 |
/**
|
| - |
|
3928 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
| - |
|
3929 |
*/
|
| - |
|
3930 |
public static _Fields findByThriftId(int fieldId) {
|
| - |
|
3931 |
switch(fieldId) {
|
| - |
|
3932 |
case 1: // COUPON_CODE
|
| - |
|
3933 |
return COUPON_CODE;
|
| - |
|
3934 |
default:
|
| - |
|
3935 |
return null;
|
| - |
|
3936 |
}
|
| - |
|
3937 |
}
|
| - |
|
3938 |
|
| - |
|
3939 |
/**
|
| - |
|
3940 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
| - |
|
3941 |
* if it is not found.
|
| - |
|
3942 |
*/
|
| - |
|
3943 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
| - |
|
3944 |
_Fields fields = findByThriftId(fieldId);
|
| - |
|
3945 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
| - |
|
3946 |
return fields;
|
| - |
|
3947 |
}
|
| - |
|
3948 |
|
| - |
|
3949 |
/**
|
| - |
|
3950 |
* Find the _Fields constant that matches name, or null if its not found.
|
| - |
|
3951 |
*/
|
| - |
|
3952 |
public static _Fields findByName(String name) {
|
| - |
|
3953 |
return byName.get(name);
|
| - |
|
3954 |
}
|
| - |
|
3955 |
|
| - |
|
3956 |
private final short _thriftId;
|
| - |
|
3957 |
private final String _fieldName;
|
| - |
|
3958 |
|
| - |
|
3959 |
_Fields(short thriftId, String fieldName) {
|
| - |
|
3960 |
_thriftId = thriftId;
|
| - |
|
3961 |
_fieldName = fieldName;
|
| - |
|
3962 |
}
|
| - |
|
3963 |
|
| - |
|
3964 |
public short getThriftFieldId() {
|
| - |
|
3965 |
return _thriftId;
|
| - |
|
3966 |
}
|
| - |
|
3967 |
|
| - |
|
3968 |
public String getFieldName() {
|
| - |
|
3969 |
return _fieldName;
|
| - |
|
3970 |
}
|
| - |
|
3971 |
}
|
| - |
|
3972 |
|
| - |
|
3973 |
// isset id assignments
|
| - |
|
3974 |
|
| - |
|
3975 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| - |
|
3976 |
static {
|
| - |
|
3977 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
| - |
|
3978 |
tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| - |
|
3979 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| - |
|
3980 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
| - |
|
3981 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCodApplicable_args.class, metaDataMap);
|
| - |
|
3982 |
}
|
| - |
|
3983 |
|
| - |
|
3984 |
public isCodApplicable_args() {
|
| - |
|
3985 |
}
|
| - |
|
3986 |
|
| - |
|
3987 |
public isCodApplicable_args(
|
| - |
|
3988 |
String couponCode)
|
| - |
|
3989 |
{
|
| - |
|
3990 |
this();
|
| - |
|
3991 |
this.couponCode = couponCode;
|
| - |
|
3992 |
}
|
| - |
|
3993 |
|
| - |
|
3994 |
/**
|
| - |
|
3995 |
* Performs a deep copy on <i>other</i>.
|
| - |
|
3996 |
*/
|
| - |
|
3997 |
public isCodApplicable_args(isCodApplicable_args other) {
|
| - |
|
3998 |
if (other.isSetCouponCode()) {
|
| - |
|
3999 |
this.couponCode = other.couponCode;
|
| - |
|
4000 |
}
|
| - |
|
4001 |
}
|
| - |
|
4002 |
|
| - |
|
4003 |
public isCodApplicable_args deepCopy() {
|
| - |
|
4004 |
return new isCodApplicable_args(this);
|
| - |
|
4005 |
}
|
| - |
|
4006 |
|
| - |
|
4007 |
@Override
|
| - |
|
4008 |
public void clear() {
|
| - |
|
4009 |
this.couponCode = null;
|
| - |
|
4010 |
}
|
| - |
|
4011 |
|
| - |
|
4012 |
public String getCouponCode() {
|
| - |
|
4013 |
return this.couponCode;
|
| - |
|
4014 |
}
|
| - |
|
4015 |
|
| - |
|
4016 |
public void setCouponCode(String couponCode) {
|
| - |
|
4017 |
this.couponCode = couponCode;
|
| - |
|
4018 |
}
|
| - |
|
4019 |
|
| - |
|
4020 |
public void unsetCouponCode() {
|
| - |
|
4021 |
this.couponCode = null;
|
| - |
|
4022 |
}
|
| - |
|
4023 |
|
| - |
|
4024 |
/** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
|
| - |
|
4025 |
public boolean isSetCouponCode() {
|
| - |
|
4026 |
return this.couponCode != null;
|
| - |
|
4027 |
}
|
| - |
|
4028 |
|
| - |
|
4029 |
public void setCouponCodeIsSet(boolean value) {
|
| - |
|
4030 |
if (!value) {
|
| - |
|
4031 |
this.couponCode = null;
|
| - |
|
4032 |
}
|
| - |
|
4033 |
}
|
| - |
|
4034 |
|
| - |
|
4035 |
public void setFieldValue(_Fields field, Object value) {
|
| - |
|
4036 |
switch (field) {
|
| - |
|
4037 |
case COUPON_CODE:
|
| - |
|
4038 |
if (value == null) {
|
| - |
|
4039 |
unsetCouponCode();
|
| - |
|
4040 |
} else {
|
| - |
|
4041 |
setCouponCode((String)value);
|
| - |
|
4042 |
}
|
| - |
|
4043 |
break;
|
| - |
|
4044 |
|
| - |
|
4045 |
}
|
| - |
|
4046 |
}
|
| - |
|
4047 |
|
| - |
|
4048 |
public Object getFieldValue(_Fields field) {
|
| - |
|
4049 |
switch (field) {
|
| - |
|
4050 |
case COUPON_CODE:
|
| - |
|
4051 |
return getCouponCode();
|
| - |
|
4052 |
|
| - |
|
4053 |
}
|
| - |
|
4054 |
throw new IllegalStateException();
|
| - |
|
4055 |
}
|
| - |
|
4056 |
|
| - |
|
4057 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
| - |
|
4058 |
public boolean isSet(_Fields field) {
|
| - |
|
4059 |
if (field == null) {
|
| - |
|
4060 |
throw new IllegalArgumentException();
|
| - |
|
4061 |
}
|
| - |
|
4062 |
|
| - |
|
4063 |
switch (field) {
|
| - |
|
4064 |
case COUPON_CODE:
|
| - |
|
4065 |
return isSetCouponCode();
|
| - |
|
4066 |
}
|
| - |
|
4067 |
throw new IllegalStateException();
|
| - |
|
4068 |
}
|
| - |
|
4069 |
|
| - |
|
4070 |
@Override
|
| - |
|
4071 |
public boolean equals(Object that) {
|
| - |
|
4072 |
if (that == null)
|
| - |
|
4073 |
return false;
|
| - |
|
4074 |
if (that instanceof isCodApplicable_args)
|
| - |
|
4075 |
return this.equals((isCodApplicable_args)that);
|
| - |
|
4076 |
return false;
|
| - |
|
4077 |
}
|
| - |
|
4078 |
|
| - |
|
4079 |
public boolean equals(isCodApplicable_args that) {
|
| - |
|
4080 |
if (that == null)
|
| - |
|
4081 |
return false;
|
| - |
|
4082 |
|
| - |
|
4083 |
boolean this_present_couponCode = true && this.isSetCouponCode();
|
| - |
|
4084 |
boolean that_present_couponCode = true && that.isSetCouponCode();
|
| - |
|
4085 |
if (this_present_couponCode || that_present_couponCode) {
|
| - |
|
4086 |
if (!(this_present_couponCode && that_present_couponCode))
|
| - |
|
4087 |
return false;
|
| - |
|
4088 |
if (!this.couponCode.equals(that.couponCode))
|
| - |
|
4089 |
return false;
|
| - |
|
4090 |
}
|
| - |
|
4091 |
|
| - |
|
4092 |
return true;
|
| - |
|
4093 |
}
|
| - |
|
4094 |
|
| - |
|
4095 |
@Override
|
| - |
|
4096 |
public int hashCode() {
|
| - |
|
4097 |
return 0;
|
| - |
|
4098 |
}
|
| - |
|
4099 |
|
| - |
|
4100 |
public int compareTo(isCodApplicable_args other) {
|
| - |
|
4101 |
if (!getClass().equals(other.getClass())) {
|
| - |
|
4102 |
return getClass().getName().compareTo(other.getClass().getName());
|
| - |
|
4103 |
}
|
| - |
|
4104 |
|
| - |
|
4105 |
int lastComparison = 0;
|
| - |
|
4106 |
isCodApplicable_args typedOther = (isCodApplicable_args)other;
|
| - |
|
4107 |
|
| - |
|
4108 |
lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
|
| - |
|
4109 |
if (lastComparison != 0) {
|
| - |
|
4110 |
return lastComparison;
|
| - |
|
4111 |
}
|
| - |
|
4112 |
if (isSetCouponCode()) {
|
| - |
|
4113 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
|
| - |
|
4114 |
if (lastComparison != 0) {
|
| - |
|
4115 |
return lastComparison;
|
| - |
|
4116 |
}
|
| - |
|
4117 |
}
|
| - |
|
4118 |
return 0;
|
| - |
|
4119 |
}
|
| - |
|
4120 |
|
| - |
|
4121 |
public _Fields fieldForId(int fieldId) {
|
| - |
|
4122 |
return _Fields.findByThriftId(fieldId);
|
| - |
|
4123 |
}
|
| - |
|
4124 |
|
| - |
|
4125 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
| - |
|
4126 |
org.apache.thrift.protocol.TField field;
|
| - |
|
4127 |
iprot.readStructBegin();
|
| - |
|
4128 |
while (true)
|
| - |
|
4129 |
{
|
| - |
|
4130 |
field = iprot.readFieldBegin();
|
| - |
|
4131 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| - |
|
4132 |
break;
|
| - |
|
4133 |
}
|
| - |
|
4134 |
switch (field.id) {
|
| - |
|
4135 |
case 1: // COUPON_CODE
|
| - |
|
4136 |
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
| - |
|
4137 |
this.couponCode = iprot.readString();
|
| - |
|
4138 |
} else {
|
| - |
|
4139 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| - |
|
4140 |
}
|
| - |
|
4141 |
break;
|
| - |
|
4142 |
default:
|
| - |
|
4143 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| - |
|
4144 |
}
|
| - |
|
4145 |
iprot.readFieldEnd();
|
| - |
|
4146 |
}
|
| - |
|
4147 |
iprot.readStructEnd();
|
| - |
|
4148 |
validate();
|
| - |
|
4149 |
}
|
| - |
|
4150 |
|
| - |
|
4151 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| - |
|
4152 |
validate();
|
| - |
|
4153 |
|
| - |
|
4154 |
oprot.writeStructBegin(STRUCT_DESC);
|
| - |
|
4155 |
if (this.couponCode != null) {
|
| - |
|
4156 |
oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
|
| - |
|
4157 |
oprot.writeString(this.couponCode);
|
| - |
|
4158 |
oprot.writeFieldEnd();
|
| - |
|
4159 |
}
|
| - |
|
4160 |
oprot.writeFieldStop();
|
| - |
|
4161 |
oprot.writeStructEnd();
|
| - |
|
4162 |
}
|
| - |
|
4163 |
|
| - |
|
4164 |
@Override
|
| - |
|
4165 |
public String toString() {
|
| - |
|
4166 |
StringBuilder sb = new StringBuilder("isCodApplicable_args(");
|
| - |
|
4167 |
boolean first = true;
|
| - |
|
4168 |
|
| - |
|
4169 |
sb.append("couponCode:");
|
| - |
|
4170 |
if (this.couponCode == null) {
|
| - |
|
4171 |
sb.append("null");
|
| - |
|
4172 |
} else {
|
| - |
|
4173 |
sb.append(this.couponCode);
|
| - |
|
4174 |
}
|
| - |
|
4175 |
first = false;
|
| - |
|
4176 |
sb.append(")");
|
| - |
|
4177 |
return sb.toString();
|
| - |
|
4178 |
}
|
| - |
|
4179 |
|
| - |
|
4180 |
public void validate() throws org.apache.thrift.TException {
|
| - |
|
4181 |
// check for required fields
|
| - |
|
4182 |
}
|
| - |
|
4183 |
|
| - |
|
4184 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
| - |
|
4185 |
try {
|
| - |
|
4186 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
| - |
|
4187 |
} catch (org.apache.thrift.TException te) {
|
| - |
|
4188 |
throw new java.io.IOException(te);
|
| - |
|
4189 |
}
|
| - |
|
4190 |
}
|
| - |
|
4191 |
|
| - |
|
4192 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
| - |
|
4193 |
try {
|
| - |
|
4194 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
| - |
|
4195 |
} catch (org.apache.thrift.TException te) {
|
| - |
|
4196 |
throw new java.io.IOException(te);
|
| - |
|
4197 |
}
|
| - |
|
4198 |
}
|
| - |
|
4199 |
|
| - |
|
4200 |
}
|
| - |
|
4201 |
|
| - |
|
4202 |
public static class isCodApplicable_result implements org.apache.thrift.TBase<isCodApplicable_result, isCodApplicable_result._Fields>, java.io.Serializable, Cloneable {
|
| - |
|
4203 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCodApplicable_result");
|
| - |
|
4204 |
|
| - |
|
4205 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
|
| - |
|
4206 |
private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
| - |
|
4207 |
|
| - |
|
4208 |
private boolean success; // required
|
| - |
|
4209 |
private PromotionException pex; // required
|
| - |
|
4210 |
|
| - |
|
4211 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| - |
|
4212 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| - |
|
4213 |
SUCCESS((short)0, "success"),
|
| - |
|
4214 |
PEX((short)1, "pex");
|
| - |
|
4215 |
|
| - |
|
4216 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
| - |
|
4217 |
|
| - |
|
4218 |
static {
|
| - |
|
4219 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
| - |
|
4220 |
byName.put(field.getFieldName(), field);
|
| - |
|
4221 |
}
|
| - |
|
4222 |
}
|
| - |
|
4223 |
|
| - |
|
4224 |
/**
|
| - |
|
4225 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
| - |
|
4226 |
*/
|
| - |
|
4227 |
public static _Fields findByThriftId(int fieldId) {
|
| - |
|
4228 |
switch(fieldId) {
|
| - |
|
4229 |
case 0: // SUCCESS
|
| - |
|
4230 |
return SUCCESS;
|
| - |
|
4231 |
case 1: // PEX
|
| - |
|
4232 |
return PEX;
|
| - |
|
4233 |
default:
|
| - |
|
4234 |
return null;
|
| - |
|
4235 |
}
|
| - |
|
4236 |
}
|
| - |
|
4237 |
|
| - |
|
4238 |
/**
|
| - |
|
4239 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
| - |
|
4240 |
* if it is not found.
|
| - |
|
4241 |
*/
|
| - |
|
4242 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
| - |
|
4243 |
_Fields fields = findByThriftId(fieldId);
|
| - |
|
4244 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
| - |
|
4245 |
return fields;
|
| - |
|
4246 |
}
|
| - |
|
4247 |
|
| - |
|
4248 |
/**
|
| - |
|
4249 |
* Find the _Fields constant that matches name, or null if its not found.
|
| - |
|
4250 |
*/
|
| - |
|
4251 |
public static _Fields findByName(String name) {
|
| - |
|
4252 |
return byName.get(name);
|
| - |
|
4253 |
}
|
| - |
|
4254 |
|
| - |
|
4255 |
private final short _thriftId;
|
| - |
|
4256 |
private final String _fieldName;
|
| - |
|
4257 |
|
| - |
|
4258 |
_Fields(short thriftId, String fieldName) {
|
| - |
|
4259 |
_thriftId = thriftId;
|
| - |
|
4260 |
_fieldName = fieldName;
|
| - |
|
4261 |
}
|
| - |
|
4262 |
|
| - |
|
4263 |
public short getThriftFieldId() {
|
| - |
|
4264 |
return _thriftId;
|
| - |
|
4265 |
}
|
| - |
|
4266 |
|
| - |
|
4267 |
public String getFieldName() {
|
| - |
|
4268 |
return _fieldName;
|
| - |
|
4269 |
}
|
| - |
|
4270 |
}
|
| - |
|
4271 |
|
| - |
|
4272 |
// isset id assignments
|
| - |
|
4273 |
private static final int __SUCCESS_ISSET_ID = 0;
|
| - |
|
4274 |
private BitSet __isset_bit_vector = new BitSet(1);
|
| - |
|
4275 |
|
| - |
|
4276 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| - |
|
4277 |
static {
|
| - |
|
4278 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
| - |
|
4279 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| - |
|
4280 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
| - |
|
4281 |
tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| - |
|
4282 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
|
| - |
|
4283 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
| - |
|
4284 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCodApplicable_result.class, metaDataMap);
|
| - |
|
4285 |
}
|
| - |
|
4286 |
|
| - |
|
4287 |
public isCodApplicable_result() {
|
| - |
|
4288 |
}
|
| - |
|
4289 |
|
| - |
|
4290 |
public isCodApplicable_result(
|
| - |
|
4291 |
boolean success,
|
| - |
|
4292 |
PromotionException pex)
|
| - |
|
4293 |
{
|
| - |
|
4294 |
this();
|
| - |
|
4295 |
this.success = success;
|
| - |
|
4296 |
setSuccessIsSet(true);
|
| - |
|
4297 |
this.pex = pex;
|
| - |
|
4298 |
}
|
| - |
|
4299 |
|
| - |
|
4300 |
/**
|
| - |
|
4301 |
* Performs a deep copy on <i>other</i>.
|
| - |
|
4302 |
*/
|
| - |
|
4303 |
public isCodApplicable_result(isCodApplicable_result other) {
|
| - |
|
4304 |
__isset_bit_vector.clear();
|
| - |
|
4305 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
| - |
|
4306 |
this.success = other.success;
|
| - |
|
4307 |
if (other.isSetPex()) {
|
| - |
|
4308 |
this.pex = new PromotionException(other.pex);
|
| - |
|
4309 |
}
|
| - |
|
4310 |
}
|
| - |
|
4311 |
|
| - |
|
4312 |
public isCodApplicable_result deepCopy() {
|
| - |
|
4313 |
return new isCodApplicable_result(this);
|
| - |
|
4314 |
}
|
| - |
|
4315 |
|
| - |
|
4316 |
@Override
|
| - |
|
4317 |
public void clear() {
|
| - |
|
4318 |
setSuccessIsSet(false);
|
| - |
|
4319 |
this.success = false;
|
| - |
|
4320 |
this.pex = null;
|
| - |
|
4321 |
}
|
| - |
|
4322 |
|
| - |
|
4323 |
public boolean isSuccess() {
|
| - |
|
4324 |
return this.success;
|
| - |
|
4325 |
}
|
| - |
|
4326 |
|
| - |
|
4327 |
public void setSuccess(boolean success) {
|
| - |
|
4328 |
this.success = success;
|
| - |
|
4329 |
setSuccessIsSet(true);
|
| - |
|
4330 |
}
|
| - |
|
4331 |
|
| - |
|
4332 |
public void unsetSuccess() {
|
| - |
|
4333 |
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
|
| - |
|
4334 |
}
|
| - |
|
4335 |
|
| - |
|
4336 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
| - |
|
4337 |
public boolean isSetSuccess() {
|
| - |
|
4338 |
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
|
| - |
|
4339 |
}
|
| - |
|
4340 |
|
| - |
|
4341 |
public void setSuccessIsSet(boolean value) {
|
| - |
|
4342 |
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
|
| - |
|
4343 |
}
|
| - |
|
4344 |
|
| - |
|
4345 |
public PromotionException getPex() {
|
| - |
|
4346 |
return this.pex;
|
| - |
|
4347 |
}
|
| - |
|
4348 |
|
| - |
|
4349 |
public void setPex(PromotionException pex) {
|
| - |
|
4350 |
this.pex = pex;
|
| - |
|
4351 |
}
|
| - |
|
4352 |
|
| - |
|
4353 |
public void unsetPex() {
|
| - |
|
4354 |
this.pex = null;
|
| - |
|
4355 |
}
|
| - |
|
4356 |
|
| - |
|
4357 |
/** Returns true if field pex is set (has been assigned a value) and false otherwise */
|
| - |
|
4358 |
public boolean isSetPex() {
|
| - |
|
4359 |
return this.pex != null;
|
| - |
|
4360 |
}
|
| - |
|
4361 |
|
| - |
|
4362 |
public void setPexIsSet(boolean value) {
|
| - |
|
4363 |
if (!value) {
|
| - |
|
4364 |
this.pex = null;
|
| - |
|
4365 |
}
|
| - |
|
4366 |
}
|
| - |
|
4367 |
|
| - |
|
4368 |
public void setFieldValue(_Fields field, Object value) {
|
| - |
|
4369 |
switch (field) {
|
| - |
|
4370 |
case SUCCESS:
|
| - |
|
4371 |
if (value == null) {
|
| - |
|
4372 |
unsetSuccess();
|
| - |
|
4373 |
} else {
|
| - |
|
4374 |
setSuccess((Boolean)value);
|
| - |
|
4375 |
}
|
| - |
|
4376 |
break;
|
| - |
|
4377 |
|
| - |
|
4378 |
case PEX:
|
| - |
|
4379 |
if (value == null) {
|
| - |
|
4380 |
unsetPex();
|
| - |
|
4381 |
} else {
|
| - |
|
4382 |
setPex((PromotionException)value);
|
| - |
|
4383 |
}
|
| - |
|
4384 |
break;
|
| - |
|
4385 |
|
| - |
|
4386 |
}
|
| - |
|
4387 |
}
|
| - |
|
4388 |
|
| - |
|
4389 |
public Object getFieldValue(_Fields field) {
|
| - |
|
4390 |
switch (field) {
|
| - |
|
4391 |
case SUCCESS:
|
| - |
|
4392 |
return Boolean.valueOf(isSuccess());
|
| - |
|
4393 |
|
| - |
|
4394 |
case PEX:
|
| - |
|
4395 |
return getPex();
|
| - |
|
4396 |
|
| - |
|
4397 |
}
|
| - |
|
4398 |
throw new IllegalStateException();
|
| - |
|
4399 |
}
|
| - |
|
4400 |
|
| - |
|
4401 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
| - |
|
4402 |
public boolean isSet(_Fields field) {
|
| - |
|
4403 |
if (field == null) {
|
| - |
|
4404 |
throw new IllegalArgumentException();
|
| - |
|
4405 |
}
|
| - |
|
4406 |
|
| - |
|
4407 |
switch (field) {
|
| - |
|
4408 |
case SUCCESS:
|
| - |
|
4409 |
return isSetSuccess();
|
| - |
|
4410 |
case PEX:
|
| - |
|
4411 |
return isSetPex();
|
| - |
|
4412 |
}
|
| - |
|
4413 |
throw new IllegalStateException();
|
| - |
|
4414 |
}
|
| - |
|
4415 |
|
| - |
|
4416 |
@Override
|
| - |
|
4417 |
public boolean equals(Object that) {
|
| - |
|
4418 |
if (that == null)
|
| - |
|
4419 |
return false;
|
| - |
|
4420 |
if (that instanceof isCodApplicable_result)
|
| - |
|
4421 |
return this.equals((isCodApplicable_result)that);
|
| - |
|
4422 |
return false;
|
| - |
|
4423 |
}
|
| - |
|
4424 |
|
| - |
|
4425 |
public boolean equals(isCodApplicable_result that) {
|
| - |
|
4426 |
if (that == null)
|
| - |
|
4427 |
return false;
|
| - |
|
4428 |
|
| - |
|
4429 |
boolean this_present_success = true;
|
| - |
|
4430 |
boolean that_present_success = true;
|
| - |
|
4431 |
if (this_present_success || that_present_success) {
|
| - |
|
4432 |
if (!(this_present_success && that_present_success))
|
| - |
|
4433 |
return false;
|
| - |
|
4434 |
if (this.success != that.success)
|
| - |
|
4435 |
return false;
|
| - |
|
4436 |
}
|
| - |
|
4437 |
|
| - |
|
4438 |
boolean this_present_pex = true && this.isSetPex();
|
| - |
|
4439 |
boolean that_present_pex = true && that.isSetPex();
|
| - |
|
4440 |
if (this_present_pex || that_present_pex) {
|
| - |
|
4441 |
if (!(this_present_pex && that_present_pex))
|
| - |
|
4442 |
return false;
|
| - |
|
4443 |
if (!this.pex.equals(that.pex))
|
| - |
|
4444 |
return false;
|
| - |
|
4445 |
}
|
| - |
|
4446 |
|
| - |
|
4447 |
return true;
|
| - |
|
4448 |
}
|
| - |
|
4449 |
|
| - |
|
4450 |
@Override
|
| - |
|
4451 |
public int hashCode() {
|
| - |
|
4452 |
return 0;
|
| - |
|
4453 |
}
|
| - |
|
4454 |
|
| - |
|
4455 |
public int compareTo(isCodApplicable_result other) {
|
| - |
|
4456 |
if (!getClass().equals(other.getClass())) {
|
| - |
|
4457 |
return getClass().getName().compareTo(other.getClass().getName());
|
| - |
|
4458 |
}
|
| - |
|
4459 |
|
| - |
|
4460 |
int lastComparison = 0;
|
| - |
|
4461 |
isCodApplicable_result typedOther = (isCodApplicable_result)other;
|
| - |
|
4462 |
|
| - |
|
4463 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
| - |
|
4464 |
if (lastComparison != 0) {
|
| - |
|
4465 |
return lastComparison;
|
| - |
|
4466 |
}
|
| - |
|
4467 |
if (isSetSuccess()) {
|
| - |
|
4468 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
| - |
|
4469 |
if (lastComparison != 0) {
|
| - |
|
4470 |
return lastComparison;
|
| - |
|
4471 |
}
|
| - |
|
4472 |
}
|
| - |
|
4473 |
lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
|
| - |
|
4474 |
if (lastComparison != 0) {
|
| - |
|
4475 |
return lastComparison;
|
| - |
|
4476 |
}
|
| - |
|
4477 |
if (isSetPex()) {
|
| - |
|
4478 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
|
| - |
|
4479 |
if (lastComparison != 0) {
|
| - |
|
4480 |
return lastComparison;
|
| - |
|
4481 |
}
|
| - |
|
4482 |
}
|
| - |
|
4483 |
return 0;
|
| - |
|
4484 |
}
|
| - |
|
4485 |
|
| - |
|
4486 |
public _Fields fieldForId(int fieldId) {
|
| - |
|
4487 |
return _Fields.findByThriftId(fieldId);
|
| - |
|
4488 |
}
|
| - |
|
4489 |
|
| - |
|
4490 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
| - |
|
4491 |
org.apache.thrift.protocol.TField field;
|
| - |
|
4492 |
iprot.readStructBegin();
|
| - |
|
4493 |
while (true)
|
| - |
|
4494 |
{
|
| - |
|
4495 |
field = iprot.readFieldBegin();
|
| - |
|
4496 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
| - |
|
4497 |
break;
|
| - |
|
4498 |
}
|
| - |
|
4499 |
switch (field.id) {
|
| - |
|
4500 |
case 0: // SUCCESS
|
| - |
|
4501 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
| - |
|
4502 |
this.success = iprot.readBool();
|
| - |
|
4503 |
setSuccessIsSet(true);
|
| - |
|
4504 |
} else {
|
| - |
|
4505 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| - |
|
4506 |
}
|
| - |
|
4507 |
break;
|
| - |
|
4508 |
case 1: // PEX
|
| - |
|
4509 |
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
| - |
|
4510 |
this.pex = new PromotionException();
|
| - |
|
4511 |
this.pex.read(iprot);
|
| - |
|
4512 |
} else {
|
| - |
|
4513 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| - |
|
4514 |
}
|
| - |
|
4515 |
break;
|
| - |
|
4516 |
default:
|
| - |
|
4517 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| - |
|
4518 |
}
|
| - |
|
4519 |
iprot.readFieldEnd();
|
| - |
|
4520 |
}
|
| - |
|
4521 |
iprot.readStructEnd();
|
| - |
|
4522 |
validate();
|
| - |
|
4523 |
}
|
| - |
|
4524 |
|
| - |
|
4525 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
| - |
|
4526 |
oprot.writeStructBegin(STRUCT_DESC);
|
| - |
|
4527 |
|
| - |
|
4528 |
if (this.isSetSuccess()) {
|
| - |
|
4529 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
| - |
|
4530 |
oprot.writeBool(this.success);
|
| - |
|
4531 |
oprot.writeFieldEnd();
|
| - |
|
4532 |
} else if (this.isSetPex()) {
|
| - |
|
4533 |
oprot.writeFieldBegin(PEX_FIELD_DESC);
|
| - |
|
4534 |
this.pex.write(oprot);
|
| - |
|
4535 |
oprot.writeFieldEnd();
|
| - |
|
4536 |
}
|
| - |
|
4537 |
oprot.writeFieldStop();
|
| - |
|
4538 |
oprot.writeStructEnd();
|
| - |
|
4539 |
}
|
| - |
|
4540 |
|
| - |
|
4541 |
@Override
|
| - |
|
4542 |
public String toString() {
|
| - |
|
4543 |
StringBuilder sb = new StringBuilder("isCodApplicable_result(");
|
| - |
|
4544 |
boolean first = true;
|
| - |
|
4545 |
|
| - |
|
4546 |
sb.append("success:");
|
| - |
|
4547 |
sb.append(this.success);
|
| - |
|
4548 |
first = false;
|
| - |
|
4549 |
if (!first) sb.append(", ");
|
| - |
|
4550 |
sb.append("pex:");
|
| - |
|
4551 |
if (this.pex == null) {
|
| - |
|
4552 |
sb.append("null");
|
| - |
|
4553 |
} else {
|
| - |
|
4554 |
sb.append(this.pex);
|
| - |
|
4555 |
}
|
| - |
|
4556 |
first = false;
|
| - |
|
4557 |
sb.append(")");
|
| - |
|
4558 |
return sb.toString();
|
| - |
|
4559 |
}
|
| - |
|
4560 |
|
| - |
|
4561 |
public void validate() throws org.apache.thrift.TException {
|
| - |
|
4562 |
// check for required fields
|
| - |
|
4563 |
}
|
| - |
|
4564 |
|
| - |
|
4565 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
| - |
|
4566 |
try {
|
| - |
|
4567 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
| - |
|
4568 |
} catch (org.apache.thrift.TException te) {
|
| - |
|
4569 |
throw new java.io.IOException(te);
|
| - |
|
4570 |
}
|
| - |
|
4571 |
}
|
| - |
|
4572 |
|
| - |
|
4573 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
| - |
|
4574 |
try {
|
| - |
|
4575 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
| - |
|
4576 |
} catch (org.apache.thrift.TException te) {
|
| - |
|
4577 |
throw new java.io.IOException(te);
|
| - |
|
4578 |
}
|
| - |
|
4579 |
}
|
| - |
|
4580 |
|
| - |
|
4581 |
}
|
| - |
|
4582 |
|
| 3819 |
public static class getAllPromotions_args implements org.apache.thrift.TBase<getAllPromotions_args, getAllPromotions_args._Fields>, java.io.Serializable, Cloneable {
|
4583 |
public static class getAllPromotions_args implements org.apache.thrift.TBase<getAllPromotions_args, getAllPromotions_args._Fields>, java.io.Serializable, Cloneable {
|
| 3820 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPromotions_args");
|
4584 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPromotions_args");
|
| 3821 |
|
4585 |
|
| 3822 |
|
4586 |
|
| 3823 |
|
4587 |
|
| Line 8697... |
Line 9461... |
| 8697 |
|
9461 |
|
| 8698 |
private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
|
9462 |
private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
|
| 8699 |
private static final org.apache.thrift.protocol.TField END_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("endOn", org.apache.thrift.protocol.TType.I64, (short)2);
|
9463 |
private static final org.apache.thrift.protocol.TField END_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("endOn", org.apache.thrift.protocol.TType.I64, (short)2);
|
| 8700 |
private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)3);
|
9464 |
private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)3);
|
| 8701 |
private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I64, (short)4);
|
9465 |
private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I64, (short)4);
|
| - |
|
9466 |
private static final org.apache.thrift.protocol.TField IS_COD_FIELD_DESC = new org.apache.thrift.protocol.TField("isCod", org.apache.thrift.protocol.TType.BOOL, (short)5);
|
| 8702 |
private static final org.apache.thrift.protocol.TField USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("usage", org.apache.thrift.protocol.TType.I64, (short)5);
|
9467 |
private static final org.apache.thrift.protocol.TField USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("usage", org.apache.thrift.protocol.TType.I64, (short)6);
|
| 8703 |
|
9468 |
|
| 8704 |
private long promotionId; // required
|
9469 |
private long promotionId; // required
|
| 8705 |
private long endOn; // required
|
9470 |
private long endOn; // required
|
| 8706 |
private String email; // required
|
9471 |
private String email; // required
|
| 8707 |
private long amount; // required
|
9472 |
private long amount; // required
|
| - |
|
9473 |
private boolean isCod; // required
|
| 8708 |
private long usage; // required
|
9474 |
private long usage; // required
|
| 8709 |
|
9475 |
|
| 8710 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
9476 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
| 8711 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
9477 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
| 8712 |
PROMOTION_ID((short)1, "promotionId"),
|
9478 |
PROMOTION_ID((short)1, "promotionId"),
|
| 8713 |
END_ON((short)2, "endOn"),
|
9479 |
END_ON((short)2, "endOn"),
|
| 8714 |
EMAIL((short)3, "email"),
|
9480 |
EMAIL((short)3, "email"),
|
| 8715 |
AMOUNT((short)4, "amount"),
|
9481 |
AMOUNT((short)4, "amount"),
|
| - |
|
9482 |
IS_COD((short)5, "isCod"),
|
| 8716 |
USAGE((short)5, "usage");
|
9483 |
USAGE((short)6, "usage");
|
| 8717 |
|
9484 |
|
| 8718 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
9485 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
| 8719 |
|
9486 |
|
| 8720 |
static {
|
9487 |
static {
|
| 8721 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
9488 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
| Line 8734... |
Line 9501... |
| 8734 |
return END_ON;
|
9501 |
return END_ON;
|
| 8735 |
case 3: // EMAIL
|
9502 |
case 3: // EMAIL
|
| 8736 |
return EMAIL;
|
9503 |
return EMAIL;
|
| 8737 |
case 4: // AMOUNT
|
9504 |
case 4: // AMOUNT
|
| 8738 |
return AMOUNT;
|
9505 |
return AMOUNT;
|
| - |
|
9506 |
case 5: // IS_COD
|
| - |
|
9507 |
return IS_COD;
|
| 8739 |
case 5: // USAGE
|
9508 |
case 6: // USAGE
|
| 8740 |
return USAGE;
|
9509 |
return USAGE;
|
| 8741 |
default:
|
9510 |
default:
|
| 8742 |
return null;
|
9511 |
return null;
|
| 8743 |
}
|
9512 |
}
|
| 8744 |
}
|
9513 |
}
|
| Line 8779... |
Line 9548... |
| 8779 |
|
9548 |
|
| 8780 |
// isset id assignments
|
9549 |
// isset id assignments
|
| 8781 |
private static final int __PROMOTIONID_ISSET_ID = 0;
|
9550 |
private static final int __PROMOTIONID_ISSET_ID = 0;
|
| 8782 |
private static final int __ENDON_ISSET_ID = 1;
|
9551 |
private static final int __ENDON_ISSET_ID = 1;
|
| 8783 |
private static final int __AMOUNT_ISSET_ID = 2;
|
9552 |
private static final int __AMOUNT_ISSET_ID = 2;
|
| - |
|
9553 |
private static final int __ISCOD_ISSET_ID = 3;
|
| 8784 |
private static final int __USAGE_ISSET_ID = 3;
|
9554 |
private static final int __USAGE_ISSET_ID = 4;
|
| 8785 |
private BitSet __isset_bit_vector = new BitSet(4);
|
9555 |
private BitSet __isset_bit_vector = new BitSet(5);
|
| 8786 |
|
9556 |
|
| 8787 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
9557 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
| 8788 |
static {
|
9558 |
static {
|
| 8789 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
9559 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
| 8790 |
tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
9560 |
tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| Line 8793... |
Line 9563... |
| 8793 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
9563 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
| 8794 |
tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
9564 |
tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| 8795 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
9565 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
| 8796 |
tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
9566 |
tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| 8797 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
9567 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
| - |
|
9568 |
tmpMap.put(_Fields.IS_COD, new org.apache.thrift.meta_data.FieldMetaData("isCod", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| - |
|
9569 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
| 8798 |
tmpMap.put(_Fields.USAGE, new org.apache.thrift.meta_data.FieldMetaData("usage", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
9570 |
tmpMap.put(_Fields.USAGE, new org.apache.thrift.meta_data.FieldMetaData("usage", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
| 8799 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
9571 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
| 8800 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
9572 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
| 8801 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createCoupon_args.class, metaDataMap);
|
9573 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createCoupon_args.class, metaDataMap);
|
| 8802 |
}
|
9574 |
}
|
| Line 8807... |
Line 9579... |
| 8807 |
public createCoupon_args(
|
9579 |
public createCoupon_args(
|
| 8808 |
long promotionId,
|
9580 |
long promotionId,
|
| 8809 |
long endOn,
|
9581 |
long endOn,
|
| 8810 |
String email,
|
9582 |
String email,
|
| 8811 |
long amount,
|
9583 |
long amount,
|
| - |
|
9584 |
boolean isCod,
|
| 8812 |
long usage)
|
9585 |
long usage)
|
| 8813 |
{
|
9586 |
{
|
| 8814 |
this();
|
9587 |
this();
|
| 8815 |
this.promotionId = promotionId;
|
9588 |
this.promotionId = promotionId;
|
| 8816 |
setPromotionIdIsSet(true);
|
9589 |
setPromotionIdIsSet(true);
|
| 8817 |
this.endOn = endOn;
|
9590 |
this.endOn = endOn;
|
| 8818 |
setEndOnIsSet(true);
|
9591 |
setEndOnIsSet(true);
|
| 8819 |
this.email = email;
|
9592 |
this.email = email;
|
| 8820 |
this.amount = amount;
|
9593 |
this.amount = amount;
|
| 8821 |
setAmountIsSet(true);
|
9594 |
setAmountIsSet(true);
|
| - |
|
9595 |
this.isCod = isCod;
|
| - |
|
9596 |
setIsCodIsSet(true);
|
| 8822 |
this.usage = usage;
|
9597 |
this.usage = usage;
|
| 8823 |
setUsageIsSet(true);
|
9598 |
setUsageIsSet(true);
|
| 8824 |
}
|
9599 |
}
|
| 8825 |
|
9600 |
|
| 8826 |
/**
|
9601 |
/**
|
| Line 8833... |
Line 9608... |
| 8833 |
this.endOn = other.endOn;
|
9608 |
this.endOn = other.endOn;
|
| 8834 |
if (other.isSetEmail()) {
|
9609 |
if (other.isSetEmail()) {
|
| 8835 |
this.email = other.email;
|
9610 |
this.email = other.email;
|
| 8836 |
}
|
9611 |
}
|
| 8837 |
this.amount = other.amount;
|
9612 |
this.amount = other.amount;
|
| - |
|
9613 |
this.isCod = other.isCod;
|
| 8838 |
this.usage = other.usage;
|
9614 |
this.usage = other.usage;
|
| 8839 |
}
|
9615 |
}
|
| 8840 |
|
9616 |
|
| 8841 |
public createCoupon_args deepCopy() {
|
9617 |
public createCoupon_args deepCopy() {
|
| 8842 |
return new createCoupon_args(this);
|
9618 |
return new createCoupon_args(this);
|
| Line 8849... |
Line 9625... |
| 8849 |
setEndOnIsSet(false);
|
9625 |
setEndOnIsSet(false);
|
| 8850 |
this.endOn = 0;
|
9626 |
this.endOn = 0;
|
| 8851 |
this.email = null;
|
9627 |
this.email = null;
|
| 8852 |
setAmountIsSet(false);
|
9628 |
setAmountIsSet(false);
|
| 8853 |
this.amount = 0;
|
9629 |
this.amount = 0;
|
| - |
|
9630 |
setIsCodIsSet(false);
|
| - |
|
9631 |
this.isCod = false;
|
| 8854 |
setUsageIsSet(false);
|
9632 |
setUsageIsSet(false);
|
| 8855 |
this.usage = 0;
|
9633 |
this.usage = 0;
|
| 8856 |
}
|
9634 |
}
|
| 8857 |
|
9635 |
|
| 8858 |
public long getPromotionId() {
|
9636 |
public long getPromotionId() {
|
| Line 8942... |
Line 9720... |
| 8942 |
|
9720 |
|
| 8943 |
public void setAmountIsSet(boolean value) {
|
9721 |
public void setAmountIsSet(boolean value) {
|
| 8944 |
__isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
|
9722 |
__isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
|
| 8945 |
}
|
9723 |
}
|
| 8946 |
|
9724 |
|
| - |
|
9725 |
public boolean isIsCod() {
|
| - |
|
9726 |
return this.isCod;
|
| - |
|
9727 |
}
|
| - |
|
9728 |
|
| - |
|
9729 |
public void setIsCod(boolean isCod) {
|
| - |
|
9730 |
this.isCod = isCod;
|
| - |
|
9731 |
setIsCodIsSet(true);
|
| - |
|
9732 |
}
|
| - |
|
9733 |
|
| - |
|
9734 |
public void unsetIsCod() {
|
| - |
|
9735 |
__isset_bit_vector.clear(__ISCOD_ISSET_ID);
|
| - |
|
9736 |
}
|
| - |
|
9737 |
|
| - |
|
9738 |
/** Returns true if field isCod is set (has been assigned a value) and false otherwise */
|
| - |
|
9739 |
public boolean isSetIsCod() {
|
| - |
|
9740 |
return __isset_bit_vector.get(__ISCOD_ISSET_ID);
|
| - |
|
9741 |
}
|
| - |
|
9742 |
|
| - |
|
9743 |
public void setIsCodIsSet(boolean value) {
|
| - |
|
9744 |
__isset_bit_vector.set(__ISCOD_ISSET_ID, value);
|
| - |
|
9745 |
}
|
| - |
|
9746 |
|
| 8947 |
public long getUsage() {
|
9747 |
public long getUsage() {
|
| 8948 |
return this.usage;
|
9748 |
return this.usage;
|
| 8949 |
}
|
9749 |
}
|
| 8950 |
|
9750 |
|
| 8951 |
public void setUsage(long usage) {
|
9751 |
public void setUsage(long usage) {
|
| Line 8998... |
Line 9798... |
| 8998 |
} else {
|
9798 |
} else {
|
| 8999 |
setAmount((Long)value);
|
9799 |
setAmount((Long)value);
|
| 9000 |
}
|
9800 |
}
|
| 9001 |
break;
|
9801 |
break;
|
| 9002 |
|
9802 |
|
| - |
|
9803 |
case IS_COD:
|
| - |
|
9804 |
if (value == null) {
|
| - |
|
9805 |
unsetIsCod();
|
| - |
|
9806 |
} else {
|
| - |
|
9807 |
setIsCod((Boolean)value);
|
| - |
|
9808 |
}
|
| - |
|
9809 |
break;
|
| - |
|
9810 |
|
| 9003 |
case USAGE:
|
9811 |
case USAGE:
|
| 9004 |
if (value == null) {
|
9812 |
if (value == null) {
|
| 9005 |
unsetUsage();
|
9813 |
unsetUsage();
|
| 9006 |
} else {
|
9814 |
} else {
|
| 9007 |
setUsage((Long)value);
|
9815 |
setUsage((Long)value);
|
| Line 9023... |
Line 9831... |
| 9023 |
return getEmail();
|
9831 |
return getEmail();
|
| 9024 |
|
9832 |
|
| 9025 |
case AMOUNT:
|
9833 |
case AMOUNT:
|
| 9026 |
return Long.valueOf(getAmount());
|
9834 |
return Long.valueOf(getAmount());
|
| 9027 |
|
9835 |
|
| - |
|
9836 |
case IS_COD:
|
| - |
|
9837 |
return Boolean.valueOf(isIsCod());
|
| - |
|
9838 |
|
| 9028 |
case USAGE:
|
9839 |
case USAGE:
|
| 9029 |
return Long.valueOf(getUsage());
|
9840 |
return Long.valueOf(getUsage());
|
| 9030 |
|
9841 |
|
| 9031 |
}
|
9842 |
}
|
| 9032 |
throw new IllegalStateException();
|
9843 |
throw new IllegalStateException();
|
| Line 9045... |
Line 9856... |
| 9045 |
return isSetEndOn();
|
9856 |
return isSetEndOn();
|
| 9046 |
case EMAIL:
|
9857 |
case EMAIL:
|
| 9047 |
return isSetEmail();
|
9858 |
return isSetEmail();
|
| 9048 |
case AMOUNT:
|
9859 |
case AMOUNT:
|
| 9049 |
return isSetAmount();
|
9860 |
return isSetAmount();
|
| - |
|
9861 |
case IS_COD:
|
| - |
|
9862 |
return isSetIsCod();
|
| 9050 |
case USAGE:
|
9863 |
case USAGE:
|
| 9051 |
return isSetUsage();
|
9864 |
return isSetUsage();
|
| 9052 |
}
|
9865 |
}
|
| 9053 |
throw new IllegalStateException();
|
9866 |
throw new IllegalStateException();
|
| 9054 |
}
|
9867 |
}
|
| Line 9100... |
Line 9913... |
| 9100 |
return false;
|
9913 |
return false;
|
| 9101 |
if (this.amount != that.amount)
|
9914 |
if (this.amount != that.amount)
|
| 9102 |
return false;
|
9915 |
return false;
|
| 9103 |
}
|
9916 |
}
|
| 9104 |
|
9917 |
|
| - |
|
9918 |
boolean this_present_isCod = true;
|
| - |
|
9919 |
boolean that_present_isCod = true;
|
| - |
|
9920 |
if (this_present_isCod || that_present_isCod) {
|
| - |
|
9921 |
if (!(this_present_isCod && that_present_isCod))
|
| - |
|
9922 |
return false;
|
| - |
|
9923 |
if (this.isCod != that.isCod)
|
| - |
|
9924 |
return false;
|
| - |
|
9925 |
}
|
| - |
|
9926 |
|
| 9105 |
boolean this_present_usage = true;
|
9927 |
boolean this_present_usage = true;
|
| 9106 |
boolean that_present_usage = true;
|
9928 |
boolean that_present_usage = true;
|
| 9107 |
if (this_present_usage || that_present_usage) {
|
9929 |
if (this_present_usage || that_present_usage) {
|
| 9108 |
if (!(this_present_usage && that_present_usage))
|
9930 |
if (!(this_present_usage && that_present_usage))
|
| 9109 |
return false;
|
9931 |
return false;
|
| Line 9165... |
Line 9987... |
| 9165 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
|
9987 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
|
| 9166 |
if (lastComparison != 0) {
|
9988 |
if (lastComparison != 0) {
|
| 9167 |
return lastComparison;
|
9989 |
return lastComparison;
|
| 9168 |
}
|
9990 |
}
|
| 9169 |
}
|
9991 |
}
|
| - |
|
9992 |
lastComparison = Boolean.valueOf(isSetIsCod()).compareTo(typedOther.isSetIsCod());
|
| - |
|
9993 |
if (lastComparison != 0) {
|
| - |
|
9994 |
return lastComparison;
|
| - |
|
9995 |
}
|
| - |
|
9996 |
if (isSetIsCod()) {
|
| - |
|
9997 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isCod, typedOther.isCod);
|
| - |
|
9998 |
if (lastComparison != 0) {
|
| - |
|
9999 |
return lastComparison;
|
| - |
|
10000 |
}
|
| - |
|
10001 |
}
|
| 9170 |
lastComparison = Boolean.valueOf(isSetUsage()).compareTo(typedOther.isSetUsage());
|
10002 |
lastComparison = Boolean.valueOf(isSetUsage()).compareTo(typedOther.isSetUsage());
|
| 9171 |
if (lastComparison != 0) {
|
10003 |
if (lastComparison != 0) {
|
| 9172 |
return lastComparison;
|
10004 |
return lastComparison;
|
| 9173 |
}
|
10005 |
}
|
| 9174 |
if (isSetUsage()) {
|
10006 |
if (isSetUsage()) {
|
| Line 9223... |
Line 10055... |
| 9223 |
setAmountIsSet(true);
|
10055 |
setAmountIsSet(true);
|
| 9224 |
} else {
|
10056 |
} else {
|
| 9225 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
10057 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| 9226 |
}
|
10058 |
}
|
| 9227 |
break;
|
10059 |
break;
|
| - |
|
10060 |
case 5: // IS_COD
|
| - |
|
10061 |
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
| - |
|
10062 |
this.isCod = iprot.readBool();
|
| - |
|
10063 |
setIsCodIsSet(true);
|
| - |
|
10064 |
} else {
|
| - |
|
10065 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| - |
|
10066 |
}
|
| - |
|
10067 |
break;
|
| 9228 |
case 5: // USAGE
|
10068 |
case 6: // USAGE
|
| 9229 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
10069 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
| 9230 |
this.usage = iprot.readI64();
|
10070 |
this.usage = iprot.readI64();
|
| 9231 |
setUsageIsSet(true);
|
10071 |
setUsageIsSet(true);
|
| 9232 |
} else {
|
10072 |
} else {
|
| 9233 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
10073 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
| Line 9258... |
Line 10098... |
| 9258 |
oprot.writeFieldEnd();
|
10098 |
oprot.writeFieldEnd();
|
| 9259 |
}
|
10099 |
}
|
| 9260 |
oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
|
10100 |
oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
|
| 9261 |
oprot.writeI64(this.amount);
|
10101 |
oprot.writeI64(this.amount);
|
| 9262 |
oprot.writeFieldEnd();
|
10102 |
oprot.writeFieldEnd();
|
| - |
|
10103 |
oprot.writeFieldBegin(IS_COD_FIELD_DESC);
|
| - |
|
10104 |
oprot.writeBool(this.isCod);
|
| - |
|
10105 |
oprot.writeFieldEnd();
|
| 9263 |
oprot.writeFieldBegin(USAGE_FIELD_DESC);
|
10106 |
oprot.writeFieldBegin(USAGE_FIELD_DESC);
|
| 9264 |
oprot.writeI64(this.usage);
|
10107 |
oprot.writeI64(this.usage);
|
| 9265 |
oprot.writeFieldEnd();
|
10108 |
oprot.writeFieldEnd();
|
| 9266 |
oprot.writeFieldStop();
|
10109 |
oprot.writeFieldStop();
|
| 9267 |
oprot.writeStructEnd();
|
10110 |
oprot.writeStructEnd();
|
| Line 9290... |
Line 10133... |
| 9290 |
if (!first) sb.append(", ");
|
10133 |
if (!first) sb.append(", ");
|
| 9291 |
sb.append("amount:");
|
10134 |
sb.append("amount:");
|
| 9292 |
sb.append(this.amount);
|
10135 |
sb.append(this.amount);
|
| 9293 |
first = false;
|
10136 |
first = false;
|
| 9294 |
if (!first) sb.append(", ");
|
10137 |
if (!first) sb.append(", ");
|
| - |
|
10138 |
sb.append("isCod:");
|
| - |
|
10139 |
sb.append(this.isCod);
|
| - |
|
10140 |
first = false;
|
| - |
|
10141 |
if (!first) sb.append(", ");
|
| 9295 |
sb.append("usage:");
|
10142 |
sb.append("usage:");
|
| 9296 |
sb.append(this.usage);
|
10143 |
sb.append(this.usage);
|
| 9297 |
first = false;
|
10144 |
first = false;
|
| 9298 |
sb.append(")");
|
10145 |
sb.append(")");
|
| 9299 |
return sb.toString();
|
10146 |
return sb.toString();
|