Subversion Repositories SmartDukaan

Rev

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

Rev 3430 Rev 3499
Line 41... Line 41...
41
  private static final org.apache.thrift.protocol.TField ACTIVE_CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("activeCartId", org.apache.thrift.protocol.TType.I64, (short)12);
41
  private static final org.apache.thrift.protocol.TField ACTIVE_CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("activeCartId", org.apache.thrift.protocol.TType.I64, (short)12);
42
  private static final org.apache.thrift.protocol.TField JSESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jsessionId", org.apache.thrift.protocol.TType.STRING, (short)13);
42
  private static final org.apache.thrift.protocol.TField JSESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jsessionId", org.apache.thrift.protocol.TType.STRING, (short)13);
43
  private static final org.apache.thrift.protocol.TField IS_ANONYMOUS_FIELD_DESC = new org.apache.thrift.protocol.TField("isAnonymous", org.apache.thrift.protocol.TType.BOOL, (short)14);
43
  private static final org.apache.thrift.protocol.TField IS_ANONYMOUS_FIELD_DESC = new org.apache.thrift.protocol.TField("isAnonymous", org.apache.thrift.protocol.TType.BOOL, (short)14);
44
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.STRING, (short)15);
44
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.STRING, (short)15);
45
  private static final org.apache.thrift.protocol.TField SOURCE_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceStartTime", org.apache.thrift.protocol.TType.I64, (short)16);
45
  private static final org.apache.thrift.protocol.TField SOURCE_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceStartTime", org.apache.thrift.protocol.TType.I64, (short)16);
-
 
46
  private static final org.apache.thrift.protocol.TField TRUST_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("trustLevel", org.apache.thrift.protocol.TType.DOUBLE, (short)17);
46
 
47
 
47
  private long userId; // required
48
  private long userId; // required
48
  private String email; // required
49
  private String email; // required
49
  private String password; // required
50
  private String password; // required
50
  private String name; // required
51
  private String name; // required
Line 58... Line 59...
58
  private long activeCartId; // required
59
  private long activeCartId; // required
59
  private String jsessionId; // required
60
  private String jsessionId; // required
60
  private boolean isAnonymous; // required
61
  private boolean isAnonymous; // required
61
  private String source; // required
62
  private String source; // required
62
  private long sourceStartTime; // required
63
  private long sourceStartTime; // required
-
 
64
  private double trustLevel; // required
63
 
65
 
64
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
66
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
65
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
67
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
66
    USER_ID((short)1, "userId"),
68
    USER_ID((short)1, "userId"),
67
    EMAIL((short)2, "email"),
69
    EMAIL((short)2, "email"),
Line 80... Line 82...
80
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
82
    COMMUNICATION_EMAIL((short)11, "communicationEmail"),
81
    ACTIVE_CART_ID((short)12, "activeCartId"),
83
    ACTIVE_CART_ID((short)12, "activeCartId"),
82
    JSESSION_ID((short)13, "jsessionId"),
84
    JSESSION_ID((short)13, "jsessionId"),
83
    IS_ANONYMOUS((short)14, "isAnonymous"),
85
    IS_ANONYMOUS((short)14, "isAnonymous"),
84
    SOURCE((short)15, "source"),
86
    SOURCE((short)15, "source"),
85
    SOURCE_START_TIME((short)16, "sourceStartTime");
87
    SOURCE_START_TIME((short)16, "sourceStartTime"),
-
 
88
    TRUST_LEVEL((short)17, "trustLevel");
86
 
89
 
87
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
90
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
88
 
91
 
89
    static {
92
    static {
90
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
93
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 127... Line 130...
127
          return IS_ANONYMOUS;
130
          return IS_ANONYMOUS;
128
        case 15: // SOURCE
131
        case 15: // SOURCE
129
          return SOURCE;
132
          return SOURCE;
130
        case 16: // SOURCE_START_TIME
133
        case 16: // SOURCE_START_TIME
131
          return SOURCE_START_TIME;
134
          return SOURCE_START_TIME;
-
 
135
        case 17: // TRUST_LEVEL
-
 
136
          return TRUST_LEVEL;
132
        default:
137
        default:
133
          return null;
138
          return null;
134
      }
139
      }
135
    }
140
    }
136
 
141
 
Line 172... Line 177...
172
  private static final int __USERID_ISSET_ID = 0;
177
  private static final int __USERID_ISSET_ID = 0;
173
  private static final int __DEFAULTADDRESSID_ISSET_ID = 1;
178
  private static final int __DEFAULTADDRESSID_ISSET_ID = 1;
174
  private static final int __ACTIVECARTID_ISSET_ID = 2;
179
  private static final int __ACTIVECARTID_ISSET_ID = 2;
175
  private static final int __ISANONYMOUS_ISSET_ID = 3;
180
  private static final int __ISANONYMOUS_ISSET_ID = 3;
176
  private static final int __SOURCESTARTTIME_ISSET_ID = 4;
181
  private static final int __SOURCESTARTTIME_ISSET_ID = 4;
-
 
182
  private static final int __TRUSTLEVEL_ISSET_ID = 5;
177
  private BitSet __isset_bit_vector = new BitSet(5);
183
  private BitSet __isset_bit_vector = new BitSet(6);
178
 
184
 
179
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
185
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
180
  static {
186
  static {
181
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
187
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
182
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
188
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 210... Line 216...
210
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
216
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
211
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
217
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
212
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
218
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
213
    tmpMap.put(_Fields.SOURCE_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("sourceStartTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
219
    tmpMap.put(_Fields.SOURCE_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("sourceStartTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
214
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
220
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
221
    tmpMap.put(_Fields.TRUST_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("trustLevel", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
222
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
215
    metaDataMap = Collections.unmodifiableMap(tmpMap);
223
    metaDataMap = Collections.unmodifiableMap(tmpMap);
216
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
224
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(User.class, metaDataMap);
217
  }
225
  }
218
 
226
 
219
  public User() {
227
  public User() {
Line 233... Line 241...
233
    String communicationEmail,
241
    String communicationEmail,
234
    long activeCartId,
242
    long activeCartId,
235
    String jsessionId,
243
    String jsessionId,
236
    boolean isAnonymous,
244
    boolean isAnonymous,
237
    String source,
245
    String source,
238
    long sourceStartTime)
246
    long sourceStartTime,
-
 
247
    double trustLevel)
239
  {
248
  {
240
    this();
249
    this();
241
    this.userId = userId;
250
    this.userId = userId;
242
    setUserIdIsSet(true);
251
    setUserIdIsSet(true);
243
    this.email = email;
252
    this.email = email;
Line 257... Line 266...
257
    this.isAnonymous = isAnonymous;
266
    this.isAnonymous = isAnonymous;
258
    setIsAnonymousIsSet(true);
267
    setIsAnonymousIsSet(true);
259
    this.source = source;
268
    this.source = source;
260
    this.sourceStartTime = sourceStartTime;
269
    this.sourceStartTime = sourceStartTime;
261
    setSourceStartTimeIsSet(true);
270
    setSourceStartTimeIsSet(true);
-
 
271
    this.trustLevel = trustLevel;
-
 
272
    setTrustLevelIsSet(true);
262
  }
273
  }
263
 
274
 
264
  /**
275
  /**
265
   * Performs a deep copy on <i>other</i>.
276
   * Performs a deep copy on <i>other</i>.
266
   */
277
   */
Line 307... Line 318...
307
    this.isAnonymous = other.isAnonymous;
318
    this.isAnonymous = other.isAnonymous;
308
    if (other.isSetSource()) {
319
    if (other.isSetSource()) {
309
      this.source = other.source;
320
      this.source = other.source;
310
    }
321
    }
311
    this.sourceStartTime = other.sourceStartTime;
322
    this.sourceStartTime = other.sourceStartTime;
-
 
323
    this.trustLevel = other.trustLevel;
312
  }
324
  }
313
 
325
 
314
  public User deepCopy() {
326
  public User deepCopy() {
315
    return new User(this);
327
    return new User(this);
316
  }
328
  }
Line 336... Line 348...
336
    setIsAnonymousIsSet(false);
348
    setIsAnonymousIsSet(false);
337
    this.isAnonymous = false;
349
    this.isAnonymous = false;
338
    this.source = null;
350
    this.source = null;
339
    setSourceStartTimeIsSet(false);
351
    setSourceStartTimeIsSet(false);
340
    this.sourceStartTime = 0;
352
    this.sourceStartTime = 0;
-
 
353
    setTrustLevelIsSet(false);
-
 
354
    this.trustLevel = 0.0;
341
  }
355
  }
342
 
356
 
343
  public long getUserId() {
357
  public long getUserId() {
344
    return this.userId;
358
    return this.userId;
345
  }
359
  }
Line 724... Line 738...
724
 
738
 
725
  public void setSourceStartTimeIsSet(boolean value) {
739
  public void setSourceStartTimeIsSet(boolean value) {
726
    __isset_bit_vector.set(__SOURCESTARTTIME_ISSET_ID, value);
740
    __isset_bit_vector.set(__SOURCESTARTTIME_ISSET_ID, value);
727
  }
741
  }
728
 
742
 
-
 
743
  public double getTrustLevel() {
-
 
744
    return this.trustLevel;
-
 
745
  }
-
 
746
 
-
 
747
  public void setTrustLevel(double trustLevel) {
-
 
748
    this.trustLevel = trustLevel;
-
 
749
    setTrustLevelIsSet(true);
-
 
750
  }
-
 
751
 
-
 
752
  public void unsetTrustLevel() {
-
 
753
    __isset_bit_vector.clear(__TRUSTLEVEL_ISSET_ID);
-
 
754
  }
-
 
755
 
-
 
756
  /** Returns true if field trustLevel is set (has been assigned a value) and false otherwise */
-
 
757
  public boolean isSetTrustLevel() {
-
 
758
    return __isset_bit_vector.get(__TRUSTLEVEL_ISSET_ID);
-
 
759
  }
-
 
760
 
-
 
761
  public void setTrustLevelIsSet(boolean value) {
-
 
762
    __isset_bit_vector.set(__TRUSTLEVEL_ISSET_ID, value);
-
 
763
  }
-
 
764
 
729
  public void setFieldValue(_Fields field, Object value) {
765
  public void setFieldValue(_Fields field, Object value) {
730
    switch (field) {
766
    switch (field) {
731
    case USER_ID:
767
    case USER_ID:
732
      if (value == null) {
768
      if (value == null) {
733
        unsetUserId();
769
        unsetUserId();
Line 854... Line 890...
854
      } else {
890
      } else {
855
        setSourceStartTime((Long)value);
891
        setSourceStartTime((Long)value);
856
      }
892
      }
857
      break;
893
      break;
858
 
894
 
-
 
895
    case TRUST_LEVEL:
-
 
896
      if (value == null) {
-
 
897
        unsetTrustLevel();
-
 
898
      } else {
-
 
899
        setTrustLevel((Double)value);
-
 
900
      }
-
 
901
      break;
-
 
902
 
859
    }
903
    }
860
  }
904
  }
861
 
905
 
862
  public Object getFieldValue(_Fields field) {
906
  public Object getFieldValue(_Fields field) {
863
    switch (field) {
907
    switch (field) {
Line 907... Line 951...
907
      return getSource();
951
      return getSource();
908
 
952
 
909
    case SOURCE_START_TIME:
953
    case SOURCE_START_TIME:
910
      return Long.valueOf(getSourceStartTime());
954
      return Long.valueOf(getSourceStartTime());
911
 
955
 
-
 
956
    case TRUST_LEVEL:
-
 
957
      return Double.valueOf(getTrustLevel());
-
 
958
 
912
    }
959
    }
913
    throw new IllegalStateException();
960
    throw new IllegalStateException();
914
  }
961
  }
915
 
962
 
916
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
963
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 950... Line 997...
950
      return isSetIsAnonymous();
997
      return isSetIsAnonymous();
951
    case SOURCE:
998
    case SOURCE:
952
      return isSetSource();
999
      return isSetSource();
953
    case SOURCE_START_TIME:
1000
    case SOURCE_START_TIME:
954
      return isSetSourceStartTime();
1001
      return isSetSourceStartTime();
-
 
1002
    case TRUST_LEVEL:
-
 
1003
      return isSetTrustLevel();
955
    }
1004
    }
956
    throw new IllegalStateException();
1005
    throw new IllegalStateException();
957
  }
1006
  }
958
 
1007
 
959
  @Override
1008
  @Override
Line 1111... Line 1160...
1111
        return false;
1160
        return false;
1112
      if (this.sourceStartTime != that.sourceStartTime)
1161
      if (this.sourceStartTime != that.sourceStartTime)
1113
        return false;
1162
        return false;
1114
    }
1163
    }
1115
 
1164
 
-
 
1165
    boolean this_present_trustLevel = true;
-
 
1166
    boolean that_present_trustLevel = true;
-
 
1167
    if (this_present_trustLevel || that_present_trustLevel) {
-
 
1168
      if (!(this_present_trustLevel && that_present_trustLevel))
-
 
1169
        return false;
-
 
1170
      if (this.trustLevel != that.trustLevel)
-
 
1171
        return false;
-
 
1172
    }
-
 
1173
 
1116
    return true;
1174
    return true;
1117
  }
1175
  }
1118
 
1176
 
1119
  @Override
1177
  @Override
1120
  public int hashCode() {
1178
  public int hashCode() {
Line 1287... Line 1345...
1287
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceStartTime, typedOther.sourceStartTime);
1345
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceStartTime, typedOther.sourceStartTime);
1288
      if (lastComparison != 0) {
1346
      if (lastComparison != 0) {
1289
        return lastComparison;
1347
        return lastComparison;
1290
      }
1348
      }
1291
    }
1349
    }
-
 
1350
    lastComparison = Boolean.valueOf(isSetTrustLevel()).compareTo(typedOther.isSetTrustLevel());
-
 
1351
    if (lastComparison != 0) {
-
 
1352
      return lastComparison;
-
 
1353
    }
-
 
1354
    if (isSetTrustLevel()) {
-
 
1355
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trustLevel, typedOther.trustLevel);
-
 
1356
      if (lastComparison != 0) {
-
 
1357
        return lastComparison;
-
 
1358
      }
-
 
1359
    }
1292
    return 0;
1360
    return 0;
1293
  }
1361
  }
1294
 
1362
 
1295
  public _Fields fieldForId(int fieldId) {
1363
  public _Fields fieldForId(int fieldId) {
1296
    return _Fields.findByThriftId(fieldId);
1364
    return _Fields.findByThriftId(fieldId);
Line 1433... Line 1501...
1433
            setSourceStartTimeIsSet(true);
1501
            setSourceStartTimeIsSet(true);
1434
          } else { 
1502
          } else { 
1435
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1503
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1436
          }
1504
          }
1437
          break;
1505
          break;
-
 
1506
        case 17: // TRUST_LEVEL
-
 
1507
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1508
            this.trustLevel = iprot.readDouble();
-
 
1509
            setTrustLevelIsSet(true);
-
 
1510
          } else { 
-
 
1511
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1512
          }
-
 
1513
          break;
1438
        default:
1514
        default:
1439
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1515
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1440
      }
1516
      }
1441
      iprot.readFieldEnd();
1517
      iprot.readFieldEnd();
1442
    }
1518
    }
Line 1523... Line 1599...
1523
      oprot.writeFieldEnd();
1599
      oprot.writeFieldEnd();
1524
    }
1600
    }
1525
    oprot.writeFieldBegin(SOURCE_START_TIME_FIELD_DESC);
1601
    oprot.writeFieldBegin(SOURCE_START_TIME_FIELD_DESC);
1526
    oprot.writeI64(this.sourceStartTime);
1602
    oprot.writeI64(this.sourceStartTime);
1527
    oprot.writeFieldEnd();
1603
    oprot.writeFieldEnd();
-
 
1604
    oprot.writeFieldBegin(TRUST_LEVEL_FIELD_DESC);
-
 
1605
    oprot.writeDouble(this.trustLevel);
-
 
1606
    oprot.writeFieldEnd();
1528
    oprot.writeFieldStop();
1607
    oprot.writeFieldStop();
1529
    oprot.writeStructEnd();
1608
    oprot.writeStructEnd();
1530
  }
1609
  }
1531
 
1610
 
1532
  @Override
1611
  @Override
Line 1639... Line 1718...
1639
    first = false;
1718
    first = false;
1640
    if (!first) sb.append(", ");
1719
    if (!first) sb.append(", ");
1641
    sb.append("sourceStartTime:");
1720
    sb.append("sourceStartTime:");
1642
    sb.append(this.sourceStartTime);
1721
    sb.append(this.sourceStartTime);
1643
    first = false;
1722
    first = false;
-
 
1723
    if (!first) sb.append(", ");
-
 
1724
    sb.append("trustLevel:");
-
 
1725
    sb.append(this.trustLevel);
-
 
1726
    first = false;
1644
    sb.append(")");
1727
    sb.append(")");
1645
    return sb.toString();
1728
    return sb.toString();
1646
  }
1729
  }
1647
 
1730
 
1648
  public void validate() throws org.apache.thrift.TException {
1731
  public void validate() throws org.apache.thrift.TException {