Subversion Repositories SmartDukaan

Rev

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

Rev 1013 Rev 2443
Line 26... Line 26...
26
public class DashboardUser implements TBase<DashboardUser._Fields>, java.io.Serializable, Cloneable, Comparable<DashboardUser> {
26
public class DashboardUser implements TBase<DashboardUser._Fields>, java.io.Serializable, Cloneable, Comparable<DashboardUser> {
27
  private static final TStruct STRUCT_DESC = new TStruct("DashboardUser");
27
  private static final TStruct STRUCT_DESC = new TStruct("DashboardUser");
28
 
28
 
29
  private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
29
  private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
30
  private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
30
  private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
31
  private static final TField DISPATCH_TIME_FIELD_DESC = new TField("dispatchTime", TType.I64, (short)3);
31
  private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)3);
32
  private static final TField DELIVERY_TIME_FIELD_DESC = new TField("deliveryTime", TType.I64, (short)4);
32
  private static final TField ADMIN_FIELD_DESC = new TField("admin", TType.BOOL, (short)4);
33
 
33
 
34
  private String username;
34
  private String username;
35
  private String password;
35
  private String password;
36
  private long dispatchTime;
36
  private long warehouseId;
37
  private long deliveryTime;
37
  private boolean admin;
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
    USERNAME((short)1, "username"),
41
    USERNAME((short)1, "username"),
42
    PASSWORD((short)2, "password"),
42
    PASSWORD((short)2, "password"),
43
    DISPATCH_TIME((short)3, "dispatchTime"),
43
    WAREHOUSE_ID((short)3, "warehouseId"),
44
    DELIVERY_TIME((short)4, "deliveryTime");
44
    ADMIN((short)4, "admin");
45
 
45
 
46
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
46
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
47
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
48
 
48
 
49
    static {
49
    static {
Line 93... Line 93...
93
      return _fieldName;
93
      return _fieldName;
94
    }
94
    }
95
  }
95
  }
96
 
96
 
97
  // isset id assignments
97
  // isset id assignments
98
  private static final int __DISPATCHTIME_ISSET_ID = 0;
98
  private static final int __WAREHOUSEID_ISSET_ID = 0;
99
  private static final int __DELIVERYTIME_ISSET_ID = 1;
99
  private static final int __ADMIN_ISSET_ID = 1;
100
  private BitSet __isset_bit_vector = new BitSet(2);
100
  private BitSet __isset_bit_vector = new BitSet(2);
101
 
101
 
102
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
102
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
103
    put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
103
    put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
104
        new FieldValueMetaData(TType.STRING)));
104
        new FieldValueMetaData(TType.STRING)));
105
    put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
105
    put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
106
        new FieldValueMetaData(TType.STRING)));
106
        new FieldValueMetaData(TType.STRING)));
107
    put(_Fields.DISPATCH_TIME, new FieldMetaData("dispatchTime", TFieldRequirementType.DEFAULT, 
107
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
108
        new FieldValueMetaData(TType.I64)));
-
 
109
    put(_Fields.DELIVERY_TIME, new FieldMetaData("deliveryTime", TFieldRequirementType.DEFAULT, 
-
 
110
        new FieldValueMetaData(TType.I64)));
108
        new FieldValueMetaData(TType.I64)));
-
 
109
    put(_Fields.ADMIN, new FieldMetaData("admin", TFieldRequirementType.DEFAULT, 
-
 
110
        new FieldValueMetaData(TType.BOOL)));
111
  }});
111
  }});
112
 
112
 
113
  static {
113
  static {
114
    FieldMetaData.addStructMetaDataMap(DashboardUser.class, metaDataMap);
114
    FieldMetaData.addStructMetaDataMap(DashboardUser.class, metaDataMap);
115
  }
115
  }
Line 118... Line 118...
118
  }
118
  }
119
 
119
 
120
  public DashboardUser(
120
  public DashboardUser(
121
    String username,
121
    String username,
122
    String password,
122
    String password,
123
    long dispatchTime,
123
    long warehouseId,
124
    long deliveryTime)
124
    boolean admin)
125
  {
125
  {
126
    this();
126
    this();
127
    this.username = username;
127
    this.username = username;
128
    this.password = password;
128
    this.password = password;
129
    this.dispatchTime = dispatchTime;
129
    this.warehouseId = warehouseId;
130
    setDispatchTimeIsSet(true);
130
    setWarehouseIdIsSet(true);
131
    this.deliveryTime = deliveryTime;
131
    this.admin = admin;
132
    setDeliveryTimeIsSet(true);
132
    setAdminIsSet(true);
133
  }
133
  }
134
 
134
 
135
  /**
135
  /**
136
   * Performs a deep copy on <i>other</i>.
136
   * Performs a deep copy on <i>other</i>.
137
   */
137
   */
Line 142... Line 142...
142
      this.username = other.username;
142
      this.username = other.username;
143
    }
143
    }
144
    if (other.isSetPassword()) {
144
    if (other.isSetPassword()) {
145
      this.password = other.password;
145
      this.password = other.password;
146
    }
146
    }
147
    this.dispatchTime = other.dispatchTime;
147
    this.warehouseId = other.warehouseId;
148
    this.deliveryTime = other.deliveryTime;
148
    this.admin = other.admin;
149
  }
149
  }
150
 
150
 
151
  public DashboardUser deepCopy() {
151
  public DashboardUser deepCopy() {
152
    return new DashboardUser(this);
152
    return new DashboardUser(this);
153
  }
153
  }
Line 203... Line 203...
203
    if (!value) {
203
    if (!value) {
204
      this.password = null;
204
      this.password = null;
205
    }
205
    }
206
  }
206
  }
207
 
207
 
208
  public long getDispatchTime() {
208
  public long getWarehouseId() {
209
    return this.dispatchTime;
209
    return this.warehouseId;
210
  }
210
  }
211
 
211
 
212
  public DashboardUser setDispatchTime(long dispatchTime) {
212
  public DashboardUser setWarehouseId(long warehouseId) {
213
    this.dispatchTime = dispatchTime;
213
    this.warehouseId = warehouseId;
214
    setDispatchTimeIsSet(true);
214
    setWarehouseIdIsSet(true);
215
    return this;
215
    return this;
216
  }
216
  }
217
 
217
 
218
  public void unsetDispatchTime() {
218
  public void unsetWarehouseId() {
219
    __isset_bit_vector.clear(__DISPATCHTIME_ISSET_ID);
219
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
220
  }
220
  }
221
 
221
 
222
  /** Returns true if field dispatchTime is set (has been asigned a value) and false otherwise */
222
  /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
223
  public boolean isSetDispatchTime() {
223
  public boolean isSetWarehouseId() {
224
    return __isset_bit_vector.get(__DISPATCHTIME_ISSET_ID);
224
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
225
  }
225
  }
226
 
226
 
227
  public void setDispatchTimeIsSet(boolean value) {
227
  public void setWarehouseIdIsSet(boolean value) {
228
    __isset_bit_vector.set(__DISPATCHTIME_ISSET_ID, value);
228
    __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
229
  }
229
  }
230
 
230
 
231
  public long getDeliveryTime() {
231
  public boolean isAdmin() {
232
    return this.deliveryTime;
232
    return this.admin;
233
  }
233
  }
234
 
234
 
235
  public DashboardUser setDeliveryTime(long deliveryTime) {
235
  public DashboardUser setAdmin(boolean admin) {
236
    this.deliveryTime = deliveryTime;
236
    this.admin = admin;
237
    setDeliveryTimeIsSet(true);
237
    setAdminIsSet(true);
238
    return this;
238
    return this;
239
  }
239
  }
240
 
240
 
241
  public void unsetDeliveryTime() {
241
  public void unsetAdmin() {
242
    __isset_bit_vector.clear(__DELIVERYTIME_ISSET_ID);
242
    __isset_bit_vector.clear(__ADMIN_ISSET_ID);
243
  }
243
  }
244
 
244
 
245
  /** Returns true if field deliveryTime is set (has been asigned a value) and false otherwise */
245
  /** Returns true if field admin is set (has been asigned a value) and false otherwise */
246
  public boolean isSetDeliveryTime() {
246
  public boolean isSetAdmin() {
247
    return __isset_bit_vector.get(__DELIVERYTIME_ISSET_ID);
247
    return __isset_bit_vector.get(__ADMIN_ISSET_ID);
248
  }
248
  }
249
 
249
 
250
  public void setDeliveryTimeIsSet(boolean value) {
250
  public void setAdminIsSet(boolean value) {
251
    __isset_bit_vector.set(__DELIVERYTIME_ISSET_ID, value);
251
    __isset_bit_vector.set(__ADMIN_ISSET_ID, value);
252
  }
252
  }
253
 
253
 
254
  public void setFieldValue(_Fields field, Object value) {
254
  public void setFieldValue(_Fields field, Object value) {
255
    switch (field) {
255
    switch (field) {
256
    case USERNAME:
256
    case USERNAME:
Line 267... Line 267...
267
      } else {
267
      } else {
268
        setPassword((String)value);
268
        setPassword((String)value);
269
      }
269
      }
270
      break;
270
      break;
271
 
271
 
272
    case DISPATCH_TIME:
272
    case WAREHOUSE_ID:
273
      if (value == null) {
273
      if (value == null) {
274
        unsetDispatchTime();
274
        unsetWarehouseId();
275
      } else {
275
      } else {
276
        setDispatchTime((Long)value);
276
        setWarehouseId((Long)value);
277
      }
277
      }
278
      break;
278
      break;
279
 
279
 
280
    case DELIVERY_TIME:
280
    case ADMIN:
281
      if (value == null) {
281
      if (value == null) {
282
        unsetDeliveryTime();
282
        unsetAdmin();
283
      } else {
283
      } else {
284
        setDeliveryTime((Long)value);
284
        setAdmin((Boolean)value);
285
      }
285
      }
286
      break;
286
      break;
287
 
287
 
288
    }
288
    }
289
  }
289
  }
Line 298... Line 298...
298
      return getUsername();
298
      return getUsername();
299
 
299
 
300
    case PASSWORD:
300
    case PASSWORD:
301
      return getPassword();
301
      return getPassword();
302
 
302
 
303
    case DISPATCH_TIME:
303
    case WAREHOUSE_ID:
304
      return new Long(getDispatchTime());
304
      return new Long(getWarehouseId());
305
 
305
 
306
    case DELIVERY_TIME:
306
    case ADMIN:
307
      return new Long(getDeliveryTime());
307
      return new Boolean(isAdmin());
308
 
308
 
309
    }
309
    }
310
    throw new IllegalStateException();
310
    throw new IllegalStateException();
311
  }
311
  }
312
 
312
 
Line 319... Line 319...
319
    switch (field) {
319
    switch (field) {
320
    case USERNAME:
320
    case USERNAME:
321
      return isSetUsername();
321
      return isSetUsername();
322
    case PASSWORD:
322
    case PASSWORD:
323
      return isSetPassword();
323
      return isSetPassword();
324
    case DISPATCH_TIME:
324
    case WAREHOUSE_ID:
325
      return isSetDispatchTime();
325
      return isSetWarehouseId();
326
    case DELIVERY_TIME:
326
    case ADMIN:
327
      return isSetDeliveryTime();
327
      return isSetAdmin();
328
    }
328
    }
329
    throw new IllegalStateException();
329
    throw new IllegalStateException();
330
  }
330
  }
331
 
331
 
332
  public boolean isSet(int fieldID) {
332
  public boolean isSet(int fieldID) {
Line 362... Line 362...
362
        return false;
362
        return false;
363
      if (!this.password.equals(that.password))
363
      if (!this.password.equals(that.password))
364
        return false;
364
        return false;
365
    }
365
    }
366
 
366
 
367
    boolean this_present_dispatchTime = true;
367
    boolean this_present_warehouseId = true;
368
    boolean that_present_dispatchTime = true;
368
    boolean that_present_warehouseId = true;
369
    if (this_present_dispatchTime || that_present_dispatchTime) {
369
    if (this_present_warehouseId || that_present_warehouseId) {
370
      if (!(this_present_dispatchTime && that_present_dispatchTime))
370
      if (!(this_present_warehouseId && that_present_warehouseId))
371
        return false;
371
        return false;
372
      if (this.dispatchTime != that.dispatchTime)
372
      if (this.warehouseId != that.warehouseId)
373
        return false;
373
        return false;
374
    }
374
    }
375
 
375
 
376
    boolean this_present_deliveryTime = true;
376
    boolean this_present_admin = true;
377
    boolean that_present_deliveryTime = true;
377
    boolean that_present_admin = true;
378
    if (this_present_deliveryTime || that_present_deliveryTime) {
378
    if (this_present_admin || that_present_admin) {
379
      if (!(this_present_deliveryTime && that_present_deliveryTime))
379
      if (!(this_present_admin && that_present_admin))
380
        return false;
380
        return false;
381
      if (this.deliveryTime != that.deliveryTime)
381
      if (this.admin != that.admin)
382
        return false;
382
        return false;
383
    }
383
    }
384
 
384
 
385
    return true;
385
    return true;
386
  }
386
  }
Line 412... Line 412...
412
    }
412
    }
413
    lastComparison = TBaseHelper.compareTo(password, typedOther.password);
413
    lastComparison = TBaseHelper.compareTo(password, typedOther.password);
414
    if (lastComparison != 0) {
414
    if (lastComparison != 0) {
415
      return lastComparison;
415
      return lastComparison;
416
    }
416
    }
417
    lastComparison = Boolean.valueOf(isSetDispatchTime()).compareTo(isSetDispatchTime());
417
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
418
    if (lastComparison != 0) {
418
    if (lastComparison != 0) {
419
      return lastComparison;
419
      return lastComparison;
420
    }
420
    }
421
    lastComparison = TBaseHelper.compareTo(dispatchTime, typedOther.dispatchTime);
421
    lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
422
    if (lastComparison != 0) {
422
    if (lastComparison != 0) {
423
      return lastComparison;
423
      return lastComparison;
424
    }
424
    }
425
    lastComparison = Boolean.valueOf(isSetDeliveryTime()).compareTo(isSetDeliveryTime());
425
    lastComparison = Boolean.valueOf(isSetAdmin()).compareTo(isSetAdmin());
426
    if (lastComparison != 0) {
426
    if (lastComparison != 0) {
427
      return lastComparison;
427
      return lastComparison;
428
    }
428
    }
429
    lastComparison = TBaseHelper.compareTo(deliveryTime, typedOther.deliveryTime);
429
    lastComparison = TBaseHelper.compareTo(admin, typedOther.admin);
430
    if (lastComparison != 0) {
430
    if (lastComparison != 0) {
431
      return lastComparison;
431
      return lastComparison;
432
    }
432
    }
433
    return 0;
433
    return 0;
434
  }
434
  }
Line 459... Line 459...
459
              this.password = iprot.readString();
459
              this.password = iprot.readString();
460
            } else { 
460
            } else { 
461
              TProtocolUtil.skip(iprot, field.type);
461
              TProtocolUtil.skip(iprot, field.type);
462
            }
462
            }
463
            break;
463
            break;
464
          case DISPATCH_TIME:
464
          case WAREHOUSE_ID:
465
            if (field.type == TType.I64) {
465
            if (field.type == TType.I64) {
466
              this.dispatchTime = iprot.readI64();
466
              this.warehouseId = iprot.readI64();
467
              setDispatchTimeIsSet(true);
467
              setWarehouseIdIsSet(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_TIME:
472
          case ADMIN:
473
            if (field.type == TType.I64) {
473
            if (field.type == TType.BOOL) {
474
              this.deliveryTime = iprot.readI64();
474
              this.admin = iprot.readBool();
475
              setDeliveryTimeIsSet(true);
475
              setAdminIsSet(true);
476
            } else { 
476
            } else { 
477
              TProtocolUtil.skip(iprot, field.type);
477
              TProtocolUtil.skip(iprot, field.type);
478
            }
478
            }
479
            break;
479
            break;
480
        }
480
        }
Line 497... Line 497...
497
    if (this.password != null) {
497
    if (this.password != null) {
498
      oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
498
      oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
499
      oprot.writeString(this.password);
499
      oprot.writeString(this.password);
500
      oprot.writeFieldEnd();
500
      oprot.writeFieldEnd();
501
    }
501
    }
502
    oprot.writeFieldBegin(DISPATCH_TIME_FIELD_DESC);
502
    oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
503
    oprot.writeI64(this.dispatchTime);
503
    oprot.writeI64(this.warehouseId);
504
    oprot.writeFieldEnd();
504
    oprot.writeFieldEnd();
505
    oprot.writeFieldBegin(DELIVERY_TIME_FIELD_DESC);
505
    oprot.writeFieldBegin(ADMIN_FIELD_DESC);
506
    oprot.writeI64(this.deliveryTime);
506
    oprot.writeBool(this.admin);
507
    oprot.writeFieldEnd();
507
    oprot.writeFieldEnd();
508
    oprot.writeFieldStop();
508
    oprot.writeFieldStop();
509
    oprot.writeStructEnd();
509
    oprot.writeStructEnd();
510
  }
510
  }
511
 
511
 
Line 528... Line 528...
528
    } else {
528
    } else {
529
      sb.append(this.password);
529
      sb.append(this.password);
530
    }
530
    }
531
    first = false;
531
    first = false;
532
    if (!first) sb.append(", ");
532
    if (!first) sb.append(", ");
533
    sb.append("dispatchTime:");
533
    sb.append("warehouseId:");
534
    sb.append(this.dispatchTime);
534
    sb.append(this.warehouseId);
535
    first = false;
535
    first = false;
536
    if (!first) sb.append(", ");
536
    if (!first) sb.append(", ");
537
    sb.append("deliveryTime:");
537
    sb.append("admin:");
538
    sb.append(this.deliveryTime);
538
    sb.append(this.admin);
539
    first = false;
539
    first = false;
540
    sb.append(")");
540
    sb.append(")");
541
    return sb.toString();
541
    return sb.toString();
542
  }
542
  }
543
 
543