Subversion Repositories SmartDukaan

Rev

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

Rev 22359 Rev 22365
Line 49... Line 49...
49
 
49
 
50
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, org.apache.thrift.TException;
50
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, org.apache.thrift.TException;
51
 
51
 
52
    public boolean updateAddress(Address address) throws UserContextException, org.apache.thrift.TException;
52
    public boolean updateAddress(Address address) throws UserContextException, org.apache.thrift.TException;
53
 
53
 
-
 
54
    public boolean updateCounter(Counter counter) throws UserContextException, org.apache.thrift.TException;
-
 
55
 
54
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, org.apache.thrift.TException;
56
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, org.apache.thrift.TException;
55
 
57
 
56
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, org.apache.thrift.TException;
58
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, org.apache.thrift.TException;
57
 
59
 
58
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, org.apache.thrift.TException;
60
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, org.apache.thrift.TException;
Line 418... Line 420...
418
 
420
 
419
    public void removeAddressForUser(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeAddressForUser_call> resultHandler) throws org.apache.thrift.TException;
421
    public void removeAddressForUser(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeAddressForUser_call> resultHandler) throws org.apache.thrift.TException;
420
 
422
 
421
    public void updateAddress(Address address, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateAddress_call> resultHandler) throws org.apache.thrift.TException;
423
    public void updateAddress(Address address, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateAddress_call> resultHandler) throws org.apache.thrift.TException;
422
 
424
 
-
 
425
    public void updateCounter(Counter counter, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateCounter_call> resultHandler) throws org.apache.thrift.TException;
-
 
426
 
423
    public void setUserAsLoggedIn(long userId, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setUserAsLoggedIn_call> resultHandler) throws org.apache.thrift.TException;
427
    public void setUserAsLoggedIn(long userId, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setUserAsLoggedIn_call> resultHandler) throws org.apache.thrift.TException;
424
 
428
 
425
    public void setUserAsLoggedOut(long userid, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setUserAsLoggedOut_call> resultHandler) throws org.apache.thrift.TException;
429
    public void setUserAsLoggedOut(long userid, long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setUserAsLoggedOut_call> resultHandler) throws org.apache.thrift.TException;
426
 
430
 
427
    public void setDefaultAddress(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setDefaultAddress_call> resultHandler) throws org.apache.thrift.TException;
431
    public void setDefaultAddress(long userid, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.setDefaultAddress_call> resultHandler) throws org.apache.thrift.TException;
Line 922... Line 926...
922
        throw result.ucx;
926
        throw result.ucx;
923
      }
927
      }
924
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateAddress failed: unknown result");
928
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateAddress failed: unknown result");
925
    }
929
    }
926
 
930
 
-
 
931
    public boolean updateCounter(Counter counter) throws UserContextException, org.apache.thrift.TException
-
 
932
    {
-
 
933
      send_updateCounter(counter);
-
 
934
      return recv_updateCounter();
-
 
935
    }
-
 
936
 
-
 
937
    public void send_updateCounter(Counter counter) throws org.apache.thrift.TException
-
 
938
    {
-
 
939
      updateCounter_args args = new updateCounter_args();
-
 
940
      args.setCounter(counter);
-
 
941
      sendBase("updateCounter", args);
-
 
942
    }
-
 
943
 
-
 
944
    public boolean recv_updateCounter() throws UserContextException, org.apache.thrift.TException
-
 
945
    {
-
 
946
      updateCounter_result result = new updateCounter_result();
-
 
947
      receiveBase(result, "updateCounter");
-
 
948
      if (result.isSetSuccess()) {
-
 
949
        return result.success;
-
 
950
      }
-
 
951
      if (result.ucx != null) {
-
 
952
        throw result.ucx;
-
 
953
      }
-
 
954
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateCounter failed: unknown result");
-
 
955
    }
-
 
956
 
927
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, org.apache.thrift.TException
957
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, org.apache.thrift.TException
928
    {
958
    {
929
      send_setUserAsLoggedIn(userId, timestamp);
959
      send_setUserAsLoggedIn(userId, timestamp);
930
      return recv_setUserAsLoggedIn();
960
      return recv_setUserAsLoggedIn();
931
    }
961
    }
Line 3420... Line 3450...
3420
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3450
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3421
        return (new Client(prot)).recv_updateAddress();
3451
        return (new Client(prot)).recv_updateAddress();
3422
      }
3452
      }
3423
    }
3453
    }
3424
 
3454
 
-
 
3455
    public void updateCounter(Counter counter, org.apache.thrift.async.AsyncMethodCallback<updateCounter_call> resultHandler) throws org.apache.thrift.TException {
-
 
3456
      checkReady();
-
 
3457
      updateCounter_call method_call = new updateCounter_call(counter, resultHandler, this, ___protocolFactory, ___transport);
-
 
3458
      this.___currentMethod = method_call;
-
 
3459
      ___manager.call(method_call);
-
 
3460
    }
-
 
3461
 
-
 
3462
    public static class updateCounter_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
3463
      private Counter counter;
-
 
3464
      public updateCounter_call(Counter counter, org.apache.thrift.async.AsyncMethodCallback<updateCounter_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 {
-
 
3465
        super(client, protocolFactory, transport, resultHandler, false);
-
 
3466
        this.counter = counter;
-
 
3467
      }
-
 
3468
 
-
 
3469
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
3470
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateCounter", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
3471
        updateCounter_args args = new updateCounter_args();
-
 
3472
        args.setCounter(counter);
-
 
3473
        args.write(prot);
-
 
3474
        prot.writeMessageEnd();
-
 
3475
      }
-
 
3476
 
-
 
3477
      public boolean getResult() throws UserContextException, org.apache.thrift.TException {
-
 
3478
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
3479
          throw new IllegalStateException("Method call not finished!");
-
 
3480
        }
-
 
3481
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
3482
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
3483
        return (new Client(prot)).recv_updateCounter();
-
 
3484
      }
-
 
3485
    }
-
 
3486
 
3425
    public void setUserAsLoggedIn(long userId, long timestamp, org.apache.thrift.async.AsyncMethodCallback<setUserAsLoggedIn_call> resultHandler) throws org.apache.thrift.TException {
3487
    public void setUserAsLoggedIn(long userId, long timestamp, org.apache.thrift.async.AsyncMethodCallback<setUserAsLoggedIn_call> resultHandler) throws org.apache.thrift.TException {
3426
      checkReady();
3488
      checkReady();
3427
      setUserAsLoggedIn_call method_call = new setUserAsLoggedIn_call(userId, timestamp, resultHandler, this, ___protocolFactory, ___transport);
3489
      setUserAsLoggedIn_call method_call = new setUserAsLoggedIn_call(userId, timestamp, resultHandler, this, ___protocolFactory, ___transport);
3428
      this.___currentMethod = method_call;
3490
      this.___currentMethod = method_call;
3429
      ___manager.call(method_call);
3491
      ___manager.call(method_call);
Line 6316... Line 6378...
6316
      processMap.put("authenticateUser", new authenticateUser());
6378
      processMap.put("authenticateUser", new authenticateUser());
6317
      processMap.put("userExists", new userExists());
6379
      processMap.put("userExists", new userExists());
6318
      processMap.put("addAddressForUser", new addAddressForUser());
6380
      processMap.put("addAddressForUser", new addAddressForUser());
6319
      processMap.put("removeAddressForUser", new removeAddressForUser());
6381
      processMap.put("removeAddressForUser", new removeAddressForUser());
6320
      processMap.put("updateAddress", new updateAddress());
6382
      processMap.put("updateAddress", new updateAddress());
-
 
6383
      processMap.put("updateCounter", new updateCounter());
6321
      processMap.put("setUserAsLoggedIn", new setUserAsLoggedIn());
6384
      processMap.put("setUserAsLoggedIn", new setUserAsLoggedIn());
6322
      processMap.put("setUserAsLoggedOut", new setUserAsLoggedOut());
6385
      processMap.put("setUserAsLoggedOut", new setUserAsLoggedOut());
6323
      processMap.put("setDefaultAddress", new setDefaultAddress());
6386
      processMap.put("setDefaultAddress", new setDefaultAddress());
6324
      processMap.put("updatePassword", new updatePassword());
6387
      processMap.put("updatePassword", new updatePassword());
6325
      processMap.put("forgotPassword", new forgotPassword());
6388
      processMap.put("forgotPassword", new forgotPassword());
Line 6646... Line 6709...
6646
        }
6709
        }
6647
        return result;
6710
        return result;
6648
      }
6711
      }
6649
    }
6712
    }
6650
 
6713
 
-
 
6714
    private static class updateCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateCounter_args> {
-
 
6715
      public updateCounter() {
-
 
6716
        super("updateCounter");
-
 
6717
      }
-
 
6718
 
-
 
6719
      protected updateCounter_args getEmptyArgsInstance() {
-
 
6720
        return new updateCounter_args();
-
 
6721
      }
-
 
6722
 
-
 
6723
      protected updateCounter_result getResult(I iface, updateCounter_args args) throws org.apache.thrift.TException {
-
 
6724
        updateCounter_result result = new updateCounter_result();
-
 
6725
        try {
-
 
6726
          result.success = iface.updateCounter(args.counter);
-
 
6727
          result.setSuccessIsSet(true);
-
 
6728
        } catch (UserContextException ucx) {
-
 
6729
          result.ucx = ucx;
-
 
6730
        }
-
 
6731
        return result;
-
 
6732
      }
-
 
6733
    }
-
 
6734
 
6651
    private static class setUserAsLoggedIn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUserAsLoggedIn_args> {
6735
    private static class setUserAsLoggedIn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUserAsLoggedIn_args> {
6652
      public setUserAsLoggedIn() {
6736
      public setUserAsLoggedIn() {
6653
        super("setUserAsLoggedIn");
6737
        super("setUserAsLoggedIn");
6654
      }
6738
      }
6655
 
6739
 
Line 16655... Line 16739...
16655
      }
16739
      }
16656
    }
16740
    }
16657
 
16741
 
16658
  }
16742
  }
16659
 
16743
 
-
 
16744
  public static class updateCounter_args implements org.apache.thrift.TBase<updateCounter_args, updateCounter_args._Fields>, java.io.Serializable, Cloneable   {
-
 
16745
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateCounter_args");
-
 
16746
 
-
 
16747
    private static final org.apache.thrift.protocol.TField COUNTER_FIELD_DESC = new org.apache.thrift.protocol.TField("counter", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
16748
 
-
 
16749
    private Counter counter; // required
-
 
16750
 
-
 
16751
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
16752
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
16753
      COUNTER((short)1, "counter");
-
 
16754
 
-
 
16755
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
16756
 
-
 
16757
      static {
-
 
16758
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
16759
          byName.put(field.getFieldName(), field);
-
 
16760
        }
-
 
16761
      }
-
 
16762
 
-
 
16763
      /**
-
 
16764
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
16765
       */
-
 
16766
      public static _Fields findByThriftId(int fieldId) {
-
 
16767
        switch(fieldId) {
-
 
16768
          case 1: // COUNTER
-
 
16769
            return COUNTER;
-
 
16770
          default:
-
 
16771
            return null;
-
 
16772
        }
-
 
16773
      }
-
 
16774
 
-
 
16775
      /**
-
 
16776
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
16777
       * if it is not found.
-
 
16778
       */
-
 
16779
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
16780
        _Fields fields = findByThriftId(fieldId);
-
 
16781
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
16782
        return fields;
-
 
16783
      }
-
 
16784
 
-
 
16785
      /**
-
 
16786
       * Find the _Fields constant that matches name, or null if its not found.
-
 
16787
       */
-
 
16788
      public static _Fields findByName(String name) {
-
 
16789
        return byName.get(name);
-
 
16790
      }
-
 
16791
 
-
 
16792
      private final short _thriftId;
-
 
16793
      private final String _fieldName;
-
 
16794
 
-
 
16795
      _Fields(short thriftId, String fieldName) {
-
 
16796
        _thriftId = thriftId;
-
 
16797
        _fieldName = fieldName;
-
 
16798
      }
-
 
16799
 
-
 
16800
      public short getThriftFieldId() {
-
 
16801
        return _thriftId;
-
 
16802
      }
-
 
16803
 
-
 
16804
      public String getFieldName() {
-
 
16805
        return _fieldName;
-
 
16806
      }
-
 
16807
    }
-
 
16808
 
-
 
16809
    // isset id assignments
-
 
16810
 
-
 
16811
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
16812
    static {
-
 
16813
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
16814
      tmpMap.put(_Fields.COUNTER, new org.apache.thrift.meta_data.FieldMetaData("counter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
16815
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Counter.class)));
-
 
16816
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
16817
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateCounter_args.class, metaDataMap);
-
 
16818
    }
-
 
16819
 
-
 
16820
    public updateCounter_args() {
-
 
16821
    }
-
 
16822
 
-
 
16823
    public updateCounter_args(
-
 
16824
      Counter counter)
-
 
16825
    {
-
 
16826
      this();
-
 
16827
      this.counter = counter;
-
 
16828
    }
-
 
16829
 
-
 
16830
    /**
-
 
16831
     * Performs a deep copy on <i>other</i>.
-
 
16832
     */
-
 
16833
    public updateCounter_args(updateCounter_args other) {
-
 
16834
      if (other.isSetCounter()) {
-
 
16835
        this.counter = new Counter(other.counter);
-
 
16836
      }
-
 
16837
    }
-
 
16838
 
-
 
16839
    public updateCounter_args deepCopy() {
-
 
16840
      return new updateCounter_args(this);
-
 
16841
    }
-
 
16842
 
-
 
16843
    @Override
-
 
16844
    public void clear() {
-
 
16845
      this.counter = null;
-
 
16846
    }
-
 
16847
 
-
 
16848
    public Counter getCounter() {
-
 
16849
      return this.counter;
-
 
16850
    }
-
 
16851
 
-
 
16852
    public void setCounter(Counter counter) {
-
 
16853
      this.counter = counter;
-
 
16854
    }
-
 
16855
 
-
 
16856
    public void unsetCounter() {
-
 
16857
      this.counter = null;
-
 
16858
    }
-
 
16859
 
-
 
16860
    /** Returns true if field counter is set (has been assigned a value) and false otherwise */
-
 
16861
    public boolean isSetCounter() {
-
 
16862
      return this.counter != null;
-
 
16863
    }
-
 
16864
 
-
 
16865
    public void setCounterIsSet(boolean value) {
-
 
16866
      if (!value) {
-
 
16867
        this.counter = null;
-
 
16868
      }
-
 
16869
    }
-
 
16870
 
-
 
16871
    public void setFieldValue(_Fields field, Object value) {
-
 
16872
      switch (field) {
-
 
16873
      case COUNTER:
-
 
16874
        if (value == null) {
-
 
16875
          unsetCounter();
-
 
16876
        } else {
-
 
16877
          setCounter((Counter)value);
-
 
16878
        }
-
 
16879
        break;
-
 
16880
 
-
 
16881
      }
-
 
16882
    }
-
 
16883
 
-
 
16884
    public Object getFieldValue(_Fields field) {
-
 
16885
      switch (field) {
-
 
16886
      case COUNTER:
-
 
16887
        return getCounter();
-
 
16888
 
-
 
16889
      }
-
 
16890
      throw new IllegalStateException();
-
 
16891
    }
-
 
16892
 
-
 
16893
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
16894
    public boolean isSet(_Fields field) {
-
 
16895
      if (field == null) {
-
 
16896
        throw new IllegalArgumentException();
-
 
16897
      }
-
 
16898
 
-
 
16899
      switch (field) {
-
 
16900
      case COUNTER:
-
 
16901
        return isSetCounter();
-
 
16902
      }
-
 
16903
      throw new IllegalStateException();
-
 
16904
    }
-
 
16905
 
-
 
16906
    @Override
-
 
16907
    public boolean equals(Object that) {
-
 
16908
      if (that == null)
-
 
16909
        return false;
-
 
16910
      if (that instanceof updateCounter_args)
-
 
16911
        return this.equals((updateCounter_args)that);
-
 
16912
      return false;
-
 
16913
    }
-
 
16914
 
-
 
16915
    public boolean equals(updateCounter_args that) {
-
 
16916
      if (that == null)
-
 
16917
        return false;
-
 
16918
 
-
 
16919
      boolean this_present_counter = true && this.isSetCounter();
-
 
16920
      boolean that_present_counter = true && that.isSetCounter();
-
 
16921
      if (this_present_counter || that_present_counter) {
-
 
16922
        if (!(this_present_counter && that_present_counter))
-
 
16923
          return false;
-
 
16924
        if (!this.counter.equals(that.counter))
-
 
16925
          return false;
-
 
16926
      }
-
 
16927
 
-
 
16928
      return true;
-
 
16929
    }
-
 
16930
 
-
 
16931
    @Override
-
 
16932
    public int hashCode() {
-
 
16933
      return 0;
-
 
16934
    }
-
 
16935
 
-
 
16936
    public int compareTo(updateCounter_args other) {
-
 
16937
      if (!getClass().equals(other.getClass())) {
-
 
16938
        return getClass().getName().compareTo(other.getClass().getName());
-
 
16939
      }
-
 
16940
 
-
 
16941
      int lastComparison = 0;
-
 
16942
      updateCounter_args typedOther = (updateCounter_args)other;
-
 
16943
 
-
 
16944
      lastComparison = Boolean.valueOf(isSetCounter()).compareTo(typedOther.isSetCounter());
-
 
16945
      if (lastComparison != 0) {
-
 
16946
        return lastComparison;
-
 
16947
      }
-
 
16948
      if (isSetCounter()) {
-
 
16949
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counter, typedOther.counter);
-
 
16950
        if (lastComparison != 0) {
-
 
16951
          return lastComparison;
-
 
16952
        }
-
 
16953
      }
-
 
16954
      return 0;
-
 
16955
    }
-
 
16956
 
-
 
16957
    public _Fields fieldForId(int fieldId) {
-
 
16958
      return _Fields.findByThriftId(fieldId);
-
 
16959
    }
-
 
16960
 
-
 
16961
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
16962
      org.apache.thrift.protocol.TField field;
-
 
16963
      iprot.readStructBegin();
-
 
16964
      while (true)
-
 
16965
      {
-
 
16966
        field = iprot.readFieldBegin();
-
 
16967
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
16968
          break;
-
 
16969
        }
-
 
16970
        switch (field.id) {
-
 
16971
          case 1: // COUNTER
-
 
16972
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
16973
              this.counter = new Counter();
-
 
16974
              this.counter.read(iprot);
-
 
16975
            } else { 
-
 
16976
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
16977
            }
-
 
16978
            break;
-
 
16979
          default:
-
 
16980
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
16981
        }
-
 
16982
        iprot.readFieldEnd();
-
 
16983
      }
-
 
16984
      iprot.readStructEnd();
-
 
16985
      validate();
-
 
16986
    }
-
 
16987
 
-
 
16988
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
16989
      validate();
-
 
16990
 
-
 
16991
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16992
      if (this.counter != null) {
-
 
16993
        oprot.writeFieldBegin(COUNTER_FIELD_DESC);
-
 
16994
        this.counter.write(oprot);
-
 
16995
        oprot.writeFieldEnd();
-
 
16996
      }
-
 
16997
      oprot.writeFieldStop();
-
 
16998
      oprot.writeStructEnd();
-
 
16999
    }
-
 
17000
 
-
 
17001
    @Override
-
 
17002
    public String toString() {
-
 
17003
      StringBuilder sb = new StringBuilder("updateCounter_args(");
-
 
17004
      boolean first = true;
-
 
17005
 
-
 
17006
      sb.append("counter:");
-
 
17007
      if (this.counter == null) {
-
 
17008
        sb.append("null");
-
 
17009
      } else {
-
 
17010
        sb.append(this.counter);
-
 
17011
      }
-
 
17012
      first = false;
-
 
17013
      sb.append(")");
-
 
17014
      return sb.toString();
-
 
17015
    }
-
 
17016
 
-
 
17017
    public void validate() throws org.apache.thrift.TException {
-
 
17018
      // check for required fields
-
 
17019
    }
-
 
17020
 
-
 
17021
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
17022
      try {
-
 
17023
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
17024
      } catch (org.apache.thrift.TException te) {
-
 
17025
        throw new java.io.IOException(te);
-
 
17026
      }
-
 
17027
    }
-
 
17028
 
-
 
17029
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
17030
      try {
-
 
17031
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
17032
      } catch (org.apache.thrift.TException te) {
-
 
17033
        throw new java.io.IOException(te);
-
 
17034
      }
-
 
17035
    }
-
 
17036
 
-
 
17037
  }
-
 
17038
 
-
 
17039
  public static class updateCounter_result implements org.apache.thrift.TBase<updateCounter_result, updateCounter_result._Fields>, java.io.Serializable, Cloneable   {
-
 
17040
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateCounter_result");
-
 
17041
 
-
 
17042
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
 
17043
    private static final org.apache.thrift.protocol.TField UCX_FIELD_DESC = new org.apache.thrift.protocol.TField("ucx", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
17044
 
-
 
17045
    private boolean success; // required
-
 
17046
    private UserContextException ucx; // required
-
 
17047
 
-
 
17048
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
17049
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
17050
      SUCCESS((short)0, "success"),
-
 
17051
      UCX((short)1, "ucx");
-
 
17052
 
-
 
17053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
17054
 
-
 
17055
      static {
-
 
17056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
17057
          byName.put(field.getFieldName(), field);
-
 
17058
        }
-
 
17059
      }
-
 
17060
 
-
 
17061
      /**
-
 
17062
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
17063
       */
-
 
17064
      public static _Fields findByThriftId(int fieldId) {
-
 
17065
        switch(fieldId) {
-
 
17066
          case 0: // SUCCESS
-
 
17067
            return SUCCESS;
-
 
17068
          case 1: // UCX
-
 
17069
            return UCX;
-
 
17070
          default:
-
 
17071
            return null;
-
 
17072
        }
-
 
17073
      }
-
 
17074
 
-
 
17075
      /**
-
 
17076
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
17077
       * if it is not found.
-
 
17078
       */
-
 
17079
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
17080
        _Fields fields = findByThriftId(fieldId);
-
 
17081
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
17082
        return fields;
-
 
17083
      }
-
 
17084
 
-
 
17085
      /**
-
 
17086
       * Find the _Fields constant that matches name, or null if its not found.
-
 
17087
       */
-
 
17088
      public static _Fields findByName(String name) {
-
 
17089
        return byName.get(name);
-
 
17090
      }
-
 
17091
 
-
 
17092
      private final short _thriftId;
-
 
17093
      private final String _fieldName;
-
 
17094
 
-
 
17095
      _Fields(short thriftId, String fieldName) {
-
 
17096
        _thriftId = thriftId;
-
 
17097
        _fieldName = fieldName;
-
 
17098
      }
-
 
17099
 
-
 
17100
      public short getThriftFieldId() {
-
 
17101
        return _thriftId;
-
 
17102
      }
-
 
17103
 
-
 
17104
      public String getFieldName() {
-
 
17105
        return _fieldName;
-
 
17106
      }
-
 
17107
    }
-
 
17108
 
-
 
17109
    // isset id assignments
-
 
17110
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
17111
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
17112
 
-
 
17113
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
17114
    static {
-
 
17115
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
17116
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
17117
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
17118
      tmpMap.put(_Fields.UCX, new org.apache.thrift.meta_data.FieldMetaData("ucx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
17119
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
17120
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
17121
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateCounter_result.class, metaDataMap);
-
 
17122
    }
-
 
17123
 
-
 
17124
    public updateCounter_result() {
-
 
17125
    }
-
 
17126
 
-
 
17127
    public updateCounter_result(
-
 
17128
      boolean success,
-
 
17129
      UserContextException ucx)
-
 
17130
    {
-
 
17131
      this();
-
 
17132
      this.success = success;
-
 
17133
      setSuccessIsSet(true);
-
 
17134
      this.ucx = ucx;
-
 
17135
    }
-
 
17136
 
-
 
17137
    /**
-
 
17138
     * Performs a deep copy on <i>other</i>.
-
 
17139
     */
-
 
17140
    public updateCounter_result(updateCounter_result other) {
-
 
17141
      __isset_bit_vector.clear();
-
 
17142
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
17143
      this.success = other.success;
-
 
17144
      if (other.isSetUcx()) {
-
 
17145
        this.ucx = new UserContextException(other.ucx);
-
 
17146
      }
-
 
17147
    }
-
 
17148
 
-
 
17149
    public updateCounter_result deepCopy() {
-
 
17150
      return new updateCounter_result(this);
-
 
17151
    }
-
 
17152
 
-
 
17153
    @Override
-
 
17154
    public void clear() {
-
 
17155
      setSuccessIsSet(false);
-
 
17156
      this.success = false;
-
 
17157
      this.ucx = null;
-
 
17158
    }
-
 
17159
 
-
 
17160
    public boolean isSuccess() {
-
 
17161
      return this.success;
-
 
17162
    }
-
 
17163
 
-
 
17164
    public void setSuccess(boolean success) {
-
 
17165
      this.success = success;
-
 
17166
      setSuccessIsSet(true);
-
 
17167
    }
-
 
17168
 
-
 
17169
    public void unsetSuccess() {
-
 
17170
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
17171
    }
-
 
17172
 
-
 
17173
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
17174
    public boolean isSetSuccess() {
-
 
17175
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
17176
    }
-
 
17177
 
-
 
17178
    public void setSuccessIsSet(boolean value) {
-
 
17179
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
17180
    }
-
 
17181
 
-
 
17182
    public UserContextException getUcx() {
-
 
17183
      return this.ucx;
-
 
17184
    }
-
 
17185
 
-
 
17186
    public void setUcx(UserContextException ucx) {
-
 
17187
      this.ucx = ucx;
-
 
17188
    }
-
 
17189
 
-
 
17190
    public void unsetUcx() {
-
 
17191
      this.ucx = null;
-
 
17192
    }
-
 
17193
 
-
 
17194
    /** Returns true if field ucx is set (has been assigned a value) and false otherwise */
-
 
17195
    public boolean isSetUcx() {
-
 
17196
      return this.ucx != null;
-
 
17197
    }
-
 
17198
 
-
 
17199
    public void setUcxIsSet(boolean value) {
-
 
17200
      if (!value) {
-
 
17201
        this.ucx = null;
-
 
17202
      }
-
 
17203
    }
-
 
17204
 
-
 
17205
    public void setFieldValue(_Fields field, Object value) {
-
 
17206
      switch (field) {
-
 
17207
      case SUCCESS:
-
 
17208
        if (value == null) {
-
 
17209
          unsetSuccess();
-
 
17210
        } else {
-
 
17211
          setSuccess((Boolean)value);
-
 
17212
        }
-
 
17213
        break;
-
 
17214
 
-
 
17215
      case UCX:
-
 
17216
        if (value == null) {
-
 
17217
          unsetUcx();
-
 
17218
        } else {
-
 
17219
          setUcx((UserContextException)value);
-
 
17220
        }
-
 
17221
        break;
-
 
17222
 
-
 
17223
      }
-
 
17224
    }
-
 
17225
 
-
 
17226
    public Object getFieldValue(_Fields field) {
-
 
17227
      switch (field) {
-
 
17228
      case SUCCESS:
-
 
17229
        return Boolean.valueOf(isSuccess());
-
 
17230
 
-
 
17231
      case UCX:
-
 
17232
        return getUcx();
-
 
17233
 
-
 
17234
      }
-
 
17235
      throw new IllegalStateException();
-
 
17236
    }
-
 
17237
 
-
 
17238
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
17239
    public boolean isSet(_Fields field) {
-
 
17240
      if (field == null) {
-
 
17241
        throw new IllegalArgumentException();
-
 
17242
      }
-
 
17243
 
-
 
17244
      switch (field) {
-
 
17245
      case SUCCESS:
-
 
17246
        return isSetSuccess();
-
 
17247
      case UCX:
-
 
17248
        return isSetUcx();
-
 
17249
      }
-
 
17250
      throw new IllegalStateException();
-
 
17251
    }
-
 
17252
 
-
 
17253
    @Override
-
 
17254
    public boolean equals(Object that) {
-
 
17255
      if (that == null)
-
 
17256
        return false;
-
 
17257
      if (that instanceof updateCounter_result)
-
 
17258
        return this.equals((updateCounter_result)that);
-
 
17259
      return false;
-
 
17260
    }
-
 
17261
 
-
 
17262
    public boolean equals(updateCounter_result that) {
-
 
17263
      if (that == null)
-
 
17264
        return false;
-
 
17265
 
-
 
17266
      boolean this_present_success = true;
-
 
17267
      boolean that_present_success = true;
-
 
17268
      if (this_present_success || that_present_success) {
-
 
17269
        if (!(this_present_success && that_present_success))
-
 
17270
          return false;
-
 
17271
        if (this.success != that.success)
-
 
17272
          return false;
-
 
17273
      }
-
 
17274
 
-
 
17275
      boolean this_present_ucx = true && this.isSetUcx();
-
 
17276
      boolean that_present_ucx = true && that.isSetUcx();
-
 
17277
      if (this_present_ucx || that_present_ucx) {
-
 
17278
        if (!(this_present_ucx && that_present_ucx))
-
 
17279
          return false;
-
 
17280
        if (!this.ucx.equals(that.ucx))
-
 
17281
          return false;
-
 
17282
      }
-
 
17283
 
-
 
17284
      return true;
-
 
17285
    }
-
 
17286
 
-
 
17287
    @Override
-
 
17288
    public int hashCode() {
-
 
17289
      return 0;
-
 
17290
    }
-
 
17291
 
-
 
17292
    public int compareTo(updateCounter_result other) {
-
 
17293
      if (!getClass().equals(other.getClass())) {
-
 
17294
        return getClass().getName().compareTo(other.getClass().getName());
-
 
17295
      }
-
 
17296
 
-
 
17297
      int lastComparison = 0;
-
 
17298
      updateCounter_result typedOther = (updateCounter_result)other;
-
 
17299
 
-
 
17300
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
17301
      if (lastComparison != 0) {
-
 
17302
        return lastComparison;
-
 
17303
      }
-
 
17304
      if (isSetSuccess()) {
-
 
17305
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
17306
        if (lastComparison != 0) {
-
 
17307
          return lastComparison;
-
 
17308
        }
-
 
17309
      }
-
 
17310
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(typedOther.isSetUcx());
-
 
17311
      if (lastComparison != 0) {
-
 
17312
        return lastComparison;
-
 
17313
      }
-
 
17314
      if (isSetUcx()) {
-
 
17315
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ucx, typedOther.ucx);
-
 
17316
        if (lastComparison != 0) {
-
 
17317
          return lastComparison;
-
 
17318
        }
-
 
17319
      }
-
 
17320
      return 0;
-
 
17321
    }
-
 
17322
 
-
 
17323
    public _Fields fieldForId(int fieldId) {
-
 
17324
      return _Fields.findByThriftId(fieldId);
-
 
17325
    }
-
 
17326
 
-
 
17327
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
17328
      org.apache.thrift.protocol.TField field;
-
 
17329
      iprot.readStructBegin();
-
 
17330
      while (true)
-
 
17331
      {
-
 
17332
        field = iprot.readFieldBegin();
-
 
17333
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
17334
          break;
-
 
17335
        }
-
 
17336
        switch (field.id) {
-
 
17337
          case 0: // SUCCESS
-
 
17338
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
17339
              this.success = iprot.readBool();
-
 
17340
              setSuccessIsSet(true);
-
 
17341
            } else { 
-
 
17342
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
17343
            }
-
 
17344
            break;
-
 
17345
          case 1: // UCX
-
 
17346
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
17347
              this.ucx = new UserContextException();
-
 
17348
              this.ucx.read(iprot);
-
 
17349
            } else { 
-
 
17350
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
17351
            }
-
 
17352
            break;
-
 
17353
          default:
-
 
17354
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
17355
        }
-
 
17356
        iprot.readFieldEnd();
-
 
17357
      }
-
 
17358
      iprot.readStructEnd();
-
 
17359
      validate();
-
 
17360
    }
-
 
17361
 
-
 
17362
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
17363
      oprot.writeStructBegin(STRUCT_DESC);
-
 
17364
 
-
 
17365
      if (this.isSetSuccess()) {
-
 
17366
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
17367
        oprot.writeBool(this.success);
-
 
17368
        oprot.writeFieldEnd();
-
 
17369
      } else if (this.isSetUcx()) {
-
 
17370
        oprot.writeFieldBegin(UCX_FIELD_DESC);
-
 
17371
        this.ucx.write(oprot);
-
 
17372
        oprot.writeFieldEnd();
-
 
17373
      }
-
 
17374
      oprot.writeFieldStop();
-
 
17375
      oprot.writeStructEnd();
-
 
17376
    }
-
 
17377
 
-
 
17378
    @Override
-
 
17379
    public String toString() {
-
 
17380
      StringBuilder sb = new StringBuilder("updateCounter_result(");
-
 
17381
      boolean first = true;
-
 
17382
 
-
 
17383
      sb.append("success:");
-
 
17384
      sb.append(this.success);
-
 
17385
      first = false;
-
 
17386
      if (!first) sb.append(", ");
-
 
17387
      sb.append("ucx:");
-
 
17388
      if (this.ucx == null) {
-
 
17389
        sb.append("null");
-
 
17390
      } else {
-
 
17391
        sb.append(this.ucx);
-
 
17392
      }
-
 
17393
      first = false;
-
 
17394
      sb.append(")");
-
 
17395
      return sb.toString();
-
 
17396
    }
-
 
17397
 
-
 
17398
    public void validate() throws org.apache.thrift.TException {
-
 
17399
      // check for required fields
-
 
17400
    }
-
 
17401
 
-
 
17402
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
17403
      try {
-
 
17404
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
17405
      } catch (org.apache.thrift.TException te) {
-
 
17406
        throw new java.io.IOException(te);
-
 
17407
      }
-
 
17408
    }
-
 
17409
 
-
 
17410
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
17411
      try {
-
 
17412
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
17413
      } catch (org.apache.thrift.TException te) {
-
 
17414
        throw new java.io.IOException(te);
-
 
17415
      }
-
 
17416
    }
-
 
17417
 
-
 
17418
  }
-
 
17419
 
16660
  public static class setUserAsLoggedIn_args implements org.apache.thrift.TBase<setUserAsLoggedIn_args, setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable   {
17420
  public static class setUserAsLoggedIn_args implements org.apache.thrift.TBase<setUserAsLoggedIn_args, setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable   {
16661
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserAsLoggedIn_args");
17421
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserAsLoggedIn_args");
16662
 
17422
 
16663
    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);
17423
    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);
16664
    private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)2);
17424
    private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)2);
Line 32465... Line 33225...
32465
      }
33225
      }
32466
    }
33226
    }
32467
 
33227
 
32468
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
33228
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
32469
      try {
33229
      try {
-
 
33230
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
33231
        __isset_bit_vector = new BitSet(1);
32470
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
33232
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
32471
      } catch (org.apache.thrift.TException te) {
33233
      } catch (org.apache.thrift.TException te) {
32472
        throw new java.io.IOException(te);
33234
        throw new java.io.IOException(te);
32473
      }
33235
      }
32474
    }
33236
    }
Line 56376... Line 57138...
56376
      }
57138
      }
56377
    }
57139
    }
56378
 
57140
 
56379
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
57141
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
56380
      try {
57142
      try {
-
 
57143
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
57144
        __isset_bit_vector = new BitSet(1);
56381
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
57145
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
56382
      } catch (org.apache.thrift.TException te) {
57146
      } catch (org.apache.thrift.TException te) {
56383
        throw new java.io.IOException(te);
57147
        throw new java.io.IOException(te);
56384
      }
57148
      }
56385
    }
57149
    }