Subversion Repositories SmartDukaan

Rev

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

Rev 7293 Rev 8717
Line 93... Line 93...
93
  private static final org.apache.thrift.protocol.TField GUARDIAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("guardianName", org.apache.thrift.protocol.TType.STRING, (short)68);
93
  private static final org.apache.thrift.protocol.TField GUARDIAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("guardianName", org.apache.thrift.protocol.TType.STRING, (short)68);
94
  private static final org.apache.thrift.protocol.TField FREEBIE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieItemId", org.apache.thrift.protocol.TType.I64, (short)69);
94
  private static final org.apache.thrift.protocol.TField FREEBIE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieItemId", org.apache.thrift.protocol.TType.I64, (short)69);
95
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)70);
95
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)70);
96
  private static final org.apache.thrift.protocol.TField ADVANCE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)71);
96
  private static final org.apache.thrift.protocol.TField ADVANCE_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)71);
97
  private static final org.apache.thrift.protocol.TField STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storeId", org.apache.thrift.protocol.TType.I64, (short)72);
97
  private static final org.apache.thrift.protocol.TField STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storeId", org.apache.thrift.protocol.TType.I64, (short)72);
-
 
98
  private static final org.apache.thrift.protocol.TField PRODUCT_CONDITION_FIELD_DESC = new org.apache.thrift.protocol.TField("productCondition", org.apache.thrift.protocol.TType.I32, (short)73);
98
 
99
 
99
  private long id; // required
100
  private long id; // required
100
  private long warehouse_id; // required
101
  private long warehouse_id; // required
101
  private List<LineItem> lineitems; // required
102
  private List<LineItem> lineitems; // required
102
  private long logistics_provider_id; // required
103
  private long logistics_provider_id; // required
Line 166... Line 167...
166
  private String guardianName; // required
167
  private String guardianName; // required
167
  private long freebieItemId; // required
168
  private long freebieItemId; // required
168
  private long source; // required
169
  private long source; // required
169
  private double advanceAmount; // required
170
  private double advanceAmount; // required
170
  private long storeId; // required
171
  private long storeId; // required
-
 
172
  private ProductCondition productCondition; // required
171
 
173
 
172
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
174
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
173
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
175
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
174
    ID((short)1, "id"),
176
    ID((short)1, "id"),
175
    WAREHOUSE_ID((short)2, "warehouse_id"),
177
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 278... Line 280...
278
    DOB((short)67, "dob"),
280
    DOB((short)67, "dob"),
279
    GUARDIAN_NAME((short)68, "guardianName"),
281
    GUARDIAN_NAME((short)68, "guardianName"),
280
    FREEBIE_ITEM_ID((short)69, "freebieItemId"),
282
    FREEBIE_ITEM_ID((short)69, "freebieItemId"),
281
    SOURCE((short)70, "source"),
283
    SOURCE((short)70, "source"),
282
    ADVANCE_AMOUNT((short)71, "advanceAmount"),
284
    ADVANCE_AMOUNT((short)71, "advanceAmount"),
283
    STORE_ID((short)72, "storeId");
285
    STORE_ID((short)72, "storeId"),
-
 
286
    /**
-
 
287
     * 
-
 
288
     * @see ProductCondition
-
 
289
     */
-
 
290
    PRODUCT_CONDITION((short)73, "productCondition");
284
 
291
 
285
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
292
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
286
 
293
 
287
    static {
294
    static {
288
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
295
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 437... Line 444...
437
          return SOURCE;
444
          return SOURCE;
438
        case 71: // ADVANCE_AMOUNT
445
        case 71: // ADVANCE_AMOUNT
439
          return ADVANCE_AMOUNT;
446
          return ADVANCE_AMOUNT;
440
        case 72: // STORE_ID
447
        case 72: // STORE_ID
441
          return STORE_ID;
448
          return STORE_ID;
-
 
449
        case 73: // PRODUCT_CONDITION
-
 
450
          return PRODUCT_CONDITION;
442
        default:
451
        default:
443
          return null;
452
          return null;
444
      }
453
      }
445
    }
454
    }
446
 
455
 
Line 674... Line 683...
674
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
683
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
675
    tmpMap.put(_Fields.ADVANCE_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("advanceAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
684
    tmpMap.put(_Fields.ADVANCE_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("advanceAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
676
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
685
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
677
    tmpMap.put(_Fields.STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("storeId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
686
    tmpMap.put(_Fields.STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("storeId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
678
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
687
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
688
    tmpMap.put(_Fields.PRODUCT_CONDITION, new org.apache.thrift.meta_data.FieldMetaData("productCondition", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
689
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ProductCondition.class)));
679
    metaDataMap = Collections.unmodifiableMap(tmpMap);
690
    metaDataMap = Collections.unmodifiableMap(tmpMap);
680
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
691
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
681
  }
692
  }
682
 
693
 
683
  public Order() {
694
  public Order() {
Line 746... Line 757...
746
    String dob,
757
    String dob,
747
    String guardianName,
758
    String guardianName,
748
    long freebieItemId,
759
    long freebieItemId,
749
    long source,
760
    long source,
750
    double advanceAmount,
761
    double advanceAmount,
751
    long storeId)
762
    long storeId,
-
 
763
    ProductCondition productCondition)
752
  {
764
  {
753
    this();
765
    this();
754
    this.id = id;
766
    this.id = id;
755
    setIdIsSet(true);
767
    setIdIsSet(true);
756
    this.warehouse_id = warehouse_id;
768
    this.warehouse_id = warehouse_id;
Line 854... Line 866...
854
    setSourceIsSet(true);
866
    setSourceIsSet(true);
855
    this.advanceAmount = advanceAmount;
867
    this.advanceAmount = advanceAmount;
856
    setAdvanceAmountIsSet(true);
868
    setAdvanceAmountIsSet(true);
857
    this.storeId = storeId;
869
    this.storeId = storeId;
858
    setStoreIdIsSet(true);
870
    setStoreIdIsSet(true);
-
 
871
    this.productCondition = productCondition;
859
  }
872
  }
860
 
873
 
861
  /**
874
  /**
862
   * Performs a deep copy on <i>other</i>.
875
   * Performs a deep copy on <i>other</i>.
863
   */
876
   */
Line 988... Line 1001...
988
    }
1001
    }
989
    this.freebieItemId = other.freebieItemId;
1002
    this.freebieItemId = other.freebieItemId;
990
    this.source = other.source;
1003
    this.source = other.source;
991
    this.advanceAmount = other.advanceAmount;
1004
    this.advanceAmount = other.advanceAmount;
992
    this.storeId = other.storeId;
1005
    this.storeId = other.storeId;
-
 
1006
    if (other.isSetProductCondition()) {
-
 
1007
      this.productCondition = other.productCondition;
-
 
1008
    }
993
  }
1009
  }
994
 
1010
 
995
  public Order deepCopy() {
1011
  public Order deepCopy() {
996
    return new Order(this);
1012
    return new Order(this);
997
  }
1013
  }
Line 1115... Line 1131...
1115
    this.source = 0;
1131
    this.source = 0;
1116
    setAdvanceAmountIsSet(false);
1132
    setAdvanceAmountIsSet(false);
1117
    this.advanceAmount = 0.0;
1133
    this.advanceAmount = 0.0;
1118
    setStoreIdIsSet(false);
1134
    setStoreIdIsSet(false);
1119
    this.storeId = 0;
1135
    this.storeId = 0;
-
 
1136
    this.productCondition = null;
1120
  }
1137
  }
1121
 
1138
 
1122
  public long getId() {
1139
  public long getId() {
1123
    return this.id;
1140
    return this.id;
1124
  }
1141
  }
Line 2817... Line 2834...
2817
 
2834
 
2818
  public void setStoreIdIsSet(boolean value) {
2835
  public void setStoreIdIsSet(boolean value) {
2819
    __isset_bit_vector.set(__STOREID_ISSET_ID, value);
2836
    __isset_bit_vector.set(__STOREID_ISSET_ID, value);
2820
  }
2837
  }
2821
 
2838
 
-
 
2839
  /**
-
 
2840
   * 
-
 
2841
   * @see ProductCondition
-
 
2842
   */
-
 
2843
  public ProductCondition getProductCondition() {
-
 
2844
    return this.productCondition;
-
 
2845
  }
-
 
2846
 
-
 
2847
  /**
-
 
2848
   * 
-
 
2849
   * @see ProductCondition
-
 
2850
   */
-
 
2851
  public void setProductCondition(ProductCondition productCondition) {
-
 
2852
    this.productCondition = productCondition;
-
 
2853
  }
-
 
2854
 
-
 
2855
  public void unsetProductCondition() {
-
 
2856
    this.productCondition = null;
-
 
2857
  }
-
 
2858
 
-
 
2859
  /** Returns true if field productCondition is set (has been assigned a value) and false otherwise */
-
 
2860
  public boolean isSetProductCondition() {
-
 
2861
    return this.productCondition != null;
-
 
2862
  }
-
 
2863
 
-
 
2864
  public void setProductConditionIsSet(boolean value) {
-
 
2865
    if (!value) {
-
 
2866
      this.productCondition = null;
-
 
2867
    }
-
 
2868
  }
-
 
2869
 
2822
  public void setFieldValue(_Fields field, Object value) {
2870
  public void setFieldValue(_Fields field, Object value) {
2823
    switch (field) {
2871
    switch (field) {
2824
    case ID:
2872
    case ID:
2825
      if (value == null) {
2873
      if (value == null) {
2826
        unsetId();
2874
        unsetId();
Line 3395... Line 3443...
3395
      } else {
3443
      } else {
3396
        setStoreId((Long)value);
3444
        setStoreId((Long)value);
3397
      }
3445
      }
3398
      break;
3446
      break;
3399
 
3447
 
-
 
3448
    case PRODUCT_CONDITION:
-
 
3449
      if (value == null) {
-
 
3450
        unsetProductCondition();
-
 
3451
      } else {
-
 
3452
        setProductCondition((ProductCondition)value);
-
 
3453
      }
-
 
3454
      break;
-
 
3455
 
3400
    }
3456
    }
3401
  }
3457
  }
3402
 
3458
 
3403
  public Object getFieldValue(_Fields field) {
3459
  public Object getFieldValue(_Fields field) {
3404
    switch (field) {
3460
    switch (field) {
Line 3616... Line 3672...
3616
      return Double.valueOf(getAdvanceAmount());
3672
      return Double.valueOf(getAdvanceAmount());
3617
 
3673
 
3618
    case STORE_ID:
3674
    case STORE_ID:
3619
      return Long.valueOf(getStoreId());
3675
      return Long.valueOf(getStoreId());
3620
 
3676
 
-
 
3677
    case PRODUCT_CONDITION:
-
 
3678
      return getProductCondition();
-
 
3679
 
3621
    }
3680
    }
3622
    throw new IllegalStateException();
3681
    throw new IllegalStateException();
3623
  }
3682
  }
3624
 
3683
 
3625
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3684
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 3771... Line 3830...
3771
      return isSetSource();
3830
      return isSetSource();
3772
    case ADVANCE_AMOUNT:
3831
    case ADVANCE_AMOUNT:
3773
      return isSetAdvanceAmount();
3832
      return isSetAdvanceAmount();
3774
    case STORE_ID:
3833
    case STORE_ID:
3775
      return isSetStoreId();
3834
      return isSetStoreId();
-
 
3835
    case PRODUCT_CONDITION:
-
 
3836
      return isSetProductCondition();
3776
    }
3837
    }
3777
    throw new IllegalStateException();
3838
    throw new IllegalStateException();
3778
  }
3839
  }
3779
 
3840
 
3780
  @Override
3841
  @Override
Line 4436... Line 4497...
4436
        return false;
4497
        return false;
4437
      if (this.storeId != that.storeId)
4498
      if (this.storeId != that.storeId)
4438
        return false;
4499
        return false;
4439
    }
4500
    }
4440
 
4501
 
-
 
4502
    boolean this_present_productCondition = true && this.isSetProductCondition();
-
 
4503
    boolean that_present_productCondition = true && that.isSetProductCondition();
-
 
4504
    if (this_present_productCondition || that_present_productCondition) {
-
 
4505
      if (!(this_present_productCondition && that_present_productCondition))
-
 
4506
        return false;
-
 
4507
      if (!this.productCondition.equals(that.productCondition))
-
 
4508
        return false;
-
 
4509
    }
-
 
4510
 
4441
    return true;
4511
    return true;
4442
  }
4512
  }
4443
 
4513
 
4444
  @Override
4514
  @Override
4445
  public int hashCode() {
4515
  public int hashCode() {
Line 5172... Line 5242...
5172
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeId, typedOther.storeId);
5242
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeId, typedOther.storeId);
5173
      if (lastComparison != 0) {
5243
      if (lastComparison != 0) {
5174
        return lastComparison;
5244
        return lastComparison;
5175
      }
5245
      }
5176
    }
5246
    }
-
 
5247
    lastComparison = Boolean.valueOf(isSetProductCondition()).compareTo(typedOther.isSetProductCondition());
-
 
5248
    if (lastComparison != 0) {
-
 
5249
      return lastComparison;
-
 
5250
    }
-
 
5251
    if (isSetProductCondition()) {
-
 
5252
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productCondition, typedOther.productCondition);
-
 
5253
      if (lastComparison != 0) {
-
 
5254
        return lastComparison;
-
 
5255
      }
-
 
5256
    }
5177
    return 0;
5257
    return 0;
5178
  }
5258
  }
5179
 
5259
 
5180
  public _Fields fieldForId(int fieldId) {
5260
  public _Fields fieldForId(int fieldId) {
5181
    return _Fields.findByThriftId(fieldId);
5261
    return _Fields.findByThriftId(fieldId);
Line 5751... Line 5831...
5751
            setStoreIdIsSet(true);
5831
            setStoreIdIsSet(true);
5752
          } else { 
5832
          } else { 
5753
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5833
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5754
          }
5834
          }
5755
          break;
5835
          break;
-
 
5836
        case 73: // PRODUCT_CONDITION
-
 
5837
          if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
5838
            this.productCondition = ProductCondition.findByValue(iprot.readI32());
-
 
5839
          } else { 
-
 
5840
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
5841
          }
-
 
5842
          break;
5756
        default:
5843
        default:
5757
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5844
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5758
      }
5845
      }
5759
      iprot.readFieldEnd();
5846
      iprot.readFieldEnd();
5760
    }
5847
    }
Line 6051... Line 6138...
6051
    oprot.writeDouble(this.advanceAmount);
6138
    oprot.writeDouble(this.advanceAmount);
6052
    oprot.writeFieldEnd();
6139
    oprot.writeFieldEnd();
6053
    oprot.writeFieldBegin(STORE_ID_FIELD_DESC);
6140
    oprot.writeFieldBegin(STORE_ID_FIELD_DESC);
6054
    oprot.writeI64(this.storeId);
6141
    oprot.writeI64(this.storeId);
6055
    oprot.writeFieldEnd();
6142
    oprot.writeFieldEnd();
-
 
6143
    if (this.productCondition != null) {
-
 
6144
      oprot.writeFieldBegin(PRODUCT_CONDITION_FIELD_DESC);
-
 
6145
      oprot.writeI32(this.productCondition.getValue());
-
 
6146
      oprot.writeFieldEnd();
-
 
6147
    }
6056
    oprot.writeFieldStop();
6148
    oprot.writeFieldStop();
6057
    oprot.writeStructEnd();
6149
    oprot.writeStructEnd();
6058
  }
6150
  }
6059
 
6151
 
6060
  @Override
6152
  @Override
Line 6461... Line 6553...
6461
    first = false;
6553
    first = false;
6462
    if (!first) sb.append(", ");
6554
    if (!first) sb.append(", ");
6463
    sb.append("storeId:");
6555
    sb.append("storeId:");
6464
    sb.append(this.storeId);
6556
    sb.append(this.storeId);
6465
    first = false;
6557
    first = false;
-
 
6558
    if (!first) sb.append(", ");
-
 
6559
    sb.append("productCondition:");
-
 
6560
    if (this.productCondition == null) {
-
 
6561
      sb.append("null");
-
 
6562
    } else {
-
 
6563
      sb.append(this.productCondition);
-
 
6564
    }
-
 
6565
    first = false;
6466
    sb.append(")");
6566
    sb.append(")");
6467
    return sb.toString();
6567
    return sb.toString();
6468
  }
6568
  }
6469
 
6569
 
6470
  public void validate() throws org.apache.thrift.TException {
6570
  public void validate() throws org.apache.thrift.TException {