Subversion Repositories SmartDukaan

Rev

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

Rev 7096 Rev 7169
Line 33... Line 33...
33
  private static final org.apache.thrift.protocol.TField CREDIT_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("creditLimit", org.apache.thrift.protocol.TType.I64, (short)8);
33
  private static final org.apache.thrift.protocol.TField CREDIT_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("creditLimit", org.apache.thrift.protocol.TType.I64, (short)8);
34
  private static final org.apache.thrift.protocol.TField SALT_FIELD_DESC = new org.apache.thrift.protocol.TField("salt", org.apache.thrift.protocol.TType.STRING, (short)9);
34
  private static final org.apache.thrift.protocol.TField SALT_FIELD_DESC = new org.apache.thrift.protocol.TField("salt", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)10);
35
  private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)10);
36
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)11);
36
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)11);
37
  private static final org.apache.thrift.protocol.TField CIRCLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("circleId", org.apache.thrift.protocol.TType.I64, (short)12);
37
  private static final org.apache.thrift.protocol.TField CIRCLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("circleId", org.apache.thrift.protocol.TType.I64, (short)12);
-
 
38
  private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)13);
38
 
39
 
39
  private long id; // required
40
  private long id; // required
40
  private String hotspotId; // required
41
  private String hotspotId; // required
41
  private long companyId; // required
42
  private long companyId; // required
42
  private String name; // required
43
  private String name; // required
Line 46... Line 47...
46
  private long creditLimit; // required
47
  private long creditLimit; // required
47
  private String salt; // required
48
  private String salt; // required
48
  private String password; // required
49
  private String password; // required
49
  private boolean isActive; // required
50
  private boolean isActive; // required
50
  private long circleId; // required
51
  private long circleId; // required
-
 
52
  private String email; // required
51
 
53
 
52
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
54
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
53
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
55
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
54
    ID((short)1, "id"),
56
    ID((short)1, "id"),
55
    HOTSPOT_ID((short)2, "hotspotId"),
57
    HOTSPOT_ID((short)2, "hotspotId"),
Line 60... Line 62...
60
    AVAILABLE_LIMIT((short)7, "availableLimit"),
62
    AVAILABLE_LIMIT((short)7, "availableLimit"),
61
    CREDIT_LIMIT((short)8, "creditLimit"),
63
    CREDIT_LIMIT((short)8, "creditLimit"),
62
    SALT((short)9, "salt"),
64
    SALT((short)9, "salt"),
63
    PASSWORD((short)10, "password"),
65
    PASSWORD((short)10, "password"),
64
    IS_ACTIVE((short)11, "isActive"),
66
    IS_ACTIVE((short)11, "isActive"),
65
    CIRCLE_ID((short)12, "circleId");
67
    CIRCLE_ID((short)12, "circleId"),
-
 
68
    EMAIL((short)13, "email");
66
 
69
 
67
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
70
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
68
 
71
 
69
    static {
72
    static {
70
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
73
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 99... Line 102...
99
          return PASSWORD;
102
          return PASSWORD;
100
        case 11: // IS_ACTIVE
103
        case 11: // IS_ACTIVE
101
          return IS_ACTIVE;
104
          return IS_ACTIVE;
102
        case 12: // CIRCLE_ID
105
        case 12: // CIRCLE_ID
103
          return CIRCLE_ID;
106
          return CIRCLE_ID;
-
 
107
        case 13: // EMAIL
-
 
108
          return EMAIL;
104
        default:
109
        default:
105
          return null;
110
          return null;
106
      }
111
      }
107
    }
112
    }
108
 
113
 
Line 175... Line 180...
175
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
180
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
176
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
181
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
177
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
182
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
178
    tmpMap.put(_Fields.CIRCLE_ID, new org.apache.thrift.meta_data.FieldMetaData("circleId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
    tmpMap.put(_Fields.CIRCLE_ID, new org.apache.thrift.meta_data.FieldMetaData("circleId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
179
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
184
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
185
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
186
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
180
    metaDataMap = Collections.unmodifiableMap(tmpMap);
187
    metaDataMap = Collections.unmodifiableMap(tmpMap);
181
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HotspotStore.class, metaDataMap);
188
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HotspotStore.class, metaDataMap);
182
  }
189
  }
183
 
190
 
184
  public HotspotStore() {
191
  public HotspotStore() {
Line 194... Line 201...
194
    long availableLimit,
201
    long availableLimit,
195
    long creditLimit,
202
    long creditLimit,
196
    String salt,
203
    String salt,
197
    String password,
204
    String password,
198
    boolean isActive,
205
    boolean isActive,
199
    long circleId)
206
    long circleId,
-
 
207
    String email)
200
  {
208
  {
201
    this();
209
    this();
202
    this.id = id;
210
    this.id = id;
203
    setIdIsSet(true);
211
    setIdIsSet(true);
204
    this.hotspotId = hotspotId;
212
    this.hotspotId = hotspotId;
Line 216... Line 224...
216
    this.password = password;
224
    this.password = password;
217
    this.isActive = isActive;
225
    this.isActive = isActive;
218
    setIsActiveIsSet(true);
226
    setIsActiveIsSet(true);
219
    this.circleId = circleId;
227
    this.circleId = circleId;
220
    setCircleIdIsSet(true);
228
    setCircleIdIsSet(true);
-
 
229
    this.email = email;
221
  }
230
  }
222
 
231
 
223
  /**
232
  /**
224
   * Performs a deep copy on <i>other</i>.
233
   * Performs a deep copy on <i>other</i>.
225
   */
234
   */
Line 246... Line 255...
246
    if (other.isSetPassword()) {
255
    if (other.isSetPassword()) {
247
      this.password = other.password;
256
      this.password = other.password;
248
    }
257
    }
249
    this.isActive = other.isActive;
258
    this.isActive = other.isActive;
250
    this.circleId = other.circleId;
259
    this.circleId = other.circleId;
-
 
260
    if (other.isSetEmail()) {
-
 
261
      this.email = other.email;
-
 
262
    }
251
  }
263
  }
252
 
264
 
253
  public HotspotStore deepCopy() {
265
  public HotspotStore deepCopy() {
254
    return new HotspotStore(this);
266
    return new HotspotStore(this);
255
  }
267
  }
Line 273... Line 285...
273
    this.password = null;
285
    this.password = null;
274
    setIsActiveIsSet(false);
286
    setIsActiveIsSet(false);
275
    this.isActive = false;
287
    this.isActive = false;
276
    setCircleIdIsSet(false);
288
    setCircleIdIsSet(false);
277
    this.circleId = 0;
289
    this.circleId = 0;
-
 
290
    this.email = null;
278
  }
291
  }
279
 
292
 
280
  public long getId() {
293
  public long getId() {
281
    return this.id;
294
    return this.id;
282
  }
295
  }
Line 544... Line 557...
544
 
557
 
545
  public void setCircleIdIsSet(boolean value) {
558
  public void setCircleIdIsSet(boolean value) {
546
    __isset_bit_vector.set(__CIRCLEID_ISSET_ID, value);
559
    __isset_bit_vector.set(__CIRCLEID_ISSET_ID, value);
547
  }
560
  }
548
 
561
 
-
 
562
  public String getEmail() {
-
 
563
    return this.email;
-
 
564
  }
-
 
565
 
-
 
566
  public void setEmail(String email) {
-
 
567
    this.email = email;
-
 
568
  }
-
 
569
 
-
 
570
  public void unsetEmail() {
-
 
571
    this.email = null;
-
 
572
  }
-
 
573
 
-
 
574
  /** Returns true if field email is set (has been assigned a value) and false otherwise */
-
 
575
  public boolean isSetEmail() {
-
 
576
    return this.email != null;
-
 
577
  }
-
 
578
 
-
 
579
  public void setEmailIsSet(boolean value) {
-
 
580
    if (!value) {
-
 
581
      this.email = null;
-
 
582
    }
-
 
583
  }
-
 
584
 
549
  public void setFieldValue(_Fields field, Object value) {
585
  public void setFieldValue(_Fields field, Object value) {
550
    switch (field) {
586
    switch (field) {
551
    case ID:
587
    case ID:
552
      if (value == null) {
588
      if (value == null) {
553
        unsetId();
589
        unsetId();
Line 642... Line 678...
642
      } else {
678
      } else {
643
        setCircleId((Long)value);
679
        setCircleId((Long)value);
644
      }
680
      }
645
      break;
681
      break;
646
 
682
 
-
 
683
    case EMAIL:
-
 
684
      if (value == null) {
-
 
685
        unsetEmail();
-
 
686
      } else {
-
 
687
        setEmail((String)value);
-
 
688
      }
-
 
689
      break;
-
 
690
 
647
    }
691
    }
648
  }
692
  }
649
 
693
 
650
  public Object getFieldValue(_Fields field) {
694
  public Object getFieldValue(_Fields field) {
651
    switch (field) {
695
    switch (field) {
Line 683... Line 727...
683
      return Boolean.valueOf(isIsActive());
727
      return Boolean.valueOf(isIsActive());
684
 
728
 
685
    case CIRCLE_ID:
729
    case CIRCLE_ID:
686
      return Long.valueOf(getCircleId());
730
      return Long.valueOf(getCircleId());
687
 
731
 
-
 
732
    case EMAIL:
-
 
733
      return getEmail();
-
 
734
 
688
    }
735
    }
689
    throw new IllegalStateException();
736
    throw new IllegalStateException();
690
  }
737
  }
691
 
738
 
692
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
739
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 718... Line 765...
718
      return isSetPassword();
765
      return isSetPassword();
719
    case IS_ACTIVE:
766
    case IS_ACTIVE:
720
      return isSetIsActive();
767
      return isSetIsActive();
721
    case CIRCLE_ID:
768
    case CIRCLE_ID:
722
      return isSetCircleId();
769
      return isSetCircleId();
-
 
770
    case EMAIL:
-
 
771
      return isSetEmail();
723
    }
772
    }
724
    throw new IllegalStateException();
773
    throw new IllegalStateException();
725
  }
774
  }
726
 
775
 
727
  @Override
776
  @Override
Line 843... Line 892...
843
        return false;
892
        return false;
844
      if (this.circleId != that.circleId)
893
      if (this.circleId != that.circleId)
845
        return false;
894
        return false;
846
    }
895
    }
847
 
896
 
-
 
897
    boolean this_present_email = true && this.isSetEmail();
-
 
898
    boolean that_present_email = true && that.isSetEmail();
-
 
899
    if (this_present_email || that_present_email) {
-
 
900
      if (!(this_present_email && that_present_email))
-
 
901
        return false;
-
 
902
      if (!this.email.equals(that.email))
-
 
903
        return false;
-
 
904
    }
-
 
905
 
848
    return true;
906
    return true;
849
  }
907
  }
850
 
908
 
851
  @Override
909
  @Override
852
  public int hashCode() {
910
  public int hashCode() {
Line 979... Line 1037...
979
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.circleId, typedOther.circleId);
1037
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.circleId, typedOther.circleId);
980
      if (lastComparison != 0) {
1038
      if (lastComparison != 0) {
981
        return lastComparison;
1039
        return lastComparison;
982
      }
1040
      }
983
    }
1041
    }
-
 
1042
    lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
-
 
1043
    if (lastComparison != 0) {
-
 
1044
      return lastComparison;
-
 
1045
    }
-
 
1046
    if (isSetEmail()) {
-
 
1047
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
-
 
1048
      if (lastComparison != 0) {
-
 
1049
        return lastComparison;
-
 
1050
      }
-
 
1051
    }
984
    return 0;
1052
    return 0;
985
  }
1053
  }
986
 
1054
 
987
  public _Fields fieldForId(int fieldId) {
1055
  public _Fields fieldForId(int fieldId) {
988
    return _Fields.findByThriftId(fieldId);
1056
    return _Fields.findByThriftId(fieldId);
Line 1087... Line 1155...
1087
            setCircleIdIsSet(true);
1155
            setCircleIdIsSet(true);
1088
          } else { 
1156
          } else { 
1089
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1157
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1090
          }
1158
          }
1091
          break;
1159
          break;
-
 
1160
        case 13: // EMAIL
-
 
1161
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1162
            this.email = iprot.readString();
-
 
1163
          } else { 
-
 
1164
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1165
          }
-
 
1166
          break;
1092
        default:
1167
        default:
1093
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1168
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1094
      }
1169
      }
1095
      iprot.readFieldEnd();
1170
      iprot.readFieldEnd();
1096
    }
1171
    }
Line 1146... Line 1221...
1146
    oprot.writeBool(this.isActive);
1221
    oprot.writeBool(this.isActive);
1147
    oprot.writeFieldEnd();
1222
    oprot.writeFieldEnd();
1148
    oprot.writeFieldBegin(CIRCLE_ID_FIELD_DESC);
1223
    oprot.writeFieldBegin(CIRCLE_ID_FIELD_DESC);
1149
    oprot.writeI64(this.circleId);
1224
    oprot.writeI64(this.circleId);
1150
    oprot.writeFieldEnd();
1225
    oprot.writeFieldEnd();
-
 
1226
    if (this.email != null) {
-
 
1227
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
-
 
1228
      oprot.writeString(this.email);
-
 
1229
      oprot.writeFieldEnd();
-
 
1230
    }
1151
    oprot.writeFieldStop();
1231
    oprot.writeFieldStop();
1152
    oprot.writeStructEnd();
1232
    oprot.writeStructEnd();
1153
  }
1233
  }
1154
 
1234
 
1155
  @Override
1235
  @Override
Line 1222... Line 1302...
1222
    first = false;
1302
    first = false;
1223
    if (!first) sb.append(", ");
1303
    if (!first) sb.append(", ");
1224
    sb.append("circleId:");
1304
    sb.append("circleId:");
1225
    sb.append(this.circleId);
1305
    sb.append(this.circleId);
1226
    first = false;
1306
    first = false;
-
 
1307
    if (!first) sb.append(", ");
-
 
1308
    sb.append("email:");
-
 
1309
    if (this.email == null) {
-
 
1310
      sb.append("null");
-
 
1311
    } else {
-
 
1312
      sb.append(this.email);
-
 
1313
    }
-
 
1314
    first = false;
1227
    sb.append(")");
1315
    sb.append(")");
1228
    return sb.toString();
1316
    return sb.toString();
1229
  }
1317
  }
1230
 
1318
 
1231
  public void validate() throws org.apache.thrift.TException {
1319
  public void validate() throws org.apache.thrift.TException {