Subversion Repositories SmartDukaan

Rev

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

Rev 2020 Rev 2816
Line 43... Line 43...
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
  private static final TField SOURCE_FIELD_DESC = new TField("source", TType.STRING, (short)15);
-
 
48
  private static final TField SOURCE_START_TIME_FIELD_DESC = new TField("sourceStartTime", TType.I64, (short)16);
48
 
49
 
49
  private long userId;
50
  private long userId;
50
  private String email;
51
  private String email;
51
  private String password;
52
  private String password;
52
  private String name;
53
  private String name;
Line 59... Line 60...
59
  private String communicationEmail;
60
  private String communicationEmail;
60
  private long activeCartId;
61
  private long activeCartId;
61
  private String jsessionId;
62
  private String jsessionId;
62
  private boolean isAnonymous;
63
  private boolean isAnonymous;
63
  private String source;
64
  private String source;
-
 
65
  private long sourceStartTime;
64
 
66
 
65
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
67
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
66
  public enum _Fields implements TFieldIdEnum {
68
  public enum _Fields implements TFieldIdEnum {
67
    USER_ID((short)1, "userId"),
69
    USER_ID((short)1, "userId"),
68
    EMAIL((short)2, "email"),
70
    EMAIL((short)2, "email"),
Line 80... Line 82...
80
    DEFAULT_ADDRESS_ID((short)10, "defaultAddressId"),
82
    DEFAULT_ADDRESS_ID((short)10, "defaultAddressId"),
81
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
83
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
82
    ACTIVE_CART_ID((short)12, "activeCartId"),
84
    ACTIVE_CART_ID((short)12, "activeCartId"),
83
    JSESSION_ID((short)13, "jsessionId"),
85
    JSESSION_ID((short)13, "jsessionId"),
84
    IS_ANONYMOUS((short)14, "isAnonymous"),
86
    IS_ANONYMOUS((short)14, "isAnonymous"),
85
    SOURCE((short)15, "source");
87
    SOURCE((short)15, "source"),
-
 
88
    SOURCE_START_TIME((short)16, "sourceStartTime");
86
 
89
 
87
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
90
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
88
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
91
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
89
 
92
 
90
    static {
93
    static {
Line 138... Line 141...
138
  // isset id assignments
141
  // isset id assignments
139
  private static final int __USERID_ISSET_ID = 0;
142
  private static final int __USERID_ISSET_ID = 0;
140
  private static final int __DEFAULTADDRESSID_ISSET_ID = 1;
143
  private static final int __DEFAULTADDRESSID_ISSET_ID = 1;
141
  private static final int __ACTIVECARTID_ISSET_ID = 2;
144
  private static final int __ACTIVECARTID_ISSET_ID = 2;
142
  private static final int __ISANONYMOUS_ISSET_ID = 3;
145
  private static final int __ISANONYMOUS_ISSET_ID = 3;
-
 
146
  private static final int __SOURCESTARTTIME_ISSET_ID = 4;
143
  private BitSet __isset_bit_vector = new BitSet(4);
147
  private BitSet __isset_bit_vector = new BitSet(5);
144
 
148
 
145
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
149
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
146
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
150
    put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
147
        new FieldValueMetaData(TType.I64)));
151
        new FieldValueMetaData(TType.I64)));
148
    put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
152
    put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
Line 172... Line 176...
172
        new FieldValueMetaData(TType.STRING)));
176
        new FieldValueMetaData(TType.STRING)));
173
    put(_Fields.IS_ANONYMOUS, new FieldMetaData("isAnonymous", TFieldRequirementType.DEFAULT, 
177
    put(_Fields.IS_ANONYMOUS, new FieldMetaData("isAnonymous", TFieldRequirementType.DEFAULT, 
174
        new FieldValueMetaData(TType.BOOL)));
178
        new FieldValueMetaData(TType.BOOL)));
175
    put(_Fields.SOURCE, new FieldMetaData("source", TFieldRequirementType.DEFAULT, 
179
    put(_Fields.SOURCE, new FieldMetaData("source", TFieldRequirementType.DEFAULT, 
176
        new FieldValueMetaData(TType.STRING)));
180
        new FieldValueMetaData(TType.STRING)));
-
 
181
    put(_Fields.SOURCE_START_TIME, new FieldMetaData("sourceStartTime", TFieldRequirementType.DEFAULT, 
-
 
182
        new FieldValueMetaData(TType.I64)));
177
  }});
183
  }});
178
 
184
 
179
  static {
185
  static {
180
    FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
186
    FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
181
  }
187
  }
Line 196... Line 202...
196
    long defaultAddressId,
202
    long defaultAddressId,
197
    String communicationEmail,
203
    String communicationEmail,
198
    long activeCartId,
204
    long activeCartId,
199
    String jsessionId,
205
    String jsessionId,
200
    boolean isAnonymous,
206
    boolean isAnonymous,
201
    String source)
207
    String source,
-
 
208
    long sourceStartTime)
202
  {
209
  {
203
    this();
210
    this();
204
    this.userId = userId;
211
    this.userId = userId;
205
    setUserIdIsSet(true);
212
    setUserIdIsSet(true);
206
    this.email = email;
213
    this.email = email;
Line 218... Line 225...
218
    setActiveCartIdIsSet(true);
225
    setActiveCartIdIsSet(true);
219
    this.jsessionId = jsessionId;
226
    this.jsessionId = jsessionId;
220
    this.isAnonymous = isAnonymous;
227
    this.isAnonymous = isAnonymous;
221
    setIsAnonymousIsSet(true);
228
    setIsAnonymousIsSet(true);
222
    this.source = source;
229
    this.source = source;
-
 
230
    this.sourceStartTime = sourceStartTime;
-
 
231
    setSourceStartTimeIsSet(true);
223
  }
232
  }
224
 
233
 
225
  /**
234
  /**
226
   * Performs a deep copy on <i>other</i>.
235
   * Performs a deep copy on <i>other</i>.
227
   */
236
   */
Line 267... Line 276...
267
    }
276
    }
268
    this.isAnonymous = other.isAnonymous;
277
    this.isAnonymous = other.isAnonymous;
269
    if (other.isSetSource()) {
278
    if (other.isSetSource()) {
270
      this.source = other.source;
279
      this.source = other.source;
271
    }
280
    }
-
 
281
    this.sourceStartTime = other.sourceStartTime;
272
  }
282
  }
273
 
283
 
274
  public User deepCopy() {
284
  public User deepCopy() {
275
    return new User(this);
285
    return new User(this);
276
  }
286
  }
Line 657... Line 667...
657
    if (!value) {
667
    if (!value) {
658
      this.source = null;
668
      this.source = null;
659
    }
669
    }
660
  }
670
  }
661
 
671
 
-
 
672
  public long getSourceStartTime() {
-
 
673
    return this.sourceStartTime;
-
 
674
  }
-
 
675
 
-
 
676
  public User setSourceStartTime(long sourceStartTime) {
-
 
677
    this.sourceStartTime = sourceStartTime;
-
 
678
    setSourceStartTimeIsSet(true);
-
 
679
    return this;
-
 
680
  }
-
 
681
 
-
 
682
  public void unsetSourceStartTime() {
-
 
683
    __isset_bit_vector.clear(__SOURCESTARTTIME_ISSET_ID);
-
 
684
  }
-
 
685
 
-
 
686
  /** Returns true if field sourceStartTime is set (has been asigned a value) and false otherwise */
-
 
687
  public boolean isSetSourceStartTime() {
-
 
688
    return __isset_bit_vector.get(__SOURCESTARTTIME_ISSET_ID);
-
 
689
  }
-
 
690
 
-
 
691
  public void setSourceStartTimeIsSet(boolean value) {
-
 
692
    __isset_bit_vector.set(__SOURCESTARTTIME_ISSET_ID, value);
-
 
693
  }
-
 
694
 
662
  public void setFieldValue(_Fields field, Object value) {
695
  public void setFieldValue(_Fields field, Object value) {
663
    switch (field) {
696
    switch (field) {
664
    case USER_ID:
697
    case USER_ID:
665
      if (value == null) {
698
      if (value == null) {
666
        unsetUserId();
699
        unsetUserId();
Line 779... Line 812...
779
      } else {
812
      } else {
780
        setSource((String)value);
813
        setSource((String)value);
781
      }
814
      }
782
      break;
815
      break;
783
 
816
 
-
 
817
    case SOURCE_START_TIME:
-
 
818
      if (value == null) {
-
 
819
        unsetSourceStartTime();
-
 
820
      } else {
-
 
821
        setSourceStartTime((Long)value);
-
 
822
      }
-
 
823
      break;
-
 
824
 
784
    }
825
    }
785
  }
826
  }
786
 
827
 
787
  public void setFieldValue(int fieldID, Object value) {
828
  public void setFieldValue(int fieldID, Object value) {
788
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
829
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 833... Line 874...
833
      return new Boolean(isIsAnonymous());
874
      return new Boolean(isIsAnonymous());
834
 
875
 
835
    case SOURCE:
876
    case SOURCE:
836
      return getSource();
877
      return getSource();
837
 
878
 
-
 
879
    case SOURCE_START_TIME:
-
 
880
      return new Long(getSourceStartTime());
-
 
881
 
838
    }
882
    }
839
    throw new IllegalStateException();
883
    throw new IllegalStateException();
840
  }
884
  }
841
 
885
 
842
  public Object getFieldValue(int fieldId) {
886
  public Object getFieldValue(int fieldId) {
Line 874... Line 918...
874
      return isSetJsessionId();
918
      return isSetJsessionId();
875
    case IS_ANONYMOUS:
919
    case IS_ANONYMOUS:
876
      return isSetIsAnonymous();
920
      return isSetIsAnonymous();
877
    case SOURCE:
921
    case SOURCE:
878
      return isSetSource();
922
      return isSetSource();
-
 
923
    case SOURCE_START_TIME:
-
 
924
      return isSetSourceStartTime();
879
    }
925
    }
880
    throw new IllegalStateException();
926
    throw new IllegalStateException();
881
  }
927
  }
882
 
928
 
883
  public boolean isSet(int fieldID) {
929
  public boolean isSet(int fieldID) {
Line 1030... Line 1076...
1030
        return false;
1076
        return false;
1031
      if (!this.source.equals(that.source))
1077
      if (!this.source.equals(that.source))
1032
        return false;
1078
        return false;
1033
    }
1079
    }
1034
 
1080
 
-
 
1081
    boolean this_present_sourceStartTime = true;
-
 
1082
    boolean that_present_sourceStartTime = true;
-
 
1083
    if (this_present_sourceStartTime || that_present_sourceStartTime) {
-
 
1084
      if (!(this_present_sourceStartTime && that_present_sourceStartTime))
-
 
1085
        return false;
-
 
1086
      if (this.sourceStartTime != that.sourceStartTime)
-
 
1087
        return false;
-
 
1088
    }
-
 
1089
 
1035
    return true;
1090
    return true;
1036
  }
1091
  }
1037
 
1092
 
1038
  @Override
1093
  @Override
1039
  public int hashCode() {
1094
  public int hashCode() {
Line 1166... Line 1221...
1166
    }
1221
    }
1167
    lastComparison = TBaseHelper.compareTo(source, typedOther.source);
1222
    lastComparison = TBaseHelper.compareTo(source, typedOther.source);
1168
    if (lastComparison != 0) {
1223
    if (lastComparison != 0) {
1169
      return lastComparison;
1224
      return lastComparison;
1170
    }
1225
    }
-
 
1226
    lastComparison = Boolean.valueOf(isSetSourceStartTime()).compareTo(isSetSourceStartTime());
-
 
1227
    if (lastComparison != 0) {
-
 
1228
      return lastComparison;
-
 
1229
    }
-
 
1230
    lastComparison = TBaseHelper.compareTo(sourceStartTime, typedOther.sourceStartTime);
-
 
1231
    if (lastComparison != 0) {
-
 
1232
      return lastComparison;
-
 
1233
    }
1171
    return 0;
1234
    return 0;
1172
  }
1235
  }
1173
 
1236
 
1174
  public void read(TProtocol iprot) throws TException {
1237
  public void read(TProtocol iprot) throws TException {
1175
    TField field;
1238
    TField field;
Line 1304... Line 1367...
1304
              this.source = iprot.readString();
1367
              this.source = iprot.readString();
1305
            } else { 
1368
            } else { 
1306
              TProtocolUtil.skip(iprot, field.type);
1369
              TProtocolUtil.skip(iprot, field.type);
1307
            }
1370
            }
1308
            break;
1371
            break;
-
 
1372
          case SOURCE_START_TIME:
-
 
1373
            if (field.type == TType.I64) {
-
 
1374
              this.sourceStartTime = iprot.readI64();
-
 
1375
              setSourceStartTimeIsSet(true);
-
 
1376
            } else { 
-
 
1377
              TProtocolUtil.skip(iprot, field.type);
-
 
1378
            }
-
 
1379
            break;
1309
        }
1380
        }
1310
        iprot.readFieldEnd();
1381
        iprot.readFieldEnd();
1311
      }
1382
      }
1312
    }
1383
    }
1313
    iprot.readStructEnd();
1384
    iprot.readStructEnd();
Line 1390... Line 1461...
1390
    if (this.source != null) {
1461
    if (this.source != null) {
1391
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
1462
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
1392
      oprot.writeString(this.source);
1463
      oprot.writeString(this.source);
1393
      oprot.writeFieldEnd();
1464
      oprot.writeFieldEnd();
1394
    }
1465
    }
-
 
1466
    oprot.writeFieldBegin(SOURCE_START_TIME_FIELD_DESC);
-
 
1467
    oprot.writeI64(this.sourceStartTime);
-
 
1468
    oprot.writeFieldEnd();
1395
    oprot.writeFieldStop();
1469
    oprot.writeFieldStop();
1396
    oprot.writeStructEnd();
1470
    oprot.writeStructEnd();
1397
  }
1471
  }
1398
 
1472
 
1399
  @Override
1473
  @Override
Line 1510... Line 1584...
1510
      sb.append("null");
1584
      sb.append("null");
1511
    } else {
1585
    } else {
1512
      sb.append(this.source);
1586
      sb.append(this.source);
1513
    }
1587
    }
1514
    first = false;
1588
    first = false;
-
 
1589
    if (!first) sb.append(", ");
-
 
1590
    sb.append("sourceStartTime:");
-
 
1591
    sb.append(this.sourceStartTime);
-
 
1592
    first = false;
1515
    sb.append(")");
1593
    sb.append(")");
1516
    return sb.toString();
1594
    return sb.toString();
1517
  }
1595
  }
1518
 
1596
 
1519
  public void validate() throws TException {
1597
  public void validate() throws TException {