Subversion Repositories SmartDukaan

Rev

Rev 483 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 483 Rev 510
Line 26... Line 26...
26
public class LogisticsInfo implements TBase<LogisticsInfo._Fields>, java.io.Serializable, Cloneable, Comparable<LogisticsInfo> {
26
public class LogisticsInfo implements TBase<LogisticsInfo._Fields>, java.io.Serializable, Cloneable, Comparable<LogisticsInfo> {
27
  private static final TStruct STRUCT_DESC = new TStruct("LogisticsInfo");
27
  private static final TStruct STRUCT_DESC = new TStruct("LogisticsInfo");
28
 
28
 
29
  private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)1);
29
  private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)1);
30
  private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)2);
30
  private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)2);
31
  private static final TField AIRWAY_BILLNO_FIELD_DESC = new TField("airway_billno", TType.I64, (short)3);
31
  private static final TField AIRWAY_BILLNO_FIELD_DESC = new TField("airway_billno", TType.STRING, (short)3);
32
  private static final TField DELIVERY_ESTIMATE_FIELD_DESC = new TField("delivery_estimate", TType.I64, (short)4);
32
  private static final TField DELIVERY_ESTIMATE_FIELD_DESC = new TField("delivery_estimate", TType.I64, (short)4);
33
 
33
 
34
  private long warehouse_id;
34
  private long warehouse_id;
35
  private long provider_id;
35
  private long provider_id;
36
  private long airway_billno;
36
  private String airway_billno;
37
  private long delivery_estimate;
37
  private long delivery_estimate;
38
 
38
 
39
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
39
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
40
  public enum _Fields implements TFieldIdEnum {
40
  public enum _Fields implements TFieldIdEnum {
41
    WAREHOUSE_ID((short)1, "warehouse_id"),
41
    WAREHOUSE_ID((short)1, "warehouse_id"),
Line 95... Line 95...
95
  }
95
  }
96
 
96
 
97
  // isset id assignments
97
  // isset id assignments
98
  private static final int __WAREHOUSE_ID_ISSET_ID = 0;
98
  private static final int __WAREHOUSE_ID_ISSET_ID = 0;
99
  private static final int __PROVIDER_ID_ISSET_ID = 1;
99
  private static final int __PROVIDER_ID_ISSET_ID = 1;
100
  private static final int __AIRWAY_BILLNO_ISSET_ID = 2;
-
 
101
  private static final int __DELIVERY_ESTIMATE_ISSET_ID = 3;
100
  private static final int __DELIVERY_ESTIMATE_ISSET_ID = 2;
102
  private BitSet __isset_bit_vector = new BitSet(4);
101
  private BitSet __isset_bit_vector = new BitSet(3);
103
 
102
 
104
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
103
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
105
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
104
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
106
        new FieldValueMetaData(TType.I64)));
105
        new FieldValueMetaData(TType.I64)));
107
    put(_Fields.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
106
    put(_Fields.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
108
        new FieldValueMetaData(TType.I64)));
107
        new FieldValueMetaData(TType.I64)));
109
    put(_Fields.AIRWAY_BILLNO, new FieldMetaData("airway_billno", TFieldRequirementType.DEFAULT, 
108
    put(_Fields.AIRWAY_BILLNO, new FieldMetaData("airway_billno", TFieldRequirementType.DEFAULT, 
110
        new FieldValueMetaData(TType.I64)));
109
        new FieldValueMetaData(TType.STRING)));
111
    put(_Fields.DELIVERY_ESTIMATE, new FieldMetaData("delivery_estimate", TFieldRequirementType.DEFAULT, 
110
    put(_Fields.DELIVERY_ESTIMATE, new FieldMetaData("delivery_estimate", TFieldRequirementType.DEFAULT, 
112
        new FieldValueMetaData(TType.I64)));
111
        new FieldValueMetaData(TType.I64)));
113
  }});
112
  }});
114
 
113
 
115
  static {
114
  static {
Line 120... Line 119...
120
  }
119
  }
121
 
120
 
122
  public LogisticsInfo(
121
  public LogisticsInfo(
123
    long warehouse_id,
122
    long warehouse_id,
124
    long provider_id,
123
    long provider_id,
125
    long airway_billno,
124
    String airway_billno,
126
    long delivery_estimate)
125
    long delivery_estimate)
127
  {
126
  {
128
    this();
127
    this();
129
    this.warehouse_id = warehouse_id;
128
    this.warehouse_id = warehouse_id;
130
    setWarehouse_idIsSet(true);
129
    setWarehouse_idIsSet(true);
131
    this.provider_id = provider_id;
130
    this.provider_id = provider_id;
132
    setProvider_idIsSet(true);
131
    setProvider_idIsSet(true);
133
    this.airway_billno = airway_billno;
132
    this.airway_billno = airway_billno;
134
    setAirway_billnoIsSet(true);
-
 
135
    this.delivery_estimate = delivery_estimate;
133
    this.delivery_estimate = delivery_estimate;
136
    setDelivery_estimateIsSet(true);
134
    setDelivery_estimateIsSet(true);
137
  }
135
  }
138
 
136
 
139
  /**
137
  /**
Line 142... Line 140...
142
  public LogisticsInfo(LogisticsInfo other) {
140
  public LogisticsInfo(LogisticsInfo other) {
143
    __isset_bit_vector.clear();
141
    __isset_bit_vector.clear();
144
    __isset_bit_vector.or(other.__isset_bit_vector);
142
    __isset_bit_vector.or(other.__isset_bit_vector);
145
    this.warehouse_id = other.warehouse_id;
143
    this.warehouse_id = other.warehouse_id;
146
    this.provider_id = other.provider_id;
144
    this.provider_id = other.provider_id;
-
 
145
    if (other.isSetAirway_billno()) {
147
    this.airway_billno = other.airway_billno;
146
      this.airway_billno = other.airway_billno;
-
 
147
    }
148
    this.delivery_estimate = other.delivery_estimate;
148
    this.delivery_estimate = other.delivery_estimate;
149
  }
149
  }
150
 
150
 
151
  public LogisticsInfo deepCopy() {
151
  public LogisticsInfo deepCopy() {
152
    return new LogisticsInfo(this);
152
    return new LogisticsInfo(this);
Line 201... Line 201...
201
 
201
 
202
  public void setProvider_idIsSet(boolean value) {
202
  public void setProvider_idIsSet(boolean value) {
203
    __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
203
    __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
204
  }
204
  }
205
 
205
 
206
  public long getAirway_billno() {
206
  public String getAirway_billno() {
207
    return this.airway_billno;
207
    return this.airway_billno;
208
  }
208
  }
209
 
209
 
210
  public LogisticsInfo setAirway_billno(long airway_billno) {
210
  public LogisticsInfo setAirway_billno(String airway_billno) {
211
    this.airway_billno = airway_billno;
211
    this.airway_billno = airway_billno;
212
    setAirway_billnoIsSet(true);
-
 
213
    return this;
212
    return this;
214
  }
213
  }
215
 
214
 
216
  public void unsetAirway_billno() {
215
  public void unsetAirway_billno() {
217
    __isset_bit_vector.clear(__AIRWAY_BILLNO_ISSET_ID);
216
    this.airway_billno = null;
218
  }
217
  }
219
 
218
 
220
  /** Returns true if field airway_billno is set (has been asigned a value) and false otherwise */
219
  /** Returns true if field airway_billno is set (has been asigned a value) and false otherwise */
221
  public boolean isSetAirway_billno() {
220
  public boolean isSetAirway_billno() {
222
    return __isset_bit_vector.get(__AIRWAY_BILLNO_ISSET_ID);
221
    return this.airway_billno != null;
223
  }
222
  }
224
 
223
 
225
  public void setAirway_billnoIsSet(boolean value) {
224
  public void setAirway_billnoIsSet(boolean value) {
-
 
225
    if (!value) {
226
    __isset_bit_vector.set(__AIRWAY_BILLNO_ISSET_ID, value);
226
      this.airway_billno = null;
-
 
227
    }
227
  }
228
  }
228
 
229
 
229
  public long getDelivery_estimate() {
230
  public long getDelivery_estimate() {
230
    return this.delivery_estimate;
231
    return this.delivery_estimate;
231
  }
232
  }
Line 269... Line 270...
269
 
270
 
270
    case AIRWAY_BILLNO:
271
    case AIRWAY_BILLNO:
271
      if (value == null) {
272
      if (value == null) {
272
        unsetAirway_billno();
273
        unsetAirway_billno();
273
      } else {
274
      } else {
274
        setAirway_billno((Long)value);
275
        setAirway_billno((String)value);
275
      }
276
      }
276
      break;
277
      break;
277
 
278
 
278
    case DELIVERY_ESTIMATE:
279
    case DELIVERY_ESTIMATE:
279
      if (value == null) {
280
      if (value == null) {
Line 297... Line 298...
297
 
298
 
298
    case PROVIDER_ID:
299
    case PROVIDER_ID:
299
      return new Long(getProvider_id());
300
      return new Long(getProvider_id());
300
 
301
 
301
    case AIRWAY_BILLNO:
302
    case AIRWAY_BILLNO:
302
      return new Long(getAirway_billno());
303
      return getAirway_billno();
303
 
304
 
304
    case DELIVERY_ESTIMATE:
305
    case DELIVERY_ESTIMATE:
305
      return new Long(getDelivery_estimate());
306
      return new Long(getDelivery_estimate());
306
 
307
 
307
    }
308
    }
Line 360... Line 361...
360
        return false;
361
        return false;
361
      if (this.provider_id != that.provider_id)
362
      if (this.provider_id != that.provider_id)
362
        return false;
363
        return false;
363
    }
364
    }
364
 
365
 
365
    boolean this_present_airway_billno = true;
366
    boolean this_present_airway_billno = true && this.isSetAirway_billno();
366
    boolean that_present_airway_billno = true;
367
    boolean that_present_airway_billno = true && that.isSetAirway_billno();
367
    if (this_present_airway_billno || that_present_airway_billno) {
368
    if (this_present_airway_billno || that_present_airway_billno) {
368
      if (!(this_present_airway_billno && that_present_airway_billno))
369
      if (!(this_present_airway_billno && that_present_airway_billno))
369
        return false;
370
        return false;
370
      if (this.airway_billno != that.airway_billno)
371
      if (!this.airway_billno.equals(that.airway_billno))
371
        return false;
372
        return false;
372
    }
373
    }
373
 
374
 
374
    boolean this_present_delivery_estimate = true;
375
    boolean this_present_delivery_estimate = true;
375
    boolean that_present_delivery_estimate = true;
376
    boolean that_present_delivery_estimate = true;
Line 460... Line 461...
460
            } else { 
461
            } else { 
461
              TProtocolUtil.skip(iprot, field.type);
462
              TProtocolUtil.skip(iprot, field.type);
462
            }
463
            }
463
            break;
464
            break;
464
          case AIRWAY_BILLNO:
465
          case AIRWAY_BILLNO:
465
            if (field.type == TType.I64) {
466
            if (field.type == TType.STRING) {
466
              this.airway_billno = iprot.readI64();
467
              this.airway_billno = iprot.readString();
467
              setAirway_billnoIsSet(true);
-
 
468
            } else { 
468
            } else { 
469
              TProtocolUtil.skip(iprot, field.type);
469
              TProtocolUtil.skip(iprot, field.type);
470
            }
470
            }
471
            break;
471
            break;
472
          case DELIVERY_ESTIMATE:
472
          case DELIVERY_ESTIMATE:
Line 493... Line 493...
493
    oprot.writeI64(this.warehouse_id);
493
    oprot.writeI64(this.warehouse_id);
494
    oprot.writeFieldEnd();
494
    oprot.writeFieldEnd();
495
    oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
495
    oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
496
    oprot.writeI64(this.provider_id);
496
    oprot.writeI64(this.provider_id);
497
    oprot.writeFieldEnd();
497
    oprot.writeFieldEnd();
-
 
498
    if (this.airway_billno != null) {
498
    oprot.writeFieldBegin(AIRWAY_BILLNO_FIELD_DESC);
499
      oprot.writeFieldBegin(AIRWAY_BILLNO_FIELD_DESC);
499
    oprot.writeI64(this.airway_billno);
500
      oprot.writeString(this.airway_billno);
500
    oprot.writeFieldEnd();
501
      oprot.writeFieldEnd();
-
 
502
    }
501
    oprot.writeFieldBegin(DELIVERY_ESTIMATE_FIELD_DESC);
503
    oprot.writeFieldBegin(DELIVERY_ESTIMATE_FIELD_DESC);
502
    oprot.writeI64(this.delivery_estimate);
504
    oprot.writeI64(this.delivery_estimate);
503
    oprot.writeFieldEnd();
505
    oprot.writeFieldEnd();
504
    oprot.writeFieldStop();
506
    oprot.writeFieldStop();
505
    oprot.writeStructEnd();
507
    oprot.writeStructEnd();
Line 517... Line 519...
517
    sb.append("provider_id:");
519
    sb.append("provider_id:");
518
    sb.append(this.provider_id);
520
    sb.append(this.provider_id);
519
    first = false;
521
    first = false;
520
    if (!first) sb.append(", ");
522
    if (!first) sb.append(", ");
521
    sb.append("airway_billno:");
523
    sb.append("airway_billno:");
-
 
524
    if (this.airway_billno == null) {
-
 
525
      sb.append("null");
-
 
526
    } else {
522
    sb.append(this.airway_billno);
527
      sb.append(this.airway_billno);
-
 
528
    }
523
    first = false;
529
    first = false;
524
    if (!first) sb.append(", ");
530
    if (!first) sb.append(", ");
525
    sb.append("delivery_estimate:");
531
    sb.append("delivery_estimate:");
526
    sb.append(this.delivery_estimate);
532
    sb.append(this.delivery_estimate);
527
    first = false;
533
    first = false;