Subversion Repositories SmartDukaan

Rev

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

Rev 9925 Rev 11751
Line 236... Line 236...
236
     * @param id
236
     * @param id
237
     * @param poStatus
237
     * @param poStatus
238
     */
238
     */
239
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
239
    public void changePOStatus(long id, POStatus poStatus) throws PurchaseServiceException, org.apache.thrift.TException;
240
 
240
 
-
 
241
    /**
-
 
242
     * Get Purchase Return from Id
-
 
243
     * 
-
 
244
     * @param id
-
 
245
     */
-
 
246
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException;
-
 
247
 
241
  }
248
  }
242
 
249
 
243
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
250
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
244
 
251
 
245
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
252
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
Line 298... Line 305...
298
 
305
 
299
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
306
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
300
 
307
 
301
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
308
    public void changePOStatus(long id, POStatus poStatus, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changePOStatus_call> resultHandler) throws org.apache.thrift.TException;
302
 
309
 
-
 
310
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
-
 
311
 
303
  }
312
  }
304
 
313
 
305
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
314
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
306
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
315
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
307
      public Factory() {}
316
      public Factory() {}
Line 1023... Line 1032...
1023
        throw result.e;
1032
        throw result.e;
1024
      }
1033
      }
1025
      return;
1034
      return;
1026
    }
1035
    }
1027
 
1036
 
-
 
1037
    public PurchaseReturn getPurchaseReturn(long id) throws PurchaseServiceException, org.apache.thrift.TException
-
 
1038
    {
-
 
1039
      send_getPurchaseReturn(id);
-
 
1040
      return recv_getPurchaseReturn();
-
 
1041
    }
-
 
1042
 
-
 
1043
    public void send_getPurchaseReturn(long id) throws org.apache.thrift.TException
-
 
1044
    {
-
 
1045
      getPurchaseReturn_args args = new getPurchaseReturn_args();
-
 
1046
      args.setId(id);
-
 
1047
      sendBase("getPurchaseReturn", args);
-
 
1048
    }
-
 
1049
 
-
 
1050
    public PurchaseReturn recv_getPurchaseReturn() throws PurchaseServiceException, org.apache.thrift.TException
-
 
1051
    {
-
 
1052
      getPurchaseReturn_result result = new getPurchaseReturn_result();
-
 
1053
      receiveBase(result, "getPurchaseReturn");
-
 
1054
      if (result.isSetSuccess()) {
-
 
1055
        return result.success;
-
 
1056
      }
-
 
1057
      if (result.e != null) {
-
 
1058
        throw result.e;
-
 
1059
      }
-
 
1060
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseReturn failed: unknown result");
-
 
1061
    }
-
 
1062
 
1028
  }
1063
  }
1029
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1064
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1030
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1065
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1031
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1066
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1032
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1067
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 2014... Line 2049...
2014
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2049
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
2015
        (new Client(prot)).recv_changePOStatus();
2050
        (new Client(prot)).recv_changePOStatus();
2016
      }
2051
      }
2017
    }
2052
    }
2018
 
2053
 
-
 
2054
    public void getPurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
-
 
2055
      checkReady();
-
 
2056
      getPurchaseReturn_call method_call = new getPurchaseReturn_call(id, resultHandler, this, ___protocolFactory, ___transport);
-
 
2057
      this.___currentMethod = method_call;
-
 
2058
      ___manager.call(method_call);
-
 
2059
    }
-
 
2060
 
-
 
2061
    public static class getPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
2062
      private long id;
-
 
2063
      public getPurchaseReturn_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseReturn_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 {
-
 
2064
        super(client, protocolFactory, transport, resultHandler, false);
-
 
2065
        this.id = id;
-
 
2066
      }
-
 
2067
 
-
 
2068
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
2069
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
2070
        getPurchaseReturn_args args = new getPurchaseReturn_args();
-
 
2071
        args.setId(id);
-
 
2072
        args.write(prot);
-
 
2073
        prot.writeMessageEnd();
-
 
2074
      }
-
 
2075
 
-
 
2076
      public PurchaseReturn getResult() throws PurchaseServiceException, org.apache.thrift.TException {
-
 
2077
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
2078
          throw new IllegalStateException("Method call not finished!");
-
 
2079
        }
-
 
2080
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
2081
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
2082
        return (new Client(prot)).recv_getPurchaseReturn();
-
 
2083
      }
-
 
2084
    }
-
 
2085
 
2019
  }
2086
  }
2020
 
2087
 
2021
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2088
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
2022
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2089
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2023
    public Processor(I iface) {
2090
    public Processor(I iface) {
Line 2056... Line 2123...
2056
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
2123
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
2057
      processMap.put("closePO", new closePO());
2124
      processMap.put("closePO", new closePO());
2058
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
2125
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
2059
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
2126
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
2060
      processMap.put("changePOStatus", new changePOStatus());
2127
      processMap.put("changePOStatus", new changePOStatus());
-
 
2128
      processMap.put("getPurchaseReturn", new getPurchaseReturn());
2061
      return processMap;
2129
      return processMap;
2062
    }
2130
    }
2063
 
2131
 
2064
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2132
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
2065
      public createPurchaseOrder() {
2133
      public createPurchaseOrder() {
Line 2597... Line 2665...
2597
        }
2665
        }
2598
        return result;
2666
        return result;
2599
      }
2667
      }
2600
    }
2668
    }
2601
 
2669
 
-
 
2670
    private static class getPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseReturn_args> {
-
 
2671
      public getPurchaseReturn() {
-
 
2672
        super("getPurchaseReturn");
-
 
2673
      }
-
 
2674
 
-
 
2675
      protected getPurchaseReturn_args getEmptyArgsInstance() {
-
 
2676
        return new getPurchaseReturn_args();
-
 
2677
      }
-
 
2678
 
-
 
2679
      protected getPurchaseReturn_result getResult(I iface, getPurchaseReturn_args args) throws org.apache.thrift.TException {
-
 
2680
        getPurchaseReturn_result result = new getPurchaseReturn_result();
-
 
2681
        try {
-
 
2682
          result.success = iface.getPurchaseReturn(args.id);
-
 
2683
        } catch (PurchaseServiceException e) {
-
 
2684
          result.e = e;
-
 
2685
        }
-
 
2686
        return result;
-
 
2687
      }
-
 
2688
    }
-
 
2689
 
2602
  }
2690
  }
2603
 
2691
 
2604
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2692
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2605
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2693
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2606
 
2694
 
Line 21807... Line 21895...
21807
      sb.append("e:");
21895
      sb.append("e:");
21808
      if (this.e == null) {
21896
      if (this.e == null) {
21809
        sb.append("null");
21897
        sb.append("null");
21810
      } else {
21898
      } else {
21811
        sb.append(this.e);
21899
        sb.append(this.e);
-
 
21900
      }
-
 
21901
      first = false;
-
 
21902
      sb.append(")");
-
 
21903
      return sb.toString();
-
 
21904
    }
-
 
21905
 
-
 
21906
    public void validate() throws org.apache.thrift.TException {
-
 
21907
      // check for required fields
-
 
21908
    }
-
 
21909
 
-
 
21910
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
21911
      try {
-
 
21912
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
21913
      } catch (org.apache.thrift.TException te) {
-
 
21914
        throw new java.io.IOException(te);
-
 
21915
      }
-
 
21916
    }
-
 
21917
 
-
 
21918
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
21919
      try {
-
 
21920
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
21921
      } catch (org.apache.thrift.TException te) {
-
 
21922
        throw new java.io.IOException(te);
-
 
21923
      }
-
 
21924
    }
-
 
21925
 
-
 
21926
  }
-
 
21927
 
-
 
21928
  public static class getPurchaseReturn_args implements org.apache.thrift.TBase<getPurchaseReturn_args, getPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
-
 
21929
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_args");
-
 
21930
 
-
 
21931
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
21932
 
-
 
21933
    private long id; // required
-
 
21934
 
-
 
21935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
21936
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
21937
      ID((short)1, "id");
-
 
21938
 
-
 
21939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
21940
 
-
 
21941
      static {
-
 
21942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
21943
          byName.put(field.getFieldName(), field);
-
 
21944
        }
-
 
21945
      }
-
 
21946
 
-
 
21947
      /**
-
 
21948
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
21949
       */
-
 
21950
      public static _Fields findByThriftId(int fieldId) {
-
 
21951
        switch(fieldId) {
-
 
21952
          case 1: // ID
-
 
21953
            return ID;
-
 
21954
          default:
-
 
21955
            return null;
-
 
21956
        }
-
 
21957
      }
-
 
21958
 
-
 
21959
      /**
-
 
21960
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
21961
       * if it is not found.
-
 
21962
       */
-
 
21963
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
21964
        _Fields fields = findByThriftId(fieldId);
-
 
21965
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
21966
        return fields;
-
 
21967
      }
-
 
21968
 
-
 
21969
      /**
-
 
21970
       * Find the _Fields constant that matches name, or null if its not found.
-
 
21971
       */
-
 
21972
      public static _Fields findByName(String name) {
-
 
21973
        return byName.get(name);
-
 
21974
      }
-
 
21975
 
-
 
21976
      private final short _thriftId;
-
 
21977
      private final String _fieldName;
-
 
21978
 
-
 
21979
      _Fields(short thriftId, String fieldName) {
-
 
21980
        _thriftId = thriftId;
-
 
21981
        _fieldName = fieldName;
-
 
21982
      }
-
 
21983
 
-
 
21984
      public short getThriftFieldId() {
-
 
21985
        return _thriftId;
-
 
21986
      }
-
 
21987
 
-
 
21988
      public String getFieldName() {
-
 
21989
        return _fieldName;
-
 
21990
      }
-
 
21991
    }
-
 
21992
 
-
 
21993
    // isset id assignments
-
 
21994
    private static final int __ID_ISSET_ID = 0;
-
 
21995
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
21996
 
-
 
21997
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
21998
    static {
-
 
21999
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
22000
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
22001
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
22002
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
22003
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_args.class, metaDataMap);
-
 
22004
    }
-
 
22005
 
-
 
22006
    public getPurchaseReturn_args() {
-
 
22007
    }
-
 
22008
 
-
 
22009
    public getPurchaseReturn_args(
-
 
22010
      long id)
-
 
22011
    {
-
 
22012
      this();
-
 
22013
      this.id = id;
-
 
22014
      setIdIsSet(true);
-
 
22015
    }
-
 
22016
 
-
 
22017
    /**
-
 
22018
     * Performs a deep copy on <i>other</i>.
-
 
22019
     */
-
 
22020
    public getPurchaseReturn_args(getPurchaseReturn_args other) {
-
 
22021
      __isset_bit_vector.clear();
-
 
22022
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
22023
      this.id = other.id;
-
 
22024
    }
-
 
22025
 
-
 
22026
    public getPurchaseReturn_args deepCopy() {
-
 
22027
      return new getPurchaseReturn_args(this);
-
 
22028
    }
-
 
22029
 
-
 
22030
    @Override
-
 
22031
    public void clear() {
-
 
22032
      setIdIsSet(false);
-
 
22033
      this.id = 0;
-
 
22034
    }
-
 
22035
 
-
 
22036
    public long getId() {
-
 
22037
      return this.id;
-
 
22038
    }
-
 
22039
 
-
 
22040
    public void setId(long id) {
-
 
22041
      this.id = id;
-
 
22042
      setIdIsSet(true);
-
 
22043
    }
-
 
22044
 
-
 
22045
    public void unsetId() {
-
 
22046
      __isset_bit_vector.clear(__ID_ISSET_ID);
-
 
22047
    }
-
 
22048
 
-
 
22049
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
-
 
22050
    public boolean isSetId() {
-
 
22051
      return __isset_bit_vector.get(__ID_ISSET_ID);
-
 
22052
    }
-
 
22053
 
-
 
22054
    public void setIdIsSet(boolean value) {
-
 
22055
      __isset_bit_vector.set(__ID_ISSET_ID, value);
-
 
22056
    }
-
 
22057
 
-
 
22058
    public void setFieldValue(_Fields field, Object value) {
-
 
22059
      switch (field) {
-
 
22060
      case ID:
-
 
22061
        if (value == null) {
-
 
22062
          unsetId();
-
 
22063
        } else {
-
 
22064
          setId((Long)value);
-
 
22065
        }
-
 
22066
        break;
-
 
22067
 
-
 
22068
      }
-
 
22069
    }
-
 
22070
 
-
 
22071
    public Object getFieldValue(_Fields field) {
-
 
22072
      switch (field) {
-
 
22073
      case ID:
-
 
22074
        return Long.valueOf(getId());
-
 
22075
 
-
 
22076
      }
-
 
22077
      throw new IllegalStateException();
-
 
22078
    }
-
 
22079
 
-
 
22080
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
22081
    public boolean isSet(_Fields field) {
-
 
22082
      if (field == null) {
-
 
22083
        throw new IllegalArgumentException();
-
 
22084
      }
-
 
22085
 
-
 
22086
      switch (field) {
-
 
22087
      case ID:
-
 
22088
        return isSetId();
-
 
22089
      }
-
 
22090
      throw new IllegalStateException();
-
 
22091
    }
-
 
22092
 
-
 
22093
    @Override
-
 
22094
    public boolean equals(Object that) {
-
 
22095
      if (that == null)
-
 
22096
        return false;
-
 
22097
      if (that instanceof getPurchaseReturn_args)
-
 
22098
        return this.equals((getPurchaseReturn_args)that);
-
 
22099
      return false;
-
 
22100
    }
-
 
22101
 
-
 
22102
    public boolean equals(getPurchaseReturn_args that) {
-
 
22103
      if (that == null)
-
 
22104
        return false;
-
 
22105
 
-
 
22106
      boolean this_present_id = true;
-
 
22107
      boolean that_present_id = true;
-
 
22108
      if (this_present_id || that_present_id) {
-
 
22109
        if (!(this_present_id && that_present_id))
-
 
22110
          return false;
-
 
22111
        if (this.id != that.id)
-
 
22112
          return false;
-
 
22113
      }
-
 
22114
 
-
 
22115
      return true;
-
 
22116
    }
-
 
22117
 
-
 
22118
    @Override
-
 
22119
    public int hashCode() {
-
 
22120
      return 0;
-
 
22121
    }
-
 
22122
 
-
 
22123
    public int compareTo(getPurchaseReturn_args other) {
-
 
22124
      if (!getClass().equals(other.getClass())) {
-
 
22125
        return getClass().getName().compareTo(other.getClass().getName());
-
 
22126
      }
-
 
22127
 
-
 
22128
      int lastComparison = 0;
-
 
22129
      getPurchaseReturn_args typedOther = (getPurchaseReturn_args)other;
-
 
22130
 
-
 
22131
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
-
 
22132
      if (lastComparison != 0) {
-
 
22133
        return lastComparison;
-
 
22134
      }
-
 
22135
      if (isSetId()) {
-
 
22136
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
-
 
22137
        if (lastComparison != 0) {
-
 
22138
          return lastComparison;
-
 
22139
        }
-
 
22140
      }
-
 
22141
      return 0;
-
 
22142
    }
-
 
22143
 
-
 
22144
    public _Fields fieldForId(int fieldId) {
-
 
22145
      return _Fields.findByThriftId(fieldId);
-
 
22146
    }
-
 
22147
 
-
 
22148
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
22149
      org.apache.thrift.protocol.TField field;
-
 
22150
      iprot.readStructBegin();
-
 
22151
      while (true)
-
 
22152
      {
-
 
22153
        field = iprot.readFieldBegin();
-
 
22154
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
22155
          break;
-
 
22156
        }
-
 
22157
        switch (field.id) {
-
 
22158
          case 1: // ID
-
 
22159
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
22160
              this.id = iprot.readI64();
-
 
22161
              setIdIsSet(true);
-
 
22162
            } else { 
-
 
22163
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
22164
            }
-
 
22165
            break;
-
 
22166
          default:
-
 
22167
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
22168
        }
-
 
22169
        iprot.readFieldEnd();
-
 
22170
      }
-
 
22171
      iprot.readStructEnd();
-
 
22172
      validate();
-
 
22173
    }
-
 
22174
 
-
 
22175
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
22176
      validate();
-
 
22177
 
-
 
22178
      oprot.writeStructBegin(STRUCT_DESC);
-
 
22179
      oprot.writeFieldBegin(ID_FIELD_DESC);
-
 
22180
      oprot.writeI64(this.id);
-
 
22181
      oprot.writeFieldEnd();
-
 
22182
      oprot.writeFieldStop();
-
 
22183
      oprot.writeStructEnd();
-
 
22184
    }
-
 
22185
 
-
 
22186
    @Override
-
 
22187
    public String toString() {
-
 
22188
      StringBuilder sb = new StringBuilder("getPurchaseReturn_args(");
-
 
22189
      boolean first = true;
-
 
22190
 
-
 
22191
      sb.append("id:");
-
 
22192
      sb.append(this.id);
-
 
22193
      first = false;
-
 
22194
      sb.append(")");
-
 
22195
      return sb.toString();
-
 
22196
    }
-
 
22197
 
-
 
22198
    public void validate() throws org.apache.thrift.TException {
-
 
22199
      // check for required fields
-
 
22200
    }
-
 
22201
 
-
 
22202
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
22203
      try {
-
 
22204
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
22205
      } catch (org.apache.thrift.TException te) {
-
 
22206
        throw new java.io.IOException(te);
-
 
22207
      }
-
 
22208
    }
-
 
22209
 
-
 
22210
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
22211
      try {
-
 
22212
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
22213
        __isset_bit_vector = new BitSet(1);
-
 
22214
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
22215
      } catch (org.apache.thrift.TException te) {
-
 
22216
        throw new java.io.IOException(te);
-
 
22217
      }
-
 
22218
    }
-
 
22219
 
-
 
22220
  }
-
 
22221
 
-
 
22222
  public static class getPurchaseReturn_result implements org.apache.thrift.TBase<getPurchaseReturn_result, getPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
-
 
22223
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseReturn_result");
-
 
22224
 
-
 
22225
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
 
22226
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
22227
 
-
 
22228
    private PurchaseReturn success; // required
-
 
22229
    private PurchaseServiceException e; // required
-
 
22230
 
-
 
22231
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
22232
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
22233
      SUCCESS((short)0, "success"),
-
 
22234
      E((short)1, "e");
-
 
22235
 
-
 
22236
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
22237
 
-
 
22238
      static {
-
 
22239
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
22240
          byName.put(field.getFieldName(), field);
-
 
22241
        }
-
 
22242
      }
-
 
22243
 
-
 
22244
      /**
-
 
22245
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
22246
       */
-
 
22247
      public static _Fields findByThriftId(int fieldId) {
-
 
22248
        switch(fieldId) {
-
 
22249
          case 0: // SUCCESS
-
 
22250
            return SUCCESS;
-
 
22251
          case 1: // E
-
 
22252
            return E;
-
 
22253
          default:
-
 
22254
            return null;
-
 
22255
        }
-
 
22256
      }
-
 
22257
 
-
 
22258
      /**
-
 
22259
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
22260
       * if it is not found.
-
 
22261
       */
-
 
22262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
22263
        _Fields fields = findByThriftId(fieldId);
-
 
22264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
22265
        return fields;
-
 
22266
      }
-
 
22267
 
-
 
22268
      /**
-
 
22269
       * Find the _Fields constant that matches name, or null if its not found.
-
 
22270
       */
-
 
22271
      public static _Fields findByName(String name) {
-
 
22272
        return byName.get(name);
-
 
22273
      }
-
 
22274
 
-
 
22275
      private final short _thriftId;
-
 
22276
      private final String _fieldName;
-
 
22277
 
-
 
22278
      _Fields(short thriftId, String fieldName) {
-
 
22279
        _thriftId = thriftId;
-
 
22280
        _fieldName = fieldName;
-
 
22281
      }
-
 
22282
 
-
 
22283
      public short getThriftFieldId() {
-
 
22284
        return _thriftId;
-
 
22285
      }
-
 
22286
 
-
 
22287
      public String getFieldName() {
-
 
22288
        return _fieldName;
-
 
22289
      }
-
 
22290
    }
-
 
22291
 
-
 
22292
    // isset id assignments
-
 
22293
 
-
 
22294
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
22295
    static {
-
 
22296
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
22297
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
22298
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class)));
-
 
22299
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
22300
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
22301
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
22302
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseReturn_result.class, metaDataMap);
-
 
22303
    }
-
 
22304
 
-
 
22305
    public getPurchaseReturn_result() {
-
 
22306
    }
-
 
22307
 
-
 
22308
    public getPurchaseReturn_result(
-
 
22309
      PurchaseReturn success,
-
 
22310
      PurchaseServiceException e)
-
 
22311
    {
-
 
22312
      this();
-
 
22313
      this.success = success;
-
 
22314
      this.e = e;
-
 
22315
    }
-
 
22316
 
-
 
22317
    /**
-
 
22318
     * Performs a deep copy on <i>other</i>.
-
 
22319
     */
-
 
22320
    public getPurchaseReturn_result(getPurchaseReturn_result other) {
-
 
22321
      if (other.isSetSuccess()) {
-
 
22322
        this.success = new PurchaseReturn(other.success);
-
 
22323
      }
-
 
22324
      if (other.isSetE()) {
-
 
22325
        this.e = new PurchaseServiceException(other.e);
-
 
22326
      }
-
 
22327
    }
-
 
22328
 
-
 
22329
    public getPurchaseReturn_result deepCopy() {
-
 
22330
      return new getPurchaseReturn_result(this);
-
 
22331
    }
-
 
22332
 
-
 
22333
    @Override
-
 
22334
    public void clear() {
-
 
22335
      this.success = null;
-
 
22336
      this.e = null;
-
 
22337
    }
-
 
22338
 
-
 
22339
    public PurchaseReturn getSuccess() {
-
 
22340
      return this.success;
-
 
22341
    }
-
 
22342
 
-
 
22343
    public void setSuccess(PurchaseReturn success) {
-
 
22344
      this.success = success;
-
 
22345
    }
-
 
22346
 
-
 
22347
    public void unsetSuccess() {
-
 
22348
      this.success = null;
-
 
22349
    }
-
 
22350
 
-
 
22351
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
22352
    public boolean isSetSuccess() {
-
 
22353
      return this.success != null;
-
 
22354
    }
-
 
22355
 
-
 
22356
    public void setSuccessIsSet(boolean value) {
-
 
22357
      if (!value) {
-
 
22358
        this.success = null;
-
 
22359
      }
-
 
22360
    }
-
 
22361
 
-
 
22362
    public PurchaseServiceException getE() {
-
 
22363
      return this.e;
-
 
22364
    }
-
 
22365
 
-
 
22366
    public void setE(PurchaseServiceException e) {
-
 
22367
      this.e = e;
-
 
22368
    }
-
 
22369
 
-
 
22370
    public void unsetE() {
-
 
22371
      this.e = null;
-
 
22372
    }
-
 
22373
 
-
 
22374
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
-
 
22375
    public boolean isSetE() {
-
 
22376
      return this.e != null;
-
 
22377
    }
-
 
22378
 
-
 
22379
    public void setEIsSet(boolean value) {
-
 
22380
      if (!value) {
-
 
22381
        this.e = null;
-
 
22382
      }
-
 
22383
    }
-
 
22384
 
-
 
22385
    public void setFieldValue(_Fields field, Object value) {
-
 
22386
      switch (field) {
-
 
22387
      case SUCCESS:
-
 
22388
        if (value == null) {
-
 
22389
          unsetSuccess();
-
 
22390
        } else {
-
 
22391
          setSuccess((PurchaseReturn)value);
-
 
22392
        }
-
 
22393
        break;
-
 
22394
 
-
 
22395
      case E:
-
 
22396
        if (value == null) {
-
 
22397
          unsetE();
-
 
22398
        } else {
-
 
22399
          setE((PurchaseServiceException)value);
-
 
22400
        }
-
 
22401
        break;
-
 
22402
 
-
 
22403
      }
-
 
22404
    }
-
 
22405
 
-
 
22406
    public Object getFieldValue(_Fields field) {
-
 
22407
      switch (field) {
-
 
22408
      case SUCCESS:
-
 
22409
        return getSuccess();
-
 
22410
 
-
 
22411
      case E:
-
 
22412
        return getE();
-
 
22413
 
-
 
22414
      }
-
 
22415
      throw new IllegalStateException();
-
 
22416
    }
-
 
22417
 
-
 
22418
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
22419
    public boolean isSet(_Fields field) {
-
 
22420
      if (field == null) {
-
 
22421
        throw new IllegalArgumentException();
-
 
22422
      }
-
 
22423
 
-
 
22424
      switch (field) {
-
 
22425
      case SUCCESS:
-
 
22426
        return isSetSuccess();
-
 
22427
      case E:
-
 
22428
        return isSetE();
-
 
22429
      }
-
 
22430
      throw new IllegalStateException();
-
 
22431
    }
-
 
22432
 
-
 
22433
    @Override
-
 
22434
    public boolean equals(Object that) {
-
 
22435
      if (that == null)
-
 
22436
        return false;
-
 
22437
      if (that instanceof getPurchaseReturn_result)
-
 
22438
        return this.equals((getPurchaseReturn_result)that);
-
 
22439
      return false;
-
 
22440
    }
-
 
22441
 
-
 
22442
    public boolean equals(getPurchaseReturn_result that) {
-
 
22443
      if (that == null)
-
 
22444
        return false;
-
 
22445
 
-
 
22446
      boolean this_present_success = true && this.isSetSuccess();
-
 
22447
      boolean that_present_success = true && that.isSetSuccess();
-
 
22448
      if (this_present_success || that_present_success) {
-
 
22449
        if (!(this_present_success && that_present_success))
-
 
22450
          return false;
-
 
22451
        if (!this.success.equals(that.success))
-
 
22452
          return false;
-
 
22453
      }
-
 
22454
 
-
 
22455
      boolean this_present_e = true && this.isSetE();
-
 
22456
      boolean that_present_e = true && that.isSetE();
-
 
22457
      if (this_present_e || that_present_e) {
-
 
22458
        if (!(this_present_e && that_present_e))
-
 
22459
          return false;
-
 
22460
        if (!this.e.equals(that.e))
-
 
22461
          return false;
-
 
22462
      }
-
 
22463
 
-
 
22464
      return true;
-
 
22465
    }
-
 
22466
 
-
 
22467
    @Override
-
 
22468
    public int hashCode() {
-
 
22469
      return 0;
-
 
22470
    }
-
 
22471
 
-
 
22472
    public int compareTo(getPurchaseReturn_result other) {
-
 
22473
      if (!getClass().equals(other.getClass())) {
-
 
22474
        return getClass().getName().compareTo(other.getClass().getName());
-
 
22475
      }
-
 
22476
 
-
 
22477
      int lastComparison = 0;
-
 
22478
      getPurchaseReturn_result typedOther = (getPurchaseReturn_result)other;
-
 
22479
 
-
 
22480
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
22481
      if (lastComparison != 0) {
-
 
22482
        return lastComparison;
-
 
22483
      }
-
 
22484
      if (isSetSuccess()) {
-
 
22485
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
22486
        if (lastComparison != 0) {
-
 
22487
          return lastComparison;
-
 
22488
        }
-
 
22489
      }
-
 
22490
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
-
 
22491
      if (lastComparison != 0) {
-
 
22492
        return lastComparison;
-
 
22493
      }
-
 
22494
      if (isSetE()) {
-
 
22495
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
-
 
22496
        if (lastComparison != 0) {
-
 
22497
          return lastComparison;
-
 
22498
        }
-
 
22499
      }
-
 
22500
      return 0;
-
 
22501
    }
-
 
22502
 
-
 
22503
    public _Fields fieldForId(int fieldId) {
-
 
22504
      return _Fields.findByThriftId(fieldId);
-
 
22505
    }
-
 
22506
 
-
 
22507
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
22508
      org.apache.thrift.protocol.TField field;
-
 
22509
      iprot.readStructBegin();
-
 
22510
      while (true)
-
 
22511
      {
-
 
22512
        field = iprot.readFieldBegin();
-
 
22513
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
22514
          break;
-
 
22515
        }
-
 
22516
        switch (field.id) {
-
 
22517
          case 0: // SUCCESS
-
 
22518
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
22519
              this.success = new PurchaseReturn();
-
 
22520
              this.success.read(iprot);
-
 
22521
            } else { 
-
 
22522
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
22523
            }
-
 
22524
            break;
-
 
22525
          case 1: // E
-
 
22526
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
22527
              this.e = new PurchaseServiceException();
-
 
22528
              this.e.read(iprot);
-
 
22529
            } else { 
-
 
22530
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
22531
            }
-
 
22532
            break;
-
 
22533
          default:
-
 
22534
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
22535
        }
-
 
22536
        iprot.readFieldEnd();
-
 
22537
      }
-
 
22538
      iprot.readStructEnd();
-
 
22539
      validate();
-
 
22540
    }
-
 
22541
 
-
 
22542
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
22543
      oprot.writeStructBegin(STRUCT_DESC);
-
 
22544
 
-
 
22545
      if (this.isSetSuccess()) {
-
 
22546
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
22547
        this.success.write(oprot);
-
 
22548
        oprot.writeFieldEnd();
-
 
22549
      } else if (this.isSetE()) {
-
 
22550
        oprot.writeFieldBegin(E_FIELD_DESC);
-
 
22551
        this.e.write(oprot);
-
 
22552
        oprot.writeFieldEnd();
-
 
22553
      }
-
 
22554
      oprot.writeFieldStop();
-
 
22555
      oprot.writeStructEnd();
-
 
22556
    }
-
 
22557
 
-
 
22558
    @Override
-
 
22559
    public String toString() {
-
 
22560
      StringBuilder sb = new StringBuilder("getPurchaseReturn_result(");
-
 
22561
      boolean first = true;
-
 
22562
 
-
 
22563
      sb.append("success:");
-
 
22564
      if (this.success == null) {
-
 
22565
        sb.append("null");
-
 
22566
      } else {
-
 
22567
        sb.append(this.success);
-
 
22568
      }
-
 
22569
      first = false;
-
 
22570
      if (!first) sb.append(", ");
-
 
22571
      sb.append("e:");
-
 
22572
      if (this.e == null) {
-
 
22573
        sb.append("null");
-
 
22574
      } else {
-
 
22575
        sb.append(this.e);
21812
      }
22576
      }
21813
      first = false;
22577
      first = false;
21814
      sb.append(")");
22578
      sb.append(")");
21815
      return sb.toString();
22579
      return sb.toString();
21816
    }
22580
    }