Subversion Repositories SmartDukaan

Rev

Rev 6497 | Rev 6679 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6497 Rev 6561
Line 57... Line 57...
57
     * Returns a list of active coupons
57
     * Returns a list of active coupons
58
     */
58
     */
59
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException;
59
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException;
60
 
60
 
61
    /**
61
    /**
62
     * Creates a coupon and returns couponcode if successfully created
62
     * Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
63
     * 
63
     * 
64
     * @param promotionId
64
     * @param promotionId
65
     * @param endOn
65
     * @param endOn
66
     * @param email
66
     * @param email
67
     * @param amount
67
     * @param amount
68
     * @param isCod
68
     * @param isCod
69
     * @param usage
69
     * @param usage
-
 
70
     * @param prefix
70
     */
71
     */
71
    public String createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage) throws PromotionException, org.apache.thrift.TException;
72
    public String createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, String prefix) throws PromotionException, org.apache.thrift.TException;
72
 
73
 
73
    /**
74
    /**
74
     * Returns the count of successful payments done using a given coupon
75
     * Returns the count of successful payments done using a given coupon
75
     * 
76
     * 
76
     * @param couponCode
77
     * @param couponCode
Line 124... Line 125...
124
 
125
 
125
    public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteCoupon_call> resultHandler) throws org.apache.thrift.TException;
126
    public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteCoupon_call> resultHandler) throws org.apache.thrift.TException;
126
 
127
 
127
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
128
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
128
 
129
 
129
    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;
130
    public void createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, String prefix, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
130
 
131
 
131
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
132
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
132
 
133
 
133
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
134
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
134
 
135
 
Line 522... Line 523...
522
        throw result.pex;
523
        throw result.pex;
523
      }
524
      }
524
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
525
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
525
    }
526
    }
526
 
527
 
527
    public String createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage) throws PromotionException, org.apache.thrift.TException
528
    public String createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, String prefix) throws PromotionException, org.apache.thrift.TException
528
    {
529
    {
529
      send_createCoupon(promotionId, endOn, email, amount, isCod, usage);
530
      send_createCoupon(promotionId, endOn, email, amount, isCod, usage, prefix);
530
      return recv_createCoupon();
531
      return recv_createCoupon();
531
    }
532
    }
532
 
533
 
533
    public void send_createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage) throws org.apache.thrift.TException
534
    public void send_createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, String prefix) throws org.apache.thrift.TException
534
    {
535
    {
535
      createCoupon_args args = new createCoupon_args();
536
      createCoupon_args args = new createCoupon_args();
536
      args.setPromotionId(promotionId);
537
      args.setPromotionId(promotionId);
537
      args.setEndOn(endOn);
538
      args.setEndOn(endOn);
538
      args.setEmail(email);
539
      args.setEmail(email);
539
      args.setAmount(amount);
540
      args.setAmount(amount);
540
      args.setIsCod(isCod);
541
      args.setIsCod(isCod);
541
      args.setUsage(usage);
542
      args.setUsage(usage);
-
 
543
      args.setPrefix(prefix);
542
      sendBase("createCoupon", args);
544
      sendBase("createCoupon", args);
543
    }
545
    }
544
 
546
 
545
    public String recv_createCoupon() throws PromotionException, org.apache.thrift.TException
547
    public String recv_createCoupon() throws PromotionException, org.apache.thrift.TException
546
    {
548
    {
Line 1211... Line 1213...
1211
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1213
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1212
        return (new Client(prot)).recv_getActiveCoupons();
1214
        return (new Client(prot)).recv_getActiveCoupons();
1213
      }
1215
      }
1214
    }
1216
    }
1215
 
1217
 
1216
    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 {
1218
    public void createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, String prefix, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler) throws org.apache.thrift.TException {
1217
      checkReady();
1219
      checkReady();
1218
      createCoupon_call method_call = new createCoupon_call(promotionId, endOn, email, amount, isCod, usage, resultHandler, this, ___protocolFactory, ___transport);
1220
      createCoupon_call method_call = new createCoupon_call(promotionId, endOn, email, amount, isCod, usage, prefix, resultHandler, this, ___protocolFactory, ___transport);
1219
      this.___currentMethod = method_call;
1221
      this.___currentMethod = method_call;
1220
      ___manager.call(method_call);
1222
      ___manager.call(method_call);
1221
    }
1223
    }
1222
 
1224
 
1223
    public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
1225
    public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
Line 1225... Line 1227...
1225
      private long endOn;
1227
      private long endOn;
1226
      private String email;
1228
      private String email;
1227
      private long amount;
1229
      private long amount;
1228
      private boolean isCod;
1230
      private boolean isCod;
1229
      private long usage;
1231
      private long usage;
-
 
1232
      private String prefix;
1230
      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 {
1233
      public createCoupon_call(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, String prefix, 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 {
1231
        super(client, protocolFactory, transport, resultHandler, false);
1234
        super(client, protocolFactory, transport, resultHandler, false);
1232
        this.promotionId = promotionId;
1235
        this.promotionId = promotionId;
1233
        this.endOn = endOn;
1236
        this.endOn = endOn;
1234
        this.email = email;
1237
        this.email = email;
1235
        this.amount = amount;
1238
        this.amount = amount;
1236
        this.isCod = isCod;
1239
        this.isCod = isCod;
1237
        this.usage = usage;
1240
        this.usage = usage;
-
 
1241
        this.prefix = prefix;
1238
      }
1242
      }
1239
 
1243
 
1240
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1244
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1241
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
1245
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
1242
        createCoupon_args args = new createCoupon_args();
1246
        createCoupon_args args = new createCoupon_args();
Line 1244... Line 1248...
1244
        args.setEndOn(endOn);
1248
        args.setEndOn(endOn);
1245
        args.setEmail(email);
1249
        args.setEmail(email);
1246
        args.setAmount(amount);
1250
        args.setAmount(amount);
1247
        args.setIsCod(isCod);
1251
        args.setIsCod(isCod);
1248
        args.setUsage(usage);
1252
        args.setUsage(usage);
-
 
1253
        args.setPrefix(prefix);
1249
        args.write(prot);
1254
        args.write(prot);
1250
        prot.writeMessageEnd();
1255
        prot.writeMessageEnd();
1251
      }
1256
      }
1252
 
1257
 
1253
      public String getResult() throws PromotionException, org.apache.thrift.TException {
1258
      public String getResult() throws PromotionException, org.apache.thrift.TException {
Line 1827... Line 1832...
1827
      }
1832
      }
1828
 
1833
 
1829
      protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
1834
      protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
1830
        createCoupon_result result = new createCoupon_result();
1835
        createCoupon_result result = new createCoupon_result();
1831
        try {
1836
        try {
1832
          result.success = iface.createCoupon(args.promotionId, args.endOn, args.email, args.amount, args.isCod, args.usage);
1837
          result.success = iface.createCoupon(args.promotionId, args.endOn, args.email, args.amount, args.isCod, args.usage, args.prefix);
1833
        } catch (PromotionException pex) {
1838
        } catch (PromotionException pex) {
1834
          result.pex = pex;
1839
          result.pex = pex;
1835
        }
1840
        }
1836
        return result;
1841
        return result;
1837
      }
1842
      }
Line 11909... Line 11914...
11909
    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);
11914
    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);
11910
    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);
11915
    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);
11911
    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);
11916
    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);
11912
    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);
11917
    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);
11913
    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);
11918
    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);
-
 
11919
    private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)7);
11914
 
11920
 
11915
    private long promotionId; // required
11921
    private long promotionId; // required
11916
    private long endOn; // required
11922
    private long endOn; // required
11917
    private String email; // required
11923
    private String email; // required
11918
    private long amount; // required
11924
    private long amount; // required
11919
    private boolean isCod; // required
11925
    private boolean isCod; // required
11920
    private long usage; // required
11926
    private long usage; // required
-
 
11927
    private String prefix; // required
11921
 
11928
 
11922
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11923
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11930
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11924
      PROMOTION_ID((short)1, "promotionId"),
11931
      PROMOTION_ID((short)1, "promotionId"),
11925
      END_ON((short)2, "endOn"),
11932
      END_ON((short)2, "endOn"),
11926
      EMAIL((short)3, "email"),
11933
      EMAIL((short)3, "email"),
11927
      AMOUNT((short)4, "amount"),
11934
      AMOUNT((short)4, "amount"),
11928
      IS_COD((short)5, "isCod"),
11935
      IS_COD((short)5, "isCod"),
11929
      USAGE((short)6, "usage");
11936
      USAGE((short)6, "usage"),
-
 
11937
      PREFIX((short)7, "prefix");
11930
 
11938
 
11931
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11932
 
11940
 
11933
      static {
11941
      static {
11934
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 11951... Line 11959...
11951
            return AMOUNT;
11959
            return AMOUNT;
11952
          case 5: // IS_COD
11960
          case 5: // IS_COD
11953
            return IS_COD;
11961
            return IS_COD;
11954
          case 6: // USAGE
11962
          case 6: // USAGE
11955
            return USAGE;
11963
            return USAGE;
-
 
11964
          case 7: // PREFIX
-
 
11965
            return PREFIX;
11956
          default:
11966
          default:
11957
            return null;
11967
            return null;
11958
        }
11968
        }
11959
      }
11969
      }
11960
 
11970
 
Line 12013... Line 12023...
12013
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12023
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12014
      tmpMap.put(_Fields.IS_COD, new org.apache.thrift.meta_data.FieldMetaData("isCod", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12024
      tmpMap.put(_Fields.IS_COD, new org.apache.thrift.meta_data.FieldMetaData("isCod", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12015
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
12025
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
12016
      tmpMap.put(_Fields.USAGE, new org.apache.thrift.meta_data.FieldMetaData("usage", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12026
      tmpMap.put(_Fields.USAGE, new org.apache.thrift.meta_data.FieldMetaData("usage", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12017
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12027
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
12028
      tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
12029
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
12018
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12030
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12019
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createCoupon_args.class, metaDataMap);
12031
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createCoupon_args.class, metaDataMap);
12020
    }
12032
    }
12021
 
12033
 
12022
    public createCoupon_args() {
12034
    public createCoupon_args() {
Line 12026... Line 12038...
12026
      long promotionId,
12038
      long promotionId,
12027
      long endOn,
12039
      long endOn,
12028
      String email,
12040
      String email,
12029
      long amount,
12041
      long amount,
12030
      boolean isCod,
12042
      boolean isCod,
12031
      long usage)
12043
      long usage,
-
 
12044
      String prefix)
12032
    {
12045
    {
12033
      this();
12046
      this();
12034
      this.promotionId = promotionId;
12047
      this.promotionId = promotionId;
12035
      setPromotionIdIsSet(true);
12048
      setPromotionIdIsSet(true);
12036
      this.endOn = endOn;
12049
      this.endOn = endOn;
Line 12040... Line 12053...
12040
      setAmountIsSet(true);
12053
      setAmountIsSet(true);
12041
      this.isCod = isCod;
12054
      this.isCod = isCod;
12042
      setIsCodIsSet(true);
12055
      setIsCodIsSet(true);
12043
      this.usage = usage;
12056
      this.usage = usage;
12044
      setUsageIsSet(true);
12057
      setUsageIsSet(true);
-
 
12058
      this.prefix = prefix;
12045
    }
12059
    }
12046
 
12060
 
12047
    /**
12061
    /**
12048
     * Performs a deep copy on <i>other</i>.
12062
     * Performs a deep copy on <i>other</i>.
12049
     */
12063
     */
Line 12056... Line 12070...
12056
        this.email = other.email;
12070
        this.email = other.email;
12057
      }
12071
      }
12058
      this.amount = other.amount;
12072
      this.amount = other.amount;
12059
      this.isCod = other.isCod;
12073
      this.isCod = other.isCod;
12060
      this.usage = other.usage;
12074
      this.usage = other.usage;
-
 
12075
      if (other.isSetPrefix()) {
-
 
12076
        this.prefix = other.prefix;
-
 
12077
      }
12061
    }
12078
    }
12062
 
12079
 
12063
    public createCoupon_args deepCopy() {
12080
    public createCoupon_args deepCopy() {
12064
      return new createCoupon_args(this);
12081
      return new createCoupon_args(this);
12065
    }
12082
    }
Line 12075... Line 12092...
12075
      this.amount = 0;
12092
      this.amount = 0;
12076
      setIsCodIsSet(false);
12093
      setIsCodIsSet(false);
12077
      this.isCod = false;
12094
      this.isCod = false;
12078
      setUsageIsSet(false);
12095
      setUsageIsSet(false);
12079
      this.usage = 0;
12096
      this.usage = 0;
-
 
12097
      this.prefix = null;
12080
    }
12098
    }
12081
 
12099
 
12082
    public long getPromotionId() {
12100
    public long getPromotionId() {
12083
      return this.promotionId;
12101
      return this.promotionId;
12084
    }
12102
    }
Line 12210... Line 12228...
12210
 
12228
 
12211
    public void setUsageIsSet(boolean value) {
12229
    public void setUsageIsSet(boolean value) {
12212
      __isset_bit_vector.set(__USAGE_ISSET_ID, value);
12230
      __isset_bit_vector.set(__USAGE_ISSET_ID, value);
12213
    }
12231
    }
12214
 
12232
 
-
 
12233
    public String getPrefix() {
-
 
12234
      return this.prefix;
-
 
12235
    }
-
 
12236
 
-
 
12237
    public void setPrefix(String prefix) {
-
 
12238
      this.prefix = prefix;
-
 
12239
    }
-
 
12240
 
-
 
12241
    public void unsetPrefix() {
-
 
12242
      this.prefix = null;
-
 
12243
    }
-
 
12244
 
-
 
12245
    /** Returns true if field prefix is set (has been assigned a value) and false otherwise */
-
 
12246
    public boolean isSetPrefix() {
-
 
12247
      return this.prefix != null;
-
 
12248
    }
-
 
12249
 
-
 
12250
    public void setPrefixIsSet(boolean value) {
-
 
12251
      if (!value) {
-
 
12252
        this.prefix = null;
-
 
12253
      }
-
 
12254
    }
-
 
12255
 
12215
    public void setFieldValue(_Fields field, Object value) {
12256
    public void setFieldValue(_Fields field, Object value) {
12216
      switch (field) {
12257
      switch (field) {
12217
      case PROMOTION_ID:
12258
      case PROMOTION_ID:
12218
        if (value == null) {
12259
        if (value == null) {
12219
          unsetPromotionId();
12260
          unsetPromotionId();
Line 12260... Line 12301...
12260
        } else {
12301
        } else {
12261
          setUsage((Long)value);
12302
          setUsage((Long)value);
12262
        }
12303
        }
12263
        break;
12304
        break;
12264
 
12305
 
-
 
12306
      case PREFIX:
-
 
12307
        if (value == null) {
-
 
12308
          unsetPrefix();
-
 
12309
        } else {
-
 
12310
          setPrefix((String)value);
-
 
12311
        }
-
 
12312
        break;
-
 
12313
 
12265
      }
12314
      }
12266
    }
12315
    }
12267
 
12316
 
12268
    public Object getFieldValue(_Fields field) {
12317
    public Object getFieldValue(_Fields field) {
12269
      switch (field) {
12318
      switch (field) {
Line 12283... Line 12332...
12283
        return Boolean.valueOf(isIsCod());
12332
        return Boolean.valueOf(isIsCod());
12284
 
12333
 
12285
      case USAGE:
12334
      case USAGE:
12286
        return Long.valueOf(getUsage());
12335
        return Long.valueOf(getUsage());
12287
 
12336
 
-
 
12337
      case PREFIX:
-
 
12338
        return getPrefix();
-
 
12339
 
12288
      }
12340
      }
12289
      throw new IllegalStateException();
12341
      throw new IllegalStateException();
12290
    }
12342
    }
12291
 
12343
 
12292
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12344
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 12306... Line 12358...
12306
        return isSetAmount();
12358
        return isSetAmount();
12307
      case IS_COD:
12359
      case IS_COD:
12308
        return isSetIsCod();
12360
        return isSetIsCod();
12309
      case USAGE:
12361
      case USAGE:
12310
        return isSetUsage();
12362
        return isSetUsage();
-
 
12363
      case PREFIX:
-
 
12364
        return isSetPrefix();
12311
      }
12365
      }
12312
      throw new IllegalStateException();
12366
      throw new IllegalStateException();
12313
    }
12367
    }
12314
 
12368
 
12315
    @Override
12369
    @Override
Line 12377... Line 12431...
12377
          return false;
12431
          return false;
12378
        if (this.usage != that.usage)
12432
        if (this.usage != that.usage)
12379
          return false;
12433
          return false;
12380
      }
12434
      }
12381
 
12435
 
-
 
12436
      boolean this_present_prefix = true && this.isSetPrefix();
-
 
12437
      boolean that_present_prefix = true && that.isSetPrefix();
-
 
12438
      if (this_present_prefix || that_present_prefix) {
-
 
12439
        if (!(this_present_prefix && that_present_prefix))
-
 
12440
          return false;
-
 
12441
        if (!this.prefix.equals(that.prefix))
-
 
12442
          return false;
-
 
12443
      }
-
 
12444
 
12382
      return true;
12445
      return true;
12383
    }
12446
    }
12384
 
12447
 
12385
    @Override
12448
    @Override
12386
    public int hashCode() {
12449
    public int hashCode() {
Line 12453... Line 12516...
12453
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usage, typedOther.usage);
12516
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usage, typedOther.usage);
12454
        if (lastComparison != 0) {
12517
        if (lastComparison != 0) {
12455
          return lastComparison;
12518
          return lastComparison;
12456
        }
12519
        }
12457
      }
12520
      }
-
 
12521
      lastComparison = Boolean.valueOf(isSetPrefix()).compareTo(typedOther.isSetPrefix());
-
 
12522
      if (lastComparison != 0) {
-
 
12523
        return lastComparison;
-
 
12524
      }
-
 
12525
      if (isSetPrefix()) {
-
 
12526
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prefix, typedOther.prefix);
-
 
12527
        if (lastComparison != 0) {
-
 
12528
          return lastComparison;
-
 
12529
        }
-
 
12530
      }
12458
      return 0;
12531
      return 0;
12459
    }
12532
    }
12460
 
12533
 
12461
    public _Fields fieldForId(int fieldId) {
12534
    public _Fields fieldForId(int fieldId) {
12462
      return _Fields.findByThriftId(fieldId);
12535
      return _Fields.findByThriftId(fieldId);
Line 12517... Line 12590...
12517
              setUsageIsSet(true);
12590
              setUsageIsSet(true);
12518
            } else { 
12591
            } else { 
12519
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12592
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12520
            }
12593
            }
12521
            break;
12594
            break;
-
 
12595
          case 7: // PREFIX
-
 
12596
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
12597
              this.prefix = iprot.readString();
-
 
12598
            } else { 
-
 
12599
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12600
            }
-
 
12601
            break;
12522
          default:
12602
          default:
12523
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12603
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12524
        }
12604
        }
12525
        iprot.readFieldEnd();
12605
        iprot.readFieldEnd();
12526
      }
12606
      }
Line 12550... Line 12630...
12550
      oprot.writeBool(this.isCod);
12630
      oprot.writeBool(this.isCod);
12551
      oprot.writeFieldEnd();
12631
      oprot.writeFieldEnd();
12552
      oprot.writeFieldBegin(USAGE_FIELD_DESC);
12632
      oprot.writeFieldBegin(USAGE_FIELD_DESC);
12553
      oprot.writeI64(this.usage);
12633
      oprot.writeI64(this.usage);
12554
      oprot.writeFieldEnd();
12634
      oprot.writeFieldEnd();
-
 
12635
      if (this.prefix != null) {
-
 
12636
        oprot.writeFieldBegin(PREFIX_FIELD_DESC);
-
 
12637
        oprot.writeString(this.prefix);
-
 
12638
        oprot.writeFieldEnd();
-
 
12639
      }
12555
      oprot.writeFieldStop();
12640
      oprot.writeFieldStop();
12556
      oprot.writeStructEnd();
12641
      oprot.writeStructEnd();
12557
    }
12642
    }
12558
 
12643
 
12559
    @Override
12644
    @Override
Line 12586... Line 12671...
12586
      first = false;
12671
      first = false;
12587
      if (!first) sb.append(", ");
12672
      if (!first) sb.append(", ");
12588
      sb.append("usage:");
12673
      sb.append("usage:");
12589
      sb.append(this.usage);
12674
      sb.append(this.usage);
12590
      first = false;
12675
      first = false;
-
 
12676
      if (!first) sb.append(", ");
-
 
12677
      sb.append("prefix:");
-
 
12678
      if (this.prefix == null) {
-
 
12679
        sb.append("null");
-
 
12680
      } else {
-
 
12681
        sb.append(this.prefix);
-
 
12682
      }
-
 
12683
      first = false;
12591
      sb.append(")");
12684
      sb.append(")");
12592
      return sb.toString();
12685
      return sb.toString();
12593
    }
12686
    }
12594
 
12687
 
12595
    public void validate() throws org.apache.thrift.TException {
12688
    public void validate() throws org.apache.thrift.TException {
Line 12604... Line 12697...
12604
      }
12697
      }
12605
    }
12698
    }
12606
 
12699
 
12607
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12700
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12608
      try {
12701
      try {
-
 
12702
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
12703
        __isset_bit_vector = new BitSet(1);
12609
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12704
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12610
      } catch (org.apache.thrift.TException te) {
12705
      } catch (org.apache.thrift.TException te) {
12611
        throw new java.io.IOException(te);
12706
        throw new java.io.IOException(te);
12612
      }
12707
      }
12613
    }
12708
    }