Subversion Repositories SmartDukaan

Rev

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

Rev 5335 Rev 5342
Line 101... Line 101...
101
 
101
 
102
    public List<TrackLog> getTrackLogsByUser(long userId) throws UserAffiliateException, org.apache.thrift.TException;
102
    public List<TrackLog> getTrackLogsByUser(long userId) throws UserAffiliateException, org.apache.thrift.TException;
103
 
103
 
104
    public List<TrackLog> getTrackLogs(long userId, String event, String url) throws UserAffiliateException, org.apache.thrift.TException;
104
    public List<TrackLog> getTrackLogs(long userId, String event, String url) throws UserAffiliateException, org.apache.thrift.TException;
105
 
105
 
106
    public long createCart(long userId) throws ShoppingCartException, org.apache.thrift.TException;
-
 
107
 
-
 
108
    public Cart getCurrentCart(long userId) throws ShoppingCartException, org.apache.thrift.TException;
106
    public Cart getCurrentCart(long userId) throws ShoppingCartException, org.apache.thrift.TException;
109
 
107
 
110
    public Cart getCart(long cartId) throws ShoppingCartException, org.apache.thrift.TException;
108
    public Cart getCart(long cartId) throws ShoppingCartException, org.apache.thrift.TException;
111
 
109
 
112
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, org.apache.thrift.TException;
110
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, org.apache.thrift.TException;
Line 349... Line 347...
349
 
347
 
350
    public void getTrackLogsByUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackLogsByUser_call> resultHandler) throws org.apache.thrift.TException;
348
    public void getTrackLogsByUser(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackLogsByUser_call> resultHandler) throws org.apache.thrift.TException;
351
 
349
 
352
    public void getTrackLogs(long userId, String event, String url, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackLogs_call> resultHandler) throws org.apache.thrift.TException;
350
    public void getTrackLogs(long userId, String event, String url, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTrackLogs_call> resultHandler) throws org.apache.thrift.TException;
353
 
351
 
354
    public void createCart(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCart_call> resultHandler) throws org.apache.thrift.TException;
-
 
355
 
-
 
356
    public void getCurrentCart(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentCart_call> resultHandler) throws org.apache.thrift.TException;
352
    public void getCurrentCart(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentCart_call> resultHandler) throws org.apache.thrift.TException;
357
 
353
 
358
    public void getCart(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCart_call> resultHandler) throws org.apache.thrift.TException;
354
    public void getCart(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCart_call> resultHandler) throws org.apache.thrift.TException;
359
 
355
 
360
    public void getCartsByTime(long from_time, long to_time, CartStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCartsByTime_call> resultHandler) throws org.apache.thrift.TException;
356
    public void getCartsByTime(long from_time, long to_time, CartStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCartsByTime_call> resultHandler) throws org.apache.thrift.TException;
Line 1443... Line 1439...
1443
        throw result.utx;
1439
        throw result.utx;
1444
      }
1440
      }
1445
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTrackLogs failed: unknown result");
1441
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTrackLogs failed: unknown result");
1446
    }
1442
    }
1447
 
1443
 
1448
    public long createCart(long userId) throws ShoppingCartException, org.apache.thrift.TException
-
 
1449
    {
-
 
1450
      send_createCart(userId);
-
 
1451
      return recv_createCart();
-
 
1452
    }
-
 
1453
 
-
 
1454
    public void send_createCart(long userId) throws org.apache.thrift.TException
-
 
1455
    {
-
 
1456
      createCart_args args = new createCart_args();
-
 
1457
      args.setUserId(userId);
-
 
1458
      sendBase("createCart", args);
-
 
1459
    }
-
 
1460
 
-
 
1461
    public long recv_createCart() throws ShoppingCartException, org.apache.thrift.TException
-
 
1462
    {
-
 
1463
      createCart_result result = new createCart_result();
-
 
1464
      receiveBase(result, "createCart");
-
 
1465
      if (result.isSetSuccess()) {
-
 
1466
        return result.success;
-
 
1467
      }
-
 
1468
      if (result.scx != null) {
-
 
1469
        throw result.scx;
-
 
1470
      }
-
 
1471
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
-
 
1472
    }
-
 
1473
 
-
 
1474
    public Cart getCurrentCart(long userId) throws ShoppingCartException, org.apache.thrift.TException
1444
    public Cart getCurrentCart(long userId) throws ShoppingCartException, org.apache.thrift.TException
1475
    {
1445
    {
1476
      send_getCurrentCart(userId);
1446
      send_getCurrentCart(userId);
1477
      return recv_getCurrentCart();
1447
      return recv_getCurrentCart();
1478
    }
1448
    }
Line 3451... Line 3421...
3451
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3421
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3452
        return (new Client(prot)).recv_getTrackLogs();
3422
        return (new Client(prot)).recv_getTrackLogs();
3453
      }
3423
      }
3454
    }
3424
    }
3455
 
3425
 
3456
    public void createCart(long userId, org.apache.thrift.async.AsyncMethodCallback<createCart_call> resultHandler) throws org.apache.thrift.TException {
-
 
3457
      checkReady();
-
 
3458
      createCart_call method_call = new createCart_call(userId, resultHandler, this, ___protocolFactory, ___transport);
-
 
3459
      this.___currentMethod = method_call;
-
 
3460
      ___manager.call(method_call);
-
 
3461
    }
-
 
3462
 
-
 
3463
    public static class createCart_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
3464
      private long userId;
-
 
3465
      public createCart_call(long userId, org.apache.thrift.async.AsyncMethodCallback<createCart_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
3466
        super(client, protocolFactory, transport, resultHandler, false);
-
 
3467
        this.userId = userId;
-
 
3468
      }
-
 
3469
 
-
 
3470
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
3471
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
3472
        createCart_args args = new createCart_args();
-
 
3473
        args.setUserId(userId);
-
 
3474
        args.write(prot);
-
 
3475
        prot.writeMessageEnd();
-
 
3476
      }
-
 
3477
 
-
 
3478
      public long getResult() throws ShoppingCartException, org.apache.thrift.TException {
-
 
3479
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
3480
          throw new IllegalStateException("Method call not finished!");
-
 
3481
        }
-
 
3482
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
3483
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
3484
        return (new Client(prot)).recv_createCart();
-
 
3485
      }
-
 
3486
    }
-
 
3487
 
-
 
3488
    public void getCurrentCart(long userId, org.apache.thrift.async.AsyncMethodCallback<getCurrentCart_call> resultHandler) throws org.apache.thrift.TException {
3426
    public void getCurrentCart(long userId, org.apache.thrift.async.AsyncMethodCallback<getCurrentCart_call> resultHandler) throws org.apache.thrift.TException {
3489
      checkReady();
3427
      checkReady();
3490
      getCurrentCart_call method_call = new getCurrentCart_call(userId, resultHandler, this, ___protocolFactory, ___transport);
3428
      getCurrentCart_call method_call = new getCurrentCart_call(userId, resultHandler, this, ___protocolFactory, ___transport);
3491
      this.___currentMethod = method_call;
3429
      this.___currentMethod = method_call;
3492
      ___manager.call(method_call);
3430
      ___manager.call(method_call);
Line 4487... Line 4425...
4487
      processMap.put("addTrackLog", new addTrackLog());
4425
      processMap.put("addTrackLog", new addTrackLog());
4488
      processMap.put("getTrackLogById", new getTrackLogById());
4426
      processMap.put("getTrackLogById", new getTrackLogById());
4489
      processMap.put("getTrackLogsByAffiliate", new getTrackLogsByAffiliate());
4427
      processMap.put("getTrackLogsByAffiliate", new getTrackLogsByAffiliate());
4490
      processMap.put("getTrackLogsByUser", new getTrackLogsByUser());
4428
      processMap.put("getTrackLogsByUser", new getTrackLogsByUser());
4491
      processMap.put("getTrackLogs", new getTrackLogs());
4429
      processMap.put("getTrackLogs", new getTrackLogs());
4492
      processMap.put("createCart", new createCart());
-
 
4493
      processMap.put("getCurrentCart", new getCurrentCart());
4430
      processMap.put("getCurrentCart", new getCurrentCart());
4494
      processMap.put("getCart", new getCart());
4431
      processMap.put("getCart", new getCart());
4495
      processMap.put("getCartsByTime", new getCartsByTime());
4432
      processMap.put("getCartsByTime", new getCartsByTime());
4496
      processMap.put("addItemToCart", new addItemToCart());
4433
      processMap.put("addItemToCart", new addItemToCart());
4497
      processMap.put("deleteItemFromCart", new deleteItemFromCart());
4434
      processMap.put("deleteItemFromCart", new deleteItemFromCart());
Line 5289... Line 5226...
5289
        }
5226
        }
5290
        return result;
5227
        return result;
5291
      }
5228
      }
5292
    }
5229
    }
5293
 
5230
 
5294
    private static class createCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createCart_args> {
-
 
5295
      public createCart() {
-
 
5296
        super("createCart");
-
 
5297
      }
-
 
5298
 
-
 
5299
      protected createCart_args getEmptyArgsInstance() {
-
 
5300
        return new createCart_args();
-
 
5301
      }
-
 
5302
 
-
 
5303
      protected createCart_result getResult(I iface, createCart_args args) throws org.apache.thrift.TException {
-
 
5304
        createCart_result result = new createCart_result();
-
 
5305
        try {
-
 
5306
          result.success = iface.createCart(args.userId);
-
 
5307
          result.setSuccessIsSet(true);
-
 
5308
        } catch (ShoppingCartException scx) {
-
 
5309
          result.scx = scx;
-
 
5310
        }
-
 
5311
        return result;
-
 
5312
      }
-
 
5313
    }
-
 
5314
 
-
 
5315
    private static class getCurrentCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentCart_args> {
5231
    private static class getCurrentCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentCart_args> {
5316
      public getCurrentCart() {
5232
      public getCurrentCart() {
5317
        super("getCurrentCart");
5233
        super("getCurrentCart");
5318
      }
5234
      }
5319
 
5235
 
Line 34176... Line 34092...
34176
      }
34092
      }
34177
      first = false;
34093
      first = false;
34178
      sb.append(")");
34094
      sb.append(")");
34179
      return sb.toString();
34095
      return sb.toString();
34180
    }
34096
    }
34181
 
-
 
34182
    public void validate() throws org.apache.thrift.TException {
-
 
34183
      // check for required fields
-
 
34184
    }
-
 
34185
 
-
 
34186
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
34187
      try {
-
 
34188
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
34189
      } catch (org.apache.thrift.TException te) {
-
 
34190
        throw new java.io.IOException(te);
-
 
34191
      }
-
 
34192
    }
-
 
34193
 
-
 
34194
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
34195
      try {
-
 
34196
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
34197
      } catch (org.apache.thrift.TException te) {
-
 
34198
        throw new java.io.IOException(te);
-
 
34199
      }
-
 
34200
    }
-
 
34201
 
-
 
34202
  }
-
 
34203
 
-
 
34204
  public static class createCart_args implements org.apache.thrift.TBase<createCart_args, createCart_args._Fields>, java.io.Serializable, Cloneable   {
-
 
34205
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createCart_args");
-
 
34206
 
-
 
34207
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
34208
 
-
 
34209
    private long userId; // required
-
 
34210
 
-
 
34211
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
34212
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
34213
      USER_ID((short)1, "userId");
-
 
34214
 
-
 
34215
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
34216
 
-
 
34217
      static {
-
 
34218
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
34219
          byName.put(field.getFieldName(), field);
-
 
34220
        }
-
 
34221
      }
-
 
34222
 
-
 
34223
      /**
-
 
34224
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
34225
       */
-
 
34226
      public static _Fields findByThriftId(int fieldId) {
-
 
34227
        switch(fieldId) {
-
 
34228
          case 1: // USER_ID
-
 
34229
            return USER_ID;
-
 
34230
          default:
-
 
34231
            return null;
-
 
34232
        }
-
 
34233
      }
-
 
34234
 
-
 
34235
      /**
-
 
34236
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
34237
       * if it is not found.
-
 
34238
       */
-
 
34239
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
34240
        _Fields fields = findByThriftId(fieldId);
-
 
34241
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
34242
        return fields;
-
 
34243
      }
-
 
34244
 
-
 
34245
      /**
-
 
34246
       * Find the _Fields constant that matches name, or null if its not found.
-
 
34247
       */
-
 
34248
      public static _Fields findByName(String name) {
-
 
34249
        return byName.get(name);
-
 
34250
      }
-
 
34251
 
-
 
34252
      private final short _thriftId;
-
 
34253
      private final String _fieldName;
-
 
34254
 
-
 
34255
      _Fields(short thriftId, String fieldName) {
-
 
34256
        _thriftId = thriftId;
-
 
34257
        _fieldName = fieldName;
-
 
34258
      }
-
 
34259
 
-
 
34260
      public short getThriftFieldId() {
-
 
34261
        return _thriftId;
-
 
34262
      }
-
 
34263
 
-
 
34264
      public String getFieldName() {
-
 
34265
        return _fieldName;
-
 
34266
      }
-
 
34267
    }
-
 
34268
 
-
 
34269
    // isset id assignments
-
 
34270
    private static final int __USERID_ISSET_ID = 0;
-
 
34271
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
34272
 
-
 
34273
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
34274
    static {
-
 
34275
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
34276
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
34277
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
34278
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
34279
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
-
 
34280
    }
-
 
34281
 
-
 
34282
    public createCart_args() {
-
 
34283
    }
-
 
34284
 
-
 
34285
    public createCart_args(
-
 
34286
      long userId)
-
 
34287
    {
-
 
34288
      this();
-
 
34289
      this.userId = userId;
-
 
34290
      setUserIdIsSet(true);
-
 
34291
    }
-
 
34292
 
-
 
34293
    /**
-
 
34294
     * Performs a deep copy on <i>other</i>.
-
 
34295
     */
-
 
34296
    public createCart_args(createCart_args other) {
-
 
34297
      __isset_bit_vector.clear();
-
 
34298
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
34299
      this.userId = other.userId;
-
 
34300
    }
-
 
34301
 
-
 
34302
    public createCart_args deepCopy() {
-
 
34303
      return new createCart_args(this);
-
 
34304
    }
-
 
34305
 
-
 
34306
    @Override
-
 
34307
    public void clear() {
-
 
34308
      setUserIdIsSet(false);
-
 
34309
      this.userId = 0;
-
 
34310
    }
-
 
34311
 
-
 
34312
    public long getUserId() {
-
 
34313
      return this.userId;
-
 
34314
    }
-
 
34315
 
-
 
34316
    public void setUserId(long userId) {
-
 
34317
      this.userId = userId;
-
 
34318
      setUserIdIsSet(true);
-
 
34319
    }
-
 
34320
 
-
 
34321
    public void unsetUserId() {
-
 
34322
      __isset_bit_vector.clear(__USERID_ISSET_ID);
-
 
34323
    }
-
 
34324
 
-
 
34325
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
-
 
34326
    public boolean isSetUserId() {
-
 
34327
      return __isset_bit_vector.get(__USERID_ISSET_ID);
-
 
34328
    }
-
 
34329
 
-
 
34330
    public void setUserIdIsSet(boolean value) {
-
 
34331
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
-
 
34332
    }
-
 
34333
 
-
 
34334
    public void setFieldValue(_Fields field, Object value) {
-
 
34335
      switch (field) {
-
 
34336
      case USER_ID:
-
 
34337
        if (value == null) {
-
 
34338
          unsetUserId();
-
 
34339
        } else {
-
 
34340
          setUserId((Long)value);
-
 
34341
        }
-
 
34342
        break;
-
 
34343
 
-
 
34344
      }
-
 
34345
    }
-
 
34346
 
-
 
34347
    public Object getFieldValue(_Fields field) {
-
 
34348
      switch (field) {
-
 
34349
      case USER_ID:
-
 
34350
        return Long.valueOf(getUserId());
-
 
34351
 
-
 
34352
      }
-
 
34353
      throw new IllegalStateException();
-
 
34354
    }
-
 
34355
 
-
 
34356
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
34357
    public boolean isSet(_Fields field) {
-
 
34358
      if (field == null) {
-
 
34359
        throw new IllegalArgumentException();
-
 
34360
      }
-
 
34361
 
-
 
34362
      switch (field) {
-
 
34363
      case USER_ID:
-
 
34364
        return isSetUserId();
-
 
34365
      }
-
 
34366
      throw new IllegalStateException();
-
 
34367
    }
-
 
34368
 
-
 
34369
    @Override
-
 
34370
    public boolean equals(Object that) {
-
 
34371
      if (that == null)
-
 
34372
        return false;
-
 
34373
      if (that instanceof createCart_args)
-
 
34374
        return this.equals((createCart_args)that);
-
 
34375
      return false;
-
 
34376
    }
-
 
34377
 
-
 
34378
    public boolean equals(createCart_args that) {
-
 
34379
      if (that == null)
-
 
34380
        return false;
-
 
34381
 
-
 
34382
      boolean this_present_userId = true;
-
 
34383
      boolean that_present_userId = true;
-
 
34384
      if (this_present_userId || that_present_userId) {
-
 
34385
        if (!(this_present_userId && that_present_userId))
-
 
34386
          return false;
-
 
34387
        if (this.userId != that.userId)
-
 
34388
          return false;
-
 
34389
      }
-
 
34390
 
-
 
34391
      return true;
-
 
34392
    }
-
 
34393
 
-
 
34394
    @Override
-
 
34395
    public int hashCode() {
-
 
34396
      return 0;
-
 
34397
    }
-
 
34398
 
-
 
34399
    public int compareTo(createCart_args other) {
-
 
34400
      if (!getClass().equals(other.getClass())) {
-
 
34401
        return getClass().getName().compareTo(other.getClass().getName());
-
 
34402
      }
-
 
34403
 
-
 
34404
      int lastComparison = 0;
-
 
34405
      createCart_args typedOther = (createCart_args)other;
-
 
34406
 
-
 
34407
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
-
 
34408
      if (lastComparison != 0) {
-
 
34409
        return lastComparison;
-
 
34410
      }
-
 
34411
      if (isSetUserId()) {
-
 
34412
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
-
 
34413
        if (lastComparison != 0) {
-
 
34414
          return lastComparison;
-
 
34415
        }
-
 
34416
      }
-
 
34417
      return 0;
-
 
34418
    }
-
 
34419
 
-
 
34420
    public _Fields fieldForId(int fieldId) {
-
 
34421
      return _Fields.findByThriftId(fieldId);
-
 
34422
    }
-
 
34423
 
-
 
34424
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
34425
      org.apache.thrift.protocol.TField field;
-
 
34426
      iprot.readStructBegin();
-
 
34427
      while (true)
-
 
34428
      {
-
 
34429
        field = iprot.readFieldBegin();
-
 
34430
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
34431
          break;
-
 
34432
        }
-
 
34433
        switch (field.id) {
-
 
34434
          case 1: // USER_ID
-
 
34435
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
34436
              this.userId = iprot.readI64();
-
 
34437
              setUserIdIsSet(true);
-
 
34438
            } else { 
-
 
34439
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
34440
            }
-
 
34441
            break;
-
 
34442
          default:
-
 
34443
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
34444
        }
-
 
34445
        iprot.readFieldEnd();
-
 
34446
      }
-
 
34447
      iprot.readStructEnd();
-
 
34448
      validate();
-
 
34449
    }
-
 
34450
 
-
 
34451
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
34452
      validate();
-
 
34453
 
-
 
34454
      oprot.writeStructBegin(STRUCT_DESC);
-
 
34455
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
-
 
34456
      oprot.writeI64(this.userId);
-
 
34457
      oprot.writeFieldEnd();
-
 
34458
      oprot.writeFieldStop();
-
 
34459
      oprot.writeStructEnd();
-
 
34460
    }
-
 
34461
 
-
 
34462
    @Override
-
 
34463
    public String toString() {
-
 
34464
      StringBuilder sb = new StringBuilder("createCart_args(");
-
 
34465
      boolean first = true;
-
 
34466
 
-
 
34467
      sb.append("userId:");
-
 
34468
      sb.append(this.userId);
-
 
34469
      first = false;
-
 
34470
      sb.append(")");
-
 
34471
      return sb.toString();
-
 
34472
    }
-
 
34473
 
-
 
34474
    public void validate() throws org.apache.thrift.TException {
-
 
34475
      // check for required fields
-
 
34476
    }
-
 
34477
 
-
 
34478
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
34479
      try {
-
 
34480
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
34481
      } catch (org.apache.thrift.TException te) {
-
 
34482
        throw new java.io.IOException(te);
-
 
34483
      }
-
 
34484
    }
-
 
34485
 
-
 
34486
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
34487
      try {
-
 
34488
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
34489
        __isset_bit_vector = new BitSet(1);
-
 
34490
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
34491
      } catch (org.apache.thrift.TException te) {
-
 
34492
        throw new java.io.IOException(te);
-
 
34493
      }
-
 
34494
    }
-
 
34495
 
-
 
34496
  }
-
 
34497
 
-
 
34498
  public static class createCart_result implements org.apache.thrift.TBase<createCart_result, createCart_result._Fields>, java.io.Serializable, Cloneable   {
-
 
34499
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createCart_result");
-
 
34500
 
-
 
34501
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
-
 
34502
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
34503
 
-
 
34504
    private long success; // required
-
 
34505
    private ShoppingCartException scx; // required
-
 
34506
 
-
 
34507
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
34508
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
34509
      SUCCESS((short)0, "success"),
-
 
34510
      SCX((short)1, "scx");
-
 
34511
 
-
 
34512
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
34513
 
-
 
34514
      static {
-
 
34515
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
34516
          byName.put(field.getFieldName(), field);
-
 
34517
        }
-
 
34518
      }
-
 
34519
 
-
 
34520
      /**
-
 
34521
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
34522
       */
-
 
34523
      public static _Fields findByThriftId(int fieldId) {
-
 
34524
        switch(fieldId) {
-
 
34525
          case 0: // SUCCESS
-
 
34526
            return SUCCESS;
-
 
34527
          case 1: // SCX
-
 
34528
            return SCX;
-
 
34529
          default:
-
 
34530
            return null;
-
 
34531
        }
-
 
34532
      }
-
 
34533
 
-
 
34534
      /**
-
 
34535
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
34536
       * if it is not found.
-
 
34537
       */
-
 
34538
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
34539
        _Fields fields = findByThriftId(fieldId);
-
 
34540
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
34541
        return fields;
-
 
34542
      }
-
 
34543
 
-
 
34544
      /**
-
 
34545
       * Find the _Fields constant that matches name, or null if its not found.
-
 
34546
       */
-
 
34547
      public static _Fields findByName(String name) {
-
 
34548
        return byName.get(name);
-
 
34549
      }
-
 
34550
 
-
 
34551
      private final short _thriftId;
-
 
34552
      private final String _fieldName;
-
 
34553
 
-
 
34554
      _Fields(short thriftId, String fieldName) {
-
 
34555
        _thriftId = thriftId;
-
 
34556
        _fieldName = fieldName;
-
 
34557
      }
-
 
34558
 
-
 
34559
      public short getThriftFieldId() {
-
 
34560
        return _thriftId;
-
 
34561
      }
-
 
34562
 
-
 
34563
      public String getFieldName() {
-
 
34564
        return _fieldName;
-
 
34565
      }
-
 
34566
    }
-
 
34567
 
-
 
34568
    // isset id assignments
-
 
34569
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
34570
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
34571
 
-
 
34572
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
34573
    static {
-
 
34574
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
34575
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
34576
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
34577
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
34578
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
34579
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
34580
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
-
 
34581
    }
-
 
34582
 
-
 
34583
    public createCart_result() {
-
 
34584
    }
-
 
34585
 
-
 
34586
    public createCart_result(
-
 
34587
      long success,
-
 
34588
      ShoppingCartException scx)
-
 
34589
    {
-
 
34590
      this();
-
 
34591
      this.success = success;
-
 
34592
      setSuccessIsSet(true);
-
 
34593
      this.scx = scx;
-
 
34594
    }
-
 
34595
 
-
 
34596
    /**
-
 
34597
     * Performs a deep copy on <i>other</i>.
-
 
34598
     */
-
 
34599
    public createCart_result(createCart_result other) {
-
 
34600
      __isset_bit_vector.clear();
-
 
34601
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
34602
      this.success = other.success;
-
 
34603
      if (other.isSetScx()) {
-
 
34604
        this.scx = new ShoppingCartException(other.scx);
-
 
34605
      }
-
 
34606
    }
-
 
34607
 
-
 
34608
    public createCart_result deepCopy() {
-
 
34609
      return new createCart_result(this);
-
 
34610
    }
-
 
34611
 
-
 
34612
    @Override
-
 
34613
    public void clear() {
-
 
34614
      setSuccessIsSet(false);
-
 
34615
      this.success = 0;
-
 
34616
      this.scx = null;
-
 
34617
    }
-
 
34618
 
-
 
34619
    public long getSuccess() {
-
 
34620
      return this.success;
-
 
34621
    }
-
 
34622
 
-
 
34623
    public void setSuccess(long success) {
-
 
34624
      this.success = success;
-
 
34625
      setSuccessIsSet(true);
-
 
34626
    }
-
 
34627
 
-
 
34628
    public void unsetSuccess() {
-
 
34629
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
34630
    }
-
 
34631
 
-
 
34632
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
34633
    public boolean isSetSuccess() {
-
 
34634
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
34635
    }
-
 
34636
 
-
 
34637
    public void setSuccessIsSet(boolean value) {
-
 
34638
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
34639
    }
-
 
34640
 
-
 
34641
    public ShoppingCartException getScx() {
-
 
34642
      return this.scx;
-
 
34643
    }
-
 
34644
 
-
 
34645
    public void setScx(ShoppingCartException scx) {
-
 
34646
      this.scx = scx;
-
 
34647
    }
-
 
34648
 
-
 
34649
    public void unsetScx() {
-
 
34650
      this.scx = null;
-
 
34651
    }
-
 
34652
 
-
 
34653
    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
-
 
34654
    public boolean isSetScx() {
-
 
34655
      return this.scx != null;
-
 
34656
    }
-
 
34657
 
-
 
34658
    public void setScxIsSet(boolean value) {
-
 
34659
      if (!value) {
-
 
34660
        this.scx = null;
-
 
34661
      }
-
 
34662
    }
-
 
34663
 
-
 
34664
    public void setFieldValue(_Fields field, Object value) {
-
 
34665
      switch (field) {
-
 
34666
      case SUCCESS:
-
 
34667
        if (value == null) {
-
 
34668
          unsetSuccess();
-
 
34669
        } else {
-
 
34670
          setSuccess((Long)value);
-
 
34671
        }
-
 
34672
        break;
-
 
34673
 
-
 
34674
      case SCX:
-
 
34675
        if (value == null) {
-
 
34676
          unsetScx();
-
 
34677
        } else {
-
 
34678
          setScx((ShoppingCartException)value);
-
 
34679
        }
-
 
34680
        break;
-
 
34681
 
-
 
34682
      }
-
 
34683
    }
-
 
34684
 
-
 
34685
    public Object getFieldValue(_Fields field) {
-
 
34686
      switch (field) {
-
 
34687
      case SUCCESS:
-
 
34688
        return Long.valueOf(getSuccess());
-
 
34689
 
-
 
34690
      case SCX:
-
 
34691
        return getScx();
-
 
34692
 
-
 
34693
      }
-
 
34694
      throw new IllegalStateException();
-
 
34695
    }
-
 
34696
 
-
 
34697
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
34698
    public boolean isSet(_Fields field) {
-
 
34699
      if (field == null) {
-
 
34700
        throw new IllegalArgumentException();
-
 
34701
      }
-
 
34702
 
-
 
34703
      switch (field) {
-
 
34704
      case SUCCESS:
-
 
34705
        return isSetSuccess();
-
 
34706
      case SCX:
-
 
34707
        return isSetScx();
-
 
34708
      }
-
 
34709
      throw new IllegalStateException();
-
 
34710
    }
-
 
34711
 
-
 
34712
    @Override
-
 
34713
    public boolean equals(Object that) {
-
 
34714
      if (that == null)
-
 
34715
        return false;
-
 
34716
      if (that instanceof createCart_result)
-
 
34717
        return this.equals((createCart_result)that);
-
 
34718
      return false;
-
 
34719
    }
-
 
34720
 
-
 
34721
    public boolean equals(createCart_result that) {
-
 
34722
      if (that == null)
-
 
34723
        return false;
-
 
34724
 
-
 
34725
      boolean this_present_success = true;
-
 
34726
      boolean that_present_success = true;
-
 
34727
      if (this_present_success || that_present_success) {
-
 
34728
        if (!(this_present_success && that_present_success))
-
 
34729
          return false;
-
 
34730
        if (this.success != that.success)
-
 
34731
          return false;
-
 
34732
      }
-
 
34733
 
-
 
34734
      boolean this_present_scx = true && this.isSetScx();
-
 
34735
      boolean that_present_scx = true && that.isSetScx();
-
 
34736
      if (this_present_scx || that_present_scx) {
-
 
34737
        if (!(this_present_scx && that_present_scx))
-
 
34738
          return false;
-
 
34739
        if (!this.scx.equals(that.scx))
-
 
34740
          return false;
-
 
34741
      }
-
 
34742
 
-
 
34743
      return true;
-
 
34744
    }
-
 
34745
 
-
 
34746
    @Override
-
 
34747
    public int hashCode() {
-
 
34748
      return 0;
-
 
34749
    }
-
 
34750
 
-
 
34751
    public int compareTo(createCart_result other) {
-
 
34752
      if (!getClass().equals(other.getClass())) {
-
 
34753
        return getClass().getName().compareTo(other.getClass().getName());
-
 
34754
      }
-
 
34755
 
-
 
34756
      int lastComparison = 0;
-
 
34757
      createCart_result typedOther = (createCart_result)other;
-
 
34758
 
-
 
34759
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
34760
      if (lastComparison != 0) {
-
 
34761
        return lastComparison;
-
 
34762
      }
-
 
34763
      if (isSetSuccess()) {
-
 
34764
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
34765
        if (lastComparison != 0) {
-
 
34766
          return lastComparison;
-
 
34767
        }
-
 
34768
      }
-
 
34769
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
-
 
34770
      if (lastComparison != 0) {
-
 
34771
        return lastComparison;
-
 
34772
      }
-
 
34773
      if (isSetScx()) {
-
 
34774
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
-
 
34775
        if (lastComparison != 0) {
-
 
34776
          return lastComparison;
-
 
34777
        }
-
 
34778
      }
-
 
34779
      return 0;
-
 
34780
    }
-
 
34781
 
-
 
34782
    public _Fields fieldForId(int fieldId) {
-
 
34783
      return _Fields.findByThriftId(fieldId);
-
 
34784
    }
-
 
34785
 
-
 
34786
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
34787
      org.apache.thrift.protocol.TField field;
-
 
34788
      iprot.readStructBegin();
-
 
34789
      while (true)
-
 
34790
      {
-
 
34791
        field = iprot.readFieldBegin();
-
 
34792
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
34793
          break;
-
 
34794
        }
-
 
34795
        switch (field.id) {
-
 
34796
          case 0: // SUCCESS
-
 
34797
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
34798
              this.success = iprot.readI64();
-
 
34799
              setSuccessIsSet(true);
-
 
34800
            } else { 
-
 
34801
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
34802
            }
-
 
34803
            break;
-
 
34804
          case 1: // SCX
-
 
34805
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
34806
              this.scx = new ShoppingCartException();
-
 
34807
              this.scx.read(iprot);
-
 
34808
            } else { 
-
 
34809
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
34810
            }
-
 
34811
            break;
-
 
34812
          default:
-
 
34813
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
34814
        }
-
 
34815
        iprot.readFieldEnd();
-
 
34816
      }
-
 
34817
      iprot.readStructEnd();
-
 
34818
      validate();
-
 
34819
    }
-
 
34820
 
-
 
34821
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
34822
      oprot.writeStructBegin(STRUCT_DESC);
-
 
34823
 
-
 
34824
      if (this.isSetSuccess()) {
-
 
34825
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
34826
        oprot.writeI64(this.success);
-
 
34827
        oprot.writeFieldEnd();
-
 
34828
      } else if (this.isSetScx()) {
-
 
34829
        oprot.writeFieldBegin(SCX_FIELD_DESC);
-
 
34830
        this.scx.write(oprot);
-
 
34831
        oprot.writeFieldEnd();
-
 
34832
      }
-
 
34833
      oprot.writeFieldStop();
-
 
34834
      oprot.writeStructEnd();
-
 
34835
    }
-
 
34836
 
-
 
34837
    @Override
-
 
34838
    public String toString() {
-
 
34839
      StringBuilder sb = new StringBuilder("createCart_result(");
-
 
34840
      boolean first = true;
-
 
34841
 
-
 
34842
      sb.append("success:");
-
 
34843
      sb.append(this.success);
-
 
34844
      first = false;
-
 
34845
      if (!first) sb.append(", ");
-
 
34846
      sb.append("scx:");
-
 
34847
      if (this.scx == null) {
-
 
34848
        sb.append("null");
-
 
34849
      } else {
-
 
34850
        sb.append(this.scx);
-
 
34851
      }
-
 
34852
      first = false;
-
 
34853
      sb.append(")");
-
 
34854
      return sb.toString();
-
 
34855
    }
-
 
34856
 
34097
 
34857
    public void validate() throws org.apache.thrift.TException {
34098
    public void validate() throws org.apache.thrift.TException {
34858
      // check for required fields
34099
      // check for required fields
34859
    }
34100
    }
34860
 
34101