Subversion Repositories SmartDukaan

Rev

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

Rev 3858 Rev 6389
Line 33... Line 33...
33
  private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("coupon_code", org.apache.thrift.protocol.TType.STRING, (short)8);
33
  private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("coupon_code", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField SESSION_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionSource", org.apache.thrift.protocol.TType.STRING, (short)9);
34
  private static final org.apache.thrift.protocol.TField SESSION_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionSource", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  private static final org.apache.thrift.protocol.TField SESSION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionStartTime", org.apache.thrift.protocol.TType.I64, (short)10);
35
  private static final org.apache.thrift.protocol.TField SESSION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionStartTime", org.apache.thrift.protocol.TType.I64, (short)10);
36
  private static final org.apache.thrift.protocol.TField FIRST_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSource", org.apache.thrift.protocol.TType.STRING, (short)11);
36
  private static final org.apache.thrift.protocol.TField FIRST_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSource", org.apache.thrift.protocol.TType.STRING, (short)11);
37
  private static final org.apache.thrift.protocol.TField FIRST_SOURCE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSourceTime", org.apache.thrift.protocol.TType.I64, (short)12);
37
  private static final org.apache.thrift.protocol.TField FIRST_SOURCE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSourceTime", org.apache.thrift.protocol.TType.I64, (short)12);
-
 
38
  private static final org.apache.thrift.protocol.TField EMI_SCHEME_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("emiSchemeId", org.apache.thrift.protocol.TType.I64, (short)13);
38
 
39
 
39
  private long id; // required
40
  private long id; // required
40
  private List<Order> orders; // required
41
  private List<Order> orders; // required
41
  private long createdOn; // required
42
  private long createdOn; // required
42
  private TransactionStatus transactionStatus; // required
43
  private TransactionStatus transactionStatus; // required
Line 46... Line 47...
46
  private String coupon_code; // required
47
  private String coupon_code; // required
47
  private String sessionSource; // required
48
  private String sessionSource; // required
48
  private long sessionStartTime; // required
49
  private long sessionStartTime; // required
49
  private String firstSource; // required
50
  private String firstSource; // required
50
  private long firstSourceTime; // required
51
  private long firstSourceTime; // required
-
 
52
  private long emiSchemeId; // 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
    ORDERS((short)2, "orders"),
57
    ORDERS((short)2, "orders"),
Line 64... Line 66...
64
    CUSTOMER_ID((short)7, "customer_id"),
66
    CUSTOMER_ID((short)7, "customer_id"),
65
    COUPON_CODE((short)8, "coupon_code"),
67
    COUPON_CODE((short)8, "coupon_code"),
66
    SESSION_SOURCE((short)9, "sessionSource"),
68
    SESSION_SOURCE((short)9, "sessionSource"),
67
    SESSION_START_TIME((short)10, "sessionStartTime"),
69
    SESSION_START_TIME((short)10, "sessionStartTime"),
68
    FIRST_SOURCE((short)11, "firstSource"),
70
    FIRST_SOURCE((short)11, "firstSource"),
69
    FIRST_SOURCE_TIME((short)12, "firstSourceTime");
71
    FIRST_SOURCE_TIME((short)12, "firstSourceTime"),
-
 
72
    EMI_SCHEME_ID((short)13, "emiSchemeId");
70
 
73
 
71
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
74
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
72
 
75
 
73
    static {
76
    static {
74
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
77
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 103... Line 106...
103
          return SESSION_START_TIME;
106
          return SESSION_START_TIME;
104
        case 11: // FIRST_SOURCE
107
        case 11: // FIRST_SOURCE
105
          return FIRST_SOURCE;
108
          return FIRST_SOURCE;
106
        case 12: // FIRST_SOURCE_TIME
109
        case 12: // FIRST_SOURCE_TIME
107
          return FIRST_SOURCE_TIME;
110
          return FIRST_SOURCE_TIME;
-
 
111
        case 13: // EMI_SCHEME_ID
-
 
112
          return EMI_SCHEME_ID;
108
        default:
113
        default:
109
          return null;
114
          return null;
110
      }
115
      }
111
    }
116
    }
112
 
117
 
Line 149... Line 154...
149
  private static final int __CREATEDON_ISSET_ID = 1;
154
  private static final int __CREATEDON_ISSET_ID = 1;
150
  private static final int __SHOPPINGCARTID_ISSET_ID = 2;
155
  private static final int __SHOPPINGCARTID_ISSET_ID = 2;
151
  private static final int __CUSTOMER_ID_ISSET_ID = 3;
156
  private static final int __CUSTOMER_ID_ISSET_ID = 3;
152
  private static final int __SESSIONSTARTTIME_ISSET_ID = 4;
157
  private static final int __SESSIONSTARTTIME_ISSET_ID = 4;
153
  private static final int __FIRSTSOURCETIME_ISSET_ID = 5;
158
  private static final int __FIRSTSOURCETIME_ISSET_ID = 5;
-
 
159
  private static final int __EMISCHEMEID_ISSET_ID = 6;
154
  private BitSet __isset_bit_vector = new BitSet(6);
160
  private BitSet __isset_bit_vector = new BitSet(7);
155
 
161
 
156
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
162
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
157
  static {
163
  static {
158
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
164
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
159
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
165
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 179... Line 185...
179
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
180
    tmpMap.put(_Fields.FIRST_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("firstSource", org.apache.thrift.TFieldRequirementType.DEFAULT, 
186
    tmpMap.put(_Fields.FIRST_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("firstSource", org.apache.thrift.TFieldRequirementType.DEFAULT, 
181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
182
    tmpMap.put(_Fields.FIRST_SOURCE_TIME, new org.apache.thrift.meta_data.FieldMetaData("firstSourceTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
188
    tmpMap.put(_Fields.FIRST_SOURCE_TIME, new org.apache.thrift.meta_data.FieldMetaData("firstSourceTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
190
    tmpMap.put(_Fields.EMI_SCHEME_ID, new org.apache.thrift.meta_data.FieldMetaData("emiSchemeId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
184
    metaDataMap = Collections.unmodifiableMap(tmpMap);
192
    metaDataMap = Collections.unmodifiableMap(tmpMap);
185
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);
193
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);
186
  }
194
  }
187
 
195
 
188
  public Transaction() {
196
  public Transaction() {
Line 198... Line 206...
198
    long customer_id,
206
    long customer_id,
199
    String coupon_code,
207
    String coupon_code,
200
    String sessionSource,
208
    String sessionSource,
201
    long sessionStartTime,
209
    long sessionStartTime,
202
    String firstSource,
210
    String firstSource,
203
    long firstSourceTime)
211
    long firstSourceTime,
-
 
212
    long emiSchemeId)
204
  {
213
  {
205
    this();
214
    this();
206
    this.id = id;
215
    this.id = id;
207
    setIdIsSet(true);
216
    setIdIsSet(true);
208
    this.orders = orders;
217
    this.orders = orders;
Line 219... Line 228...
219
    this.sessionStartTime = sessionStartTime;
228
    this.sessionStartTime = sessionStartTime;
220
    setSessionStartTimeIsSet(true);
229
    setSessionStartTimeIsSet(true);
221
    this.firstSource = firstSource;
230
    this.firstSource = firstSource;
222
    this.firstSourceTime = firstSourceTime;
231
    this.firstSourceTime = firstSourceTime;
223
    setFirstSourceTimeIsSet(true);
232
    setFirstSourceTimeIsSet(true);
-
 
233
    this.emiSchemeId = emiSchemeId;
-
 
234
    setEmiSchemeIdIsSet(true);
224
  }
235
  }
225
 
236
 
226
  /**
237
  /**
227
   * Performs a deep copy on <i>other</i>.
238
   * Performs a deep copy on <i>other</i>.
228
   */
239
   */
Line 255... Line 266...
255
    this.sessionStartTime = other.sessionStartTime;
266
    this.sessionStartTime = other.sessionStartTime;
256
    if (other.isSetFirstSource()) {
267
    if (other.isSetFirstSource()) {
257
      this.firstSource = other.firstSource;
268
      this.firstSource = other.firstSource;
258
    }
269
    }
259
    this.firstSourceTime = other.firstSourceTime;
270
    this.firstSourceTime = other.firstSourceTime;
-
 
271
    this.emiSchemeId = other.emiSchemeId;
260
  }
272
  }
261
 
273
 
262
  public Transaction deepCopy() {
274
  public Transaction deepCopy() {
263
    return new Transaction(this);
275
    return new Transaction(this);
264
  }
276
  }
Line 281... Line 293...
281
    setSessionStartTimeIsSet(false);
293
    setSessionStartTimeIsSet(false);
282
    this.sessionStartTime = 0;
294
    this.sessionStartTime = 0;
283
    this.firstSource = null;
295
    this.firstSource = null;
284
    setFirstSourceTimeIsSet(false);
296
    setFirstSourceTimeIsSet(false);
285
    this.firstSourceTime = 0;
297
    this.firstSourceTime = 0;
-
 
298
    setEmiSchemeIdIsSet(false);
-
 
299
    this.emiSchemeId = 0;
286
  }
300
  }
287
 
301
 
288
  public long getId() {
302
  public long getId() {
289
    return this.id;
303
    return this.id;
290
  }
304
  }
Line 576... Line 590...
576
 
590
 
577
  public void setFirstSourceTimeIsSet(boolean value) {
591
  public void setFirstSourceTimeIsSet(boolean value) {
578
    __isset_bit_vector.set(__FIRSTSOURCETIME_ISSET_ID, value);
592
    __isset_bit_vector.set(__FIRSTSOURCETIME_ISSET_ID, value);
579
  }
593
  }
580
 
594
 
-
 
595
  public long getEmiSchemeId() {
-
 
596
    return this.emiSchemeId;
-
 
597
  }
-
 
598
 
-
 
599
  public void setEmiSchemeId(long emiSchemeId) {
-
 
600
    this.emiSchemeId = emiSchemeId;
-
 
601
    setEmiSchemeIdIsSet(true);
-
 
602
  }
-
 
603
 
-
 
604
  public void unsetEmiSchemeId() {
-
 
605
    __isset_bit_vector.clear(__EMISCHEMEID_ISSET_ID);
-
 
606
  }
-
 
607
 
-
 
608
  /** Returns true if field emiSchemeId is set (has been assigned a value) and false otherwise */
-
 
609
  public boolean isSetEmiSchemeId() {
-
 
610
    return __isset_bit_vector.get(__EMISCHEMEID_ISSET_ID);
-
 
611
  }
-
 
612
 
-
 
613
  public void setEmiSchemeIdIsSet(boolean value) {
-
 
614
    __isset_bit_vector.set(__EMISCHEMEID_ISSET_ID, value);
-
 
615
  }
-
 
616
 
581
  public void setFieldValue(_Fields field, Object value) {
617
  public void setFieldValue(_Fields field, Object value) {
582
    switch (field) {
618
    switch (field) {
583
    case ID:
619
    case ID:
584
      if (value == null) {
620
      if (value == null) {
585
        unsetId();
621
        unsetId();
Line 674... Line 710...
674
      } else {
710
      } else {
675
        setFirstSourceTime((Long)value);
711
        setFirstSourceTime((Long)value);
676
      }
712
      }
677
      break;
713
      break;
678
 
714
 
-
 
715
    case EMI_SCHEME_ID:
-
 
716
      if (value == null) {
-
 
717
        unsetEmiSchemeId();
-
 
718
      } else {
-
 
719
        setEmiSchemeId((Long)value);
-
 
720
      }
-
 
721
      break;
-
 
722
 
679
    }
723
    }
680
  }
724
  }
681
 
725
 
682
  public Object getFieldValue(_Fields field) {
726
  public Object getFieldValue(_Fields field) {
683
    switch (field) {
727
    switch (field) {
Line 715... Line 759...
715
      return getFirstSource();
759
      return getFirstSource();
716
 
760
 
717
    case FIRST_SOURCE_TIME:
761
    case FIRST_SOURCE_TIME:
718
      return Long.valueOf(getFirstSourceTime());
762
      return Long.valueOf(getFirstSourceTime());
719
 
763
 
-
 
764
    case EMI_SCHEME_ID:
-
 
765
      return Long.valueOf(getEmiSchemeId());
-
 
766
 
720
    }
767
    }
721
    throw new IllegalStateException();
768
    throw new IllegalStateException();
722
  }
769
  }
723
 
770
 
724
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
771
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 750... Line 797...
750
      return isSetSessionStartTime();
797
      return isSetSessionStartTime();
751
    case FIRST_SOURCE:
798
    case FIRST_SOURCE:
752
      return isSetFirstSource();
799
      return isSetFirstSource();
753
    case FIRST_SOURCE_TIME:
800
    case FIRST_SOURCE_TIME:
754
      return isSetFirstSourceTime();
801
      return isSetFirstSourceTime();
-
 
802
    case EMI_SCHEME_ID:
-
 
803
      return isSetEmiSchemeId();
755
    }
804
    }
756
    throw new IllegalStateException();
805
    throw new IllegalStateException();
757
  }
806
  }
758
 
807
 
759
  @Override
808
  @Override
Line 875... Line 924...
875
        return false;
924
        return false;
876
      if (this.firstSourceTime != that.firstSourceTime)
925
      if (this.firstSourceTime != that.firstSourceTime)
877
        return false;
926
        return false;
878
    }
927
    }
879
 
928
 
-
 
929
    boolean this_present_emiSchemeId = true;
-
 
930
    boolean that_present_emiSchemeId = true;
-
 
931
    if (this_present_emiSchemeId || that_present_emiSchemeId) {
-
 
932
      if (!(this_present_emiSchemeId && that_present_emiSchemeId))
-
 
933
        return false;
-
 
934
      if (this.emiSchemeId != that.emiSchemeId)
-
 
935
        return false;
-
 
936
    }
-
 
937
 
880
    return true;
938
    return true;
881
  }
939
  }
882
 
940
 
883
  @Override
941
  @Override
884
  public int hashCode() {
942
  public int hashCode() {
Line 1011... Line 1069...
1011
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstSourceTime, typedOther.firstSourceTime);
1069
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstSourceTime, typedOther.firstSourceTime);
1012
      if (lastComparison != 0) {
1070
      if (lastComparison != 0) {
1013
        return lastComparison;
1071
        return lastComparison;
1014
      }
1072
      }
1015
    }
1073
    }
-
 
1074
    lastComparison = Boolean.valueOf(isSetEmiSchemeId()).compareTo(typedOther.isSetEmiSchemeId());
-
 
1075
    if (lastComparison != 0) {
-
 
1076
      return lastComparison;
-
 
1077
    }
-
 
1078
    if (isSetEmiSchemeId()) {
-
 
1079
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emiSchemeId, typedOther.emiSchemeId);
-
 
1080
      if (lastComparison != 0) {
-
 
1081
        return lastComparison;
-
 
1082
      }
-
 
1083
    }
1016
    return 0;
1084
    return 0;
1017
  }
1085
  }
1018
 
1086
 
1019
  public _Fields fieldForId(int fieldId) {
1087
  public _Fields fieldForId(int fieldId) {
1020
    return _Fields.findByThriftId(fieldId);
1088
    return _Fields.findByThriftId(fieldId);
Line 1129... Line 1197...
1129
            setFirstSourceTimeIsSet(true);
1197
            setFirstSourceTimeIsSet(true);
1130
          } else { 
1198
          } else { 
1131
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1199
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1132
          }
1200
          }
1133
          break;
1201
          break;
-
 
1202
        case 13: // EMI_SCHEME_ID
-
 
1203
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1204
            this.emiSchemeId = iprot.readI64();
-
 
1205
            setEmiSchemeIdIsSet(true);
-
 
1206
          } else { 
-
 
1207
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1208
          }
-
 
1209
          break;
1134
        default:
1210
        default:
1135
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1211
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1136
      }
1212
      }
1137
      iprot.readFieldEnd();
1213
      iprot.readFieldEnd();
1138
    }
1214
    }
Line 1197... Line 1273...
1197
      oprot.writeFieldEnd();
1273
      oprot.writeFieldEnd();
1198
    }
1274
    }
1199
    oprot.writeFieldBegin(FIRST_SOURCE_TIME_FIELD_DESC);
1275
    oprot.writeFieldBegin(FIRST_SOURCE_TIME_FIELD_DESC);
1200
    oprot.writeI64(this.firstSourceTime);
1276
    oprot.writeI64(this.firstSourceTime);
1201
    oprot.writeFieldEnd();
1277
    oprot.writeFieldEnd();
-
 
1278
    oprot.writeFieldBegin(EMI_SCHEME_ID_FIELD_DESC);
-
 
1279
    oprot.writeI64(this.emiSchemeId);
-
 
1280
    oprot.writeFieldEnd();
1202
    oprot.writeFieldStop();
1281
    oprot.writeFieldStop();
1203
    oprot.writeStructEnd();
1282
    oprot.writeStructEnd();
1204
  }
1283
  }
1205
 
1284
 
1206
  @Override
1285
  @Override
Line 1277... Line 1356...
1277
    first = false;
1356
    first = false;
1278
    if (!first) sb.append(", ");
1357
    if (!first) sb.append(", ");
1279
    sb.append("firstSourceTime:");
1358
    sb.append("firstSourceTime:");
1280
    sb.append(this.firstSourceTime);
1359
    sb.append(this.firstSourceTime);
1281
    first = false;
1360
    first = false;
-
 
1361
    if (!first) sb.append(", ");
-
 
1362
    sb.append("emiSchemeId:");
-
 
1363
    sb.append(this.emiSchemeId);
-
 
1364
    first = false;
1282
    sb.append(")");
1365
    sb.append(")");
1283
    return sb.toString();
1366
    return sb.toString();
1284
  }
1367
  }
1285
 
1368
 
1286
  public void validate() throws org.apache.thrift.TException {
1369
  public void validate() throws org.apache.thrift.TException {