Subversion Repositories SmartDukaan

Rev

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

Rev 1013 Rev 2020
Line 42... Line 42...
42
  private static final TField DEFAULT_ADDRESS_ID_FIELD_DESC = new TField("defaultAddressId", TType.I64, (short)10);
42
  private static final TField DEFAULT_ADDRESS_ID_FIELD_DESC = new TField("defaultAddressId", TType.I64, (short)10);
43
  private static final TField COMMUNICATION_EMAIL_FIELD_DESC = new TField("communicationEmail", TType.STRING, (short)11);
43
  private static final TField COMMUNICATION_EMAIL_FIELD_DESC = new TField("communicationEmail", TType.STRING, (short)11);
44
  private static final TField ACTIVE_CART_ID_FIELD_DESC = new TField("activeCartId", TType.I64, (short)12);
44
  private static final TField ACTIVE_CART_ID_FIELD_DESC = new TField("activeCartId", TType.I64, (short)12);
45
  private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)13);
45
  private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)13);
46
  private static final TField IS_ANONYMOUS_FIELD_DESC = new TField("isAnonymous", TType.BOOL, (short)14);
46
  private static final TField IS_ANONYMOUS_FIELD_DESC = new TField("isAnonymous", TType.BOOL, (short)14);
-
 
47
  private static final TField SOURCE_FIELD_DESC = new TField("source", TType.STRING, (short)15);
47
 
48
 
48
  private long userId;
49
  private long userId;
49
  private String email;
50
  private String email;
50
  private String password;
51
  private String password;
51
  private String name;
52
  private String name;
Line 57... Line 58...
57
  private long defaultAddressId;
58
  private long defaultAddressId;
58
  private String communicationEmail;
59
  private String communicationEmail;
59
  private long activeCartId;
60
  private long activeCartId;
60
  private String jsessionId;
61
  private String jsessionId;
61
  private boolean isAnonymous;
62
  private boolean isAnonymous;
-
 
63
  private String source;
62
 
64
 
63
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
65
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
64
  public enum _Fields implements TFieldIdEnum {
66
  public enum _Fields implements TFieldIdEnum {
65
    USER_ID((short)1, "userId"),
67
    USER_ID((short)1, "userId"),
66
    EMAIL((short)2, "email"),
68
    EMAIL((short)2, "email"),
Line 77... Line 79...
77
    ADDRESSES((short)9, "addresses"),
79
    ADDRESSES((short)9, "addresses"),
78
    DEFAULT_ADDRESS_ID((short)10, "defaultAddressId"),
80
    DEFAULT_ADDRESS_ID((short)10, "defaultAddressId"),
79
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
81
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
80
    ACTIVE_CART_ID((short)12, "activeCartId"),
82
    ACTIVE_CART_ID((short)12, "activeCartId"),
81
    JSESSION_ID((short)13, "jsessionId"),
83
    JSESSION_ID((short)13, "jsessionId"),
82
    IS_ANONYMOUS((short)14, "isAnonymous");
84
    IS_ANONYMOUS((short)14, "isAnonymous"),
-
 
85
    SOURCE((short)15, "source");
83
 
86
 
84
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
87
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
85
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
88
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
86
 
89
 
87
    static {
90
    static {
Line 167... Line 170...
167
        new FieldValueMetaData(TType.I64)));
170
        new FieldValueMetaData(TType.I64)));
168
    put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
171
    put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
169
        new FieldValueMetaData(TType.STRING)));
172
        new FieldValueMetaData(TType.STRING)));
170
    put(_Fields.IS_ANONYMOUS, new FieldMetaData("isAnonymous", TFieldRequirementType.DEFAULT, 
173
    put(_Fields.IS_ANONYMOUS, new FieldMetaData("isAnonymous", TFieldRequirementType.DEFAULT, 
171
        new FieldValueMetaData(TType.BOOL)));
174
        new FieldValueMetaData(TType.BOOL)));
-
 
175
    put(_Fields.SOURCE, new FieldMetaData("source", TFieldRequirementType.DEFAULT, 
-
 
176
        new FieldValueMetaData(TType.STRING)));
172
  }});
177
  }});
173
 
178
 
174
  static {
179
  static {
175
    FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
180
    FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
176
  }
181
  }
Line 190... Line 195...
190
    List<Address> addresses,
195
    List<Address> addresses,
191
    long defaultAddressId,
196
    long defaultAddressId,
192
    String communicationEmail,
197
    String communicationEmail,
193
    long activeCartId,
198
    long activeCartId,
194
    String jsessionId,
199
    String jsessionId,
195
    boolean isAnonymous)
200
    boolean isAnonymous,
-
 
201
    String source)
196
  {
202
  {
197
    this();
203
    this();
198
    this.userId = userId;
204
    this.userId = userId;
199
    setUserIdIsSet(true);
205
    setUserIdIsSet(true);
200
    this.email = email;
206
    this.email = email;
Line 211... Line 217...
211
    this.activeCartId = activeCartId;
217
    this.activeCartId = activeCartId;
212
    setActiveCartIdIsSet(true);
218
    setActiveCartIdIsSet(true);
213
    this.jsessionId = jsessionId;
219
    this.jsessionId = jsessionId;
214
    this.isAnonymous = isAnonymous;
220
    this.isAnonymous = isAnonymous;
215
    setIsAnonymousIsSet(true);
221
    setIsAnonymousIsSet(true);
-
 
222
    this.source = source;
216
  }
223
  }
217
 
224
 
218
  /**
225
  /**
219
   * Performs a deep copy on <i>other</i>.
226
   * Performs a deep copy on <i>other</i>.
220
   */
227
   */
Line 257... Line 264...
257
    this.activeCartId = other.activeCartId;
264
    this.activeCartId = other.activeCartId;
258
    if (other.isSetJsessionId()) {
265
    if (other.isSetJsessionId()) {
259
      this.jsessionId = other.jsessionId;
266
      this.jsessionId = other.jsessionId;
260
    }
267
    }
261
    this.isAnonymous = other.isAnonymous;
268
    this.isAnonymous = other.isAnonymous;
-
 
269
    if (other.isSetSource()) {
-
 
270
      this.source = other.source;
-
 
271
    }
262
  }
272
  }
263
 
273
 
264
  public User deepCopy() {
274
  public User deepCopy() {
265
    return new User(this);
275
    return new User(this);
266
  }
276
  }
Line 623... Line 633...
623
 
633
 
624
  public void setIsAnonymousIsSet(boolean value) {
634
  public void setIsAnonymousIsSet(boolean value) {
625
    __isset_bit_vector.set(__ISANONYMOUS_ISSET_ID, value);
635
    __isset_bit_vector.set(__ISANONYMOUS_ISSET_ID, value);
626
  }
636
  }
627
 
637
 
-
 
638
  public String getSource() {
-
 
639
    return this.source;
-
 
640
  }
-
 
641
 
-
 
642
  public User setSource(String source) {
-
 
643
    this.source = source;
-
 
644
    return this;
-
 
645
  }
-
 
646
 
-
 
647
  public void unsetSource() {
-
 
648
    this.source = null;
-
 
649
  }
-
 
650
 
-
 
651
  /** Returns true if field source is set (has been asigned a value) and false otherwise */
-
 
652
  public boolean isSetSource() {
-
 
653
    return this.source != null;
-
 
654
  }
-
 
655
 
-
 
656
  public void setSourceIsSet(boolean value) {
-
 
657
    if (!value) {
-
 
658
      this.source = null;
-
 
659
    }
-
 
660
  }
-
 
661
 
628
  public void setFieldValue(_Fields field, Object value) {
662
  public void setFieldValue(_Fields field, Object value) {
629
    switch (field) {
663
    switch (field) {
630
    case USER_ID:
664
    case USER_ID:
631
      if (value == null) {
665
      if (value == null) {
632
        unsetUserId();
666
        unsetUserId();
Line 737... Line 771...
737
      } else {
771
      } else {
738
        setIsAnonymous((Boolean)value);
772
        setIsAnonymous((Boolean)value);
739
      }
773
      }
740
      break;
774
      break;
741
 
775
 
-
 
776
    case SOURCE:
-
 
777
      if (value == null) {
-
 
778
        unsetSource();
-
 
779
      } else {
-
 
780
        setSource((String)value);
-
 
781
      }
-
 
782
      break;
-
 
783
 
742
    }
784
    }
743
  }
785
  }
744
 
786
 
745
  public void setFieldValue(int fieldID, Object value) {
787
  public void setFieldValue(int fieldID, Object value) {
746
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
788
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 788... Line 830...
788
      return getJsessionId();
830
      return getJsessionId();
789
 
831
 
790
    case IS_ANONYMOUS:
832
    case IS_ANONYMOUS:
791
      return new Boolean(isIsAnonymous());
833
      return new Boolean(isIsAnonymous());
792
 
834
 
-
 
835
    case SOURCE:
-
 
836
      return getSource();
-
 
837
 
793
    }
838
    }
794
    throw new IllegalStateException();
839
    throw new IllegalStateException();
795
  }
840
  }
796
 
841
 
797
  public Object getFieldValue(int fieldId) {
842
  public Object getFieldValue(int fieldId) {
Line 827... Line 872...
827
      return isSetActiveCartId();
872
      return isSetActiveCartId();
828
    case JSESSION_ID:
873
    case JSESSION_ID:
829
      return isSetJsessionId();
874
      return isSetJsessionId();
830
    case IS_ANONYMOUS:
875
    case IS_ANONYMOUS:
831
      return isSetIsAnonymous();
876
      return isSetIsAnonymous();
-
 
877
    case SOURCE:
-
 
878
      return isSetSource();
832
    }
879
    }
833
    throw new IllegalStateException();
880
    throw new IllegalStateException();
834
  }
881
  }
835
 
882
 
836
  public boolean isSet(int fieldID) {
883
  public boolean isSet(int fieldID) {
Line 974... Line 1021...
974
        return false;
1021
        return false;
975
      if (this.isAnonymous != that.isAnonymous)
1022
      if (this.isAnonymous != that.isAnonymous)
976
        return false;
1023
        return false;
977
    }
1024
    }
978
 
1025
 
-
 
1026
    boolean this_present_source = true && this.isSetSource();
-
 
1027
    boolean that_present_source = true && that.isSetSource();
-
 
1028
    if (this_present_source || that_present_source) {
-
 
1029
      if (!(this_present_source && that_present_source))
-
 
1030
        return false;
-
 
1031
      if (!this.source.equals(that.source))
-
 
1032
        return false;
-
 
1033
    }
-
 
1034
 
979
    return true;
1035
    return true;
980
  }
1036
  }
981
 
1037
 
982
  @Override
1038
  @Override
983
  public int hashCode() {
1039
  public int hashCode() {
Line 1102... Line 1158...
1102
    }
1158
    }
1103
    lastComparison = TBaseHelper.compareTo(isAnonymous, typedOther.isAnonymous);
1159
    lastComparison = TBaseHelper.compareTo(isAnonymous, typedOther.isAnonymous);
1104
    if (lastComparison != 0) {
1160
    if (lastComparison != 0) {
1105
      return lastComparison;
1161
      return lastComparison;
1106
    }
1162
    }
-
 
1163
    lastComparison = Boolean.valueOf(isSetSource()).compareTo(isSetSource());
-
 
1164
    if (lastComparison != 0) {
-
 
1165
      return lastComparison;
-
 
1166
    }
-
 
1167
    lastComparison = TBaseHelper.compareTo(source, typedOther.source);
-
 
1168
    if (lastComparison != 0) {
-
 
1169
      return lastComparison;
-
 
1170
    }
1107
    return 0;
1171
    return 0;
1108
  }
1172
  }
1109
 
1173
 
1110
  public void read(TProtocol iprot) throws TException {
1174
  public void read(TProtocol iprot) throws TException {
1111
    TField field;
1175
    TField field;
Line 1233... Line 1297...
1233
              setIsAnonymousIsSet(true);
1297
              setIsAnonymousIsSet(true);
1234
            } else { 
1298
            } else { 
1235
              TProtocolUtil.skip(iprot, field.type);
1299
              TProtocolUtil.skip(iprot, field.type);
1236
            }
1300
            }
1237
            break;
1301
            break;
-
 
1302
          case SOURCE:
-
 
1303
            if (field.type == TType.STRING) {
-
 
1304
              this.source = iprot.readString();
-
 
1305
            } else { 
-
 
1306
              TProtocolUtil.skip(iprot, field.type);
-
 
1307
            }
-
 
1308
            break;
1238
        }
1309
        }
1239
        iprot.readFieldEnd();
1310
        iprot.readFieldEnd();
1240
      }
1311
      }
1241
    }
1312
    }
1242
    iprot.readStructEnd();
1313
    iprot.readStructEnd();
Line 1314... Line 1385...
1314
      oprot.writeFieldEnd();
1385
      oprot.writeFieldEnd();
1315
    }
1386
    }
1316
    oprot.writeFieldBegin(IS_ANONYMOUS_FIELD_DESC);
1387
    oprot.writeFieldBegin(IS_ANONYMOUS_FIELD_DESC);
1317
    oprot.writeBool(this.isAnonymous);
1388
    oprot.writeBool(this.isAnonymous);
1318
    oprot.writeFieldEnd();
1389
    oprot.writeFieldEnd();
-
 
1390
    if (this.source != null) {
-
 
1391
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
-
 
1392
      oprot.writeString(this.source);
-
 
1393
      oprot.writeFieldEnd();
-
 
1394
    }
1319
    oprot.writeFieldStop();
1395
    oprot.writeFieldStop();
1320
    oprot.writeStructEnd();
1396
    oprot.writeStructEnd();
1321
  }
1397
  }
1322
 
1398
 
1323
  @Override
1399
  @Override
Line 1426... Line 1502...
1426
    first = false;
1502
    first = false;
1427
    if (!first) sb.append(", ");
1503
    if (!first) sb.append(", ");
1428
    sb.append("isAnonymous:");
1504
    sb.append("isAnonymous:");
1429
    sb.append(this.isAnonymous);
1505
    sb.append(this.isAnonymous);
1430
    first = false;
1506
    first = false;
-
 
1507
    if (!first) sb.append(", ");
-
 
1508
    sb.append("source:");
-
 
1509
    if (this.source == null) {
-
 
1510
      sb.append("null");
-
 
1511
    } else {
-
 
1512
      sb.append(this.source);
-
 
1513
    }
-
 
1514
    first = false;
1431
    sb.append(")");
1515
    sb.append(")");
1432
    return sb.toString();
1516
    return sb.toString();
1433
  }
1517
  }
1434
 
1518
 
1435
  public void validate() throws TException {
1519
  public void validate() throws TException {