Subversion Repositories SmartDukaan

Rev

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

Rev 2615 Rev 2690
Line 313... Line 313...
313
     * 
313
     * 
314
     * @param orderId
314
     * @param orderId
315
     */
315
     */
316
    public boolean refundOrder(long orderId) throws TransactionServiceException, TException;
316
    public boolean refundOrder(long orderId) throws TransactionServiceException, TException;
317
 
317
 
-
 
318
    /**
-
 
319
     * Get all return orders created between the from and to dates for the given warehouse.
-
 
320
     * Ignores the warehouse if it is passed as -1.
-
 
321
     * 
-
 
322
     * @param warehouseId
-
 
323
     * @param fromDate
-
 
324
     * @param toDate
-
 
325
     */
-
 
326
    public List<ReturnOrder> getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException;
-
 
327
 
-
 
328
    /**
-
 
329
     * Marks the return order with the given id as processed. Raises an exception if no such return order exists.
-
 
330
     * 
-
 
331
     * @param returnOrderId
-
 
332
     */
-
 
333
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException;
-
 
334
 
318
  }
335
  }
319
 
336
 
320
  public static class Client implements Iface {
337
  public static class Client implements Iface {
321
    public Client(TProtocol prot)
338
    public Client(TProtocol prot)
322
    {
339
    {
Line 1918... Line 1935...
1918
        throw result.ex;
1935
        throw result.ex;
1919
      }
1936
      }
1920
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "refundOrder failed: unknown result");
1937
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "refundOrder failed: unknown result");
1921
    }
1938
    }
1922
 
1939
 
-
 
1940
    public List<ReturnOrder> getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException
-
 
1941
    {
-
 
1942
      send_getReturnOrders(warehouseId, fromDate, toDate);
-
 
1943
      return recv_getReturnOrders();
-
 
1944
    }
-
 
1945
 
-
 
1946
    public void send_getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException
-
 
1947
    {
-
 
1948
      oprot_.writeMessageBegin(new TMessage("getReturnOrders", TMessageType.CALL, seqid_));
-
 
1949
      getReturnOrders_args args = new getReturnOrders_args();
-
 
1950
      args.warehouseId = warehouseId;
-
 
1951
      args.fromDate = fromDate;
-
 
1952
      args.toDate = toDate;
-
 
1953
      args.write(oprot_);
-
 
1954
      oprot_.writeMessageEnd();
-
 
1955
      oprot_.getTransport().flush();
-
 
1956
    }
-
 
1957
 
-
 
1958
    public List<ReturnOrder> recv_getReturnOrders() throws TException
-
 
1959
    {
-
 
1960
      TMessage msg = iprot_.readMessageBegin();
-
 
1961
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1962
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1963
        iprot_.readMessageEnd();
-
 
1964
        throw x;
-
 
1965
      }
-
 
1966
      getReturnOrders_result result = new getReturnOrders_result();
-
 
1967
      result.read(iprot_);
-
 
1968
      iprot_.readMessageEnd();
-
 
1969
      if (result.isSetSuccess()) {
-
 
1970
        return result.success;
-
 
1971
      }
-
 
1972
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrders failed: unknown result");
-
 
1973
    }
-
 
1974
 
-
 
1975
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException
-
 
1976
    {
-
 
1977
      send_processReturn(returnOrderId);
-
 
1978
      recv_processReturn();
-
 
1979
    }
-
 
1980
 
-
 
1981
    public void send_processReturn(long returnOrderId) throws TException
-
 
1982
    {
-
 
1983
      oprot_.writeMessageBegin(new TMessage("processReturn", TMessageType.CALL, seqid_));
-
 
1984
      processReturn_args args = new processReturn_args();
-
 
1985
      args.returnOrderId = returnOrderId;
-
 
1986
      args.write(oprot_);
-
 
1987
      oprot_.writeMessageEnd();
-
 
1988
      oprot_.getTransport().flush();
-
 
1989
    }
-
 
1990
 
-
 
1991
    public void recv_processReturn() throws TransactionServiceException, TException
-
 
1992
    {
-
 
1993
      TMessage msg = iprot_.readMessageBegin();
-
 
1994
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1995
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1996
        iprot_.readMessageEnd();
-
 
1997
        throw x;
-
 
1998
      }
-
 
1999
      processReturn_result result = new processReturn_result();
-
 
2000
      result.read(iprot_);
-
 
2001
      iprot_.readMessageEnd();
-
 
2002
      if (result.ex != null) {
-
 
2003
        throw result.ex;
-
 
2004
      }
-
 
2005
      return;
-
 
2006
    }
-
 
2007
 
1923
  }
2008
  }
1924
  public static class Processor implements TProcessor {
2009
  public static class Processor implements TProcessor {
1925
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2010
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1926
    public Processor(Iface iface)
2011
    public Processor(Iface iface)
1927
    {
2012
    {
Line 1968... Line 2053...
1968
      processMap_.put("authorizePickup", new authorizePickup());
2053
      processMap_.put("authorizePickup", new authorizePickup());
1969
      processMap_.put("receiveReturn", new receiveReturn());
2054
      processMap_.put("receiveReturn", new receiveReturn());
1970
      processMap_.put("validateDoa", new validateDoa());
2055
      processMap_.put("validateDoa", new validateDoa());
1971
      processMap_.put("reshipOrder", new reshipOrder());
2056
      processMap_.put("reshipOrder", new reshipOrder());
1972
      processMap_.put("refundOrder", new refundOrder());
2057
      processMap_.put("refundOrder", new refundOrder());
-
 
2058
      processMap_.put("getReturnOrders", new getReturnOrders());
-
 
2059
      processMap_.put("processReturn", new processReturn());
1973
    }
2060
    }
1974
 
2061
 
1975
    protected static interface ProcessFunction {
2062
    protected static interface ProcessFunction {
1976
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
2063
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1977
    }
2064
    }
Line 3151... Line 3238...
3151
        oprot.getTransport().flush();
3238
        oprot.getTransport().flush();
3152
      }
3239
      }
3153
 
3240
 
3154
    }
3241
    }
3155
 
3242
 
-
 
3243
    private class getReturnOrders implements ProcessFunction {
-
 
3244
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
3245
      {
-
 
3246
        getReturnOrders_args args = new getReturnOrders_args();
-
 
3247
        args.read(iprot);
-
 
3248
        iprot.readMessageEnd();
-
 
3249
        getReturnOrders_result result = new getReturnOrders_result();
-
 
3250
        result.success = iface_.getReturnOrders(args.warehouseId, args.fromDate, args.toDate);
-
 
3251
        oprot.writeMessageBegin(new TMessage("getReturnOrders", TMessageType.REPLY, seqid));
-
 
3252
        result.write(oprot);
-
 
3253
        oprot.writeMessageEnd();
-
 
3254
        oprot.getTransport().flush();
-
 
3255
      }
-
 
3256
 
-
 
3257
    }
-
 
3258
 
-
 
3259
    private class processReturn implements ProcessFunction {
-
 
3260
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
3261
      {
-
 
3262
        processReturn_args args = new processReturn_args();
-
 
3263
        args.read(iprot);
-
 
3264
        iprot.readMessageEnd();
-
 
3265
        processReturn_result result = new processReturn_result();
-
 
3266
        try {
-
 
3267
          iface_.processReturn(args.returnOrderId);
-
 
3268
        } catch (TransactionServiceException ex) {
-
 
3269
          result.ex = ex;
-
 
3270
        } catch (Throwable th) {
-
 
3271
          LOGGER.error("Internal error processing processReturn", th);
-
 
3272
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing processReturn");
-
 
3273
          oprot.writeMessageBegin(new TMessage("processReturn", TMessageType.EXCEPTION, seqid));
-
 
3274
          x.write(oprot);
-
 
3275
          oprot.writeMessageEnd();
-
 
3276
          oprot.getTransport().flush();
-
 
3277
          return;
-
 
3278
        }
-
 
3279
        oprot.writeMessageBegin(new TMessage("processReturn", TMessageType.REPLY, seqid));
-
 
3280
        result.write(oprot);
-
 
3281
        oprot.writeMessageEnd();
-
 
3282
        oprot.getTransport().flush();
-
 
3283
      }
-
 
3284
 
-
 
3285
    }
-
 
3286
 
3156
  }
3287
  }
3157
 
3288
 
3158
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3289
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3159
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3290
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3160
 
3291
 
Line 33536... Line 33667...
33536
      sb.append("ex:");
33667
      sb.append("ex:");
33537
      if (this.ex == null) {
33668
      if (this.ex == null) {
33538
        sb.append("null");
33669
        sb.append("null");
33539
      } else {
33670
      } else {
33540
        sb.append(this.ex);
33671
        sb.append(this.ex);
-
 
33672
      }
-
 
33673
      first = false;
-
 
33674
      sb.append(")");
-
 
33675
      return sb.toString();
-
 
33676
    }
-
 
33677
 
-
 
33678
    public void validate() throws TException {
-
 
33679
      // check for required fields
-
 
33680
    }
-
 
33681
 
-
 
33682
  }
-
 
33683
 
-
 
33684
  public static class getReturnOrders_args implements TBase<getReturnOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrders_args>   {
-
 
33685
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrders_args");
-
 
33686
 
-
 
33687
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
-
 
33688
    private static final TField FROM_DATE_FIELD_DESC = new TField("fromDate", TType.I64, (short)2);
-
 
33689
    private static final TField TO_DATE_FIELD_DESC = new TField("toDate", TType.I64, (short)3);
-
 
33690
 
-
 
33691
    private long warehouseId;
-
 
33692
    private long fromDate;
-
 
33693
    private long toDate;
-
 
33694
 
-
 
33695
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
33696
    public enum _Fields implements TFieldIdEnum {
-
 
33697
      WAREHOUSE_ID((short)1, "warehouseId"),
-
 
33698
      FROM_DATE((short)2, "fromDate"),
-
 
33699
      TO_DATE((short)3, "toDate");
-
 
33700
 
-
 
33701
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
33702
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
33703
 
-
 
33704
      static {
-
 
33705
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
33706
          byId.put((int)field._thriftId, field);
-
 
33707
          byName.put(field.getFieldName(), field);
-
 
33708
        }
-
 
33709
      }
-
 
33710
 
-
 
33711
      /**
-
 
33712
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
33713
       */
-
 
33714
      public static _Fields findByThriftId(int fieldId) {
-
 
33715
        return byId.get(fieldId);
-
 
33716
      }
-
 
33717
 
-
 
33718
      /**
-
 
33719
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
33720
       * if it is not found.
-
 
33721
       */
-
 
33722
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
33723
        _Fields fields = findByThriftId(fieldId);
-
 
33724
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
33725
        return fields;
-
 
33726
      }
-
 
33727
 
-
 
33728
      /**
-
 
33729
       * Find the _Fields constant that matches name, or null if its not found.
-
 
33730
       */
-
 
33731
      public static _Fields findByName(String name) {
-
 
33732
        return byName.get(name);
-
 
33733
      }
-
 
33734
 
-
 
33735
      private final short _thriftId;
-
 
33736
      private final String _fieldName;
-
 
33737
 
-
 
33738
      _Fields(short thriftId, String fieldName) {
-
 
33739
        _thriftId = thriftId;
-
 
33740
        _fieldName = fieldName;
-
 
33741
      }
-
 
33742
 
-
 
33743
      public short getThriftFieldId() {
-
 
33744
        return _thriftId;
-
 
33745
      }
-
 
33746
 
-
 
33747
      public String getFieldName() {
-
 
33748
        return _fieldName;
-
 
33749
      }
-
 
33750
    }
-
 
33751
 
-
 
33752
    // isset id assignments
-
 
33753
    private static final int __WAREHOUSEID_ISSET_ID = 0;
-
 
33754
    private static final int __FROMDATE_ISSET_ID = 1;
-
 
33755
    private static final int __TODATE_ISSET_ID = 2;
-
 
33756
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
33757
 
-
 
33758
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
33759
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
-
 
33760
          new FieldValueMetaData(TType.I64)));
-
 
33761
      put(_Fields.FROM_DATE, new FieldMetaData("fromDate", TFieldRequirementType.DEFAULT, 
-
 
33762
          new FieldValueMetaData(TType.I64)));
-
 
33763
      put(_Fields.TO_DATE, new FieldMetaData("toDate", TFieldRequirementType.DEFAULT, 
-
 
33764
          new FieldValueMetaData(TType.I64)));
-
 
33765
    }});
-
 
33766
 
-
 
33767
    static {
-
 
33768
      FieldMetaData.addStructMetaDataMap(getReturnOrders_args.class, metaDataMap);
-
 
33769
    }
-
 
33770
 
-
 
33771
    public getReturnOrders_args() {
-
 
33772
    }
-
 
33773
 
-
 
33774
    public getReturnOrders_args(
-
 
33775
      long warehouseId,
-
 
33776
      long fromDate,
-
 
33777
      long toDate)
-
 
33778
    {
-
 
33779
      this();
-
 
33780
      this.warehouseId = warehouseId;
-
 
33781
      setWarehouseIdIsSet(true);
-
 
33782
      this.fromDate = fromDate;
-
 
33783
      setFromDateIsSet(true);
-
 
33784
      this.toDate = toDate;
-
 
33785
      setToDateIsSet(true);
-
 
33786
    }
-
 
33787
 
-
 
33788
    /**
-
 
33789
     * Performs a deep copy on <i>other</i>.
-
 
33790
     */
-
 
33791
    public getReturnOrders_args(getReturnOrders_args other) {
-
 
33792
      __isset_bit_vector.clear();
-
 
33793
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
33794
      this.warehouseId = other.warehouseId;
-
 
33795
      this.fromDate = other.fromDate;
-
 
33796
      this.toDate = other.toDate;
-
 
33797
    }
-
 
33798
 
-
 
33799
    public getReturnOrders_args deepCopy() {
-
 
33800
      return new getReturnOrders_args(this);
-
 
33801
    }
-
 
33802
 
-
 
33803
    @Deprecated
-
 
33804
    public getReturnOrders_args clone() {
-
 
33805
      return new getReturnOrders_args(this);
-
 
33806
    }
-
 
33807
 
-
 
33808
    public long getWarehouseId() {
-
 
33809
      return this.warehouseId;
-
 
33810
    }
-
 
33811
 
-
 
33812
    public getReturnOrders_args setWarehouseId(long warehouseId) {
-
 
33813
      this.warehouseId = warehouseId;
-
 
33814
      setWarehouseIdIsSet(true);
-
 
33815
      return this;
-
 
33816
    }
-
 
33817
 
-
 
33818
    public void unsetWarehouseId() {
-
 
33819
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
-
 
33820
    }
-
 
33821
 
-
 
33822
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
-
 
33823
    public boolean isSetWarehouseId() {
-
 
33824
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
-
 
33825
    }
-
 
33826
 
-
 
33827
    public void setWarehouseIdIsSet(boolean value) {
-
 
33828
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
-
 
33829
    }
-
 
33830
 
-
 
33831
    public long getFromDate() {
-
 
33832
      return this.fromDate;
-
 
33833
    }
-
 
33834
 
-
 
33835
    public getReturnOrders_args setFromDate(long fromDate) {
-
 
33836
      this.fromDate = fromDate;
-
 
33837
      setFromDateIsSet(true);
-
 
33838
      return this;
-
 
33839
    }
-
 
33840
 
-
 
33841
    public void unsetFromDate() {
-
 
33842
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
-
 
33843
    }
-
 
33844
 
-
 
33845
    /** Returns true if field fromDate is set (has been asigned a value) and false otherwise */
-
 
33846
    public boolean isSetFromDate() {
-
 
33847
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
-
 
33848
    }
-
 
33849
 
-
 
33850
    public void setFromDateIsSet(boolean value) {
-
 
33851
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
-
 
33852
    }
-
 
33853
 
-
 
33854
    public long getToDate() {
-
 
33855
      return this.toDate;
-
 
33856
    }
-
 
33857
 
-
 
33858
    public getReturnOrders_args setToDate(long toDate) {
-
 
33859
      this.toDate = toDate;
-
 
33860
      setToDateIsSet(true);
-
 
33861
      return this;
-
 
33862
    }
-
 
33863
 
-
 
33864
    public void unsetToDate() {
-
 
33865
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
-
 
33866
    }
-
 
33867
 
-
 
33868
    /** Returns true if field toDate is set (has been asigned a value) and false otherwise */
-
 
33869
    public boolean isSetToDate() {
-
 
33870
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
-
 
33871
    }
-
 
33872
 
-
 
33873
    public void setToDateIsSet(boolean value) {
-
 
33874
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
-
 
33875
    }
-
 
33876
 
-
 
33877
    public void setFieldValue(_Fields field, Object value) {
-
 
33878
      switch (field) {
-
 
33879
      case WAREHOUSE_ID:
-
 
33880
        if (value == null) {
-
 
33881
          unsetWarehouseId();
-
 
33882
        } else {
-
 
33883
          setWarehouseId((Long)value);
-
 
33884
        }
-
 
33885
        break;
-
 
33886
 
-
 
33887
      case FROM_DATE:
-
 
33888
        if (value == null) {
-
 
33889
          unsetFromDate();
-
 
33890
        } else {
-
 
33891
          setFromDate((Long)value);
-
 
33892
        }
-
 
33893
        break;
-
 
33894
 
-
 
33895
      case TO_DATE:
-
 
33896
        if (value == null) {
-
 
33897
          unsetToDate();
-
 
33898
        } else {
-
 
33899
          setToDate((Long)value);
-
 
33900
        }
-
 
33901
        break;
-
 
33902
 
-
 
33903
      }
-
 
33904
    }
-
 
33905
 
-
 
33906
    public void setFieldValue(int fieldID, Object value) {
-
 
33907
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
33908
    }
-
 
33909
 
-
 
33910
    public Object getFieldValue(_Fields field) {
-
 
33911
      switch (field) {
-
 
33912
      case WAREHOUSE_ID:
-
 
33913
        return new Long(getWarehouseId());
-
 
33914
 
-
 
33915
      case FROM_DATE:
-
 
33916
        return new Long(getFromDate());
-
 
33917
 
-
 
33918
      case TO_DATE:
-
 
33919
        return new Long(getToDate());
-
 
33920
 
-
 
33921
      }
-
 
33922
      throw new IllegalStateException();
-
 
33923
    }
-
 
33924
 
-
 
33925
    public Object getFieldValue(int fieldId) {
-
 
33926
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
33927
    }
-
 
33928
 
-
 
33929
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
33930
    public boolean isSet(_Fields field) {
-
 
33931
      switch (field) {
-
 
33932
      case WAREHOUSE_ID:
-
 
33933
        return isSetWarehouseId();
-
 
33934
      case FROM_DATE:
-
 
33935
        return isSetFromDate();
-
 
33936
      case TO_DATE:
-
 
33937
        return isSetToDate();
-
 
33938
      }
-
 
33939
      throw new IllegalStateException();
-
 
33940
    }
-
 
33941
 
-
 
33942
    public boolean isSet(int fieldID) {
-
 
33943
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
33944
    }
-
 
33945
 
-
 
33946
    @Override
-
 
33947
    public boolean equals(Object that) {
-
 
33948
      if (that == null)
-
 
33949
        return false;
-
 
33950
      if (that instanceof getReturnOrders_args)
-
 
33951
        return this.equals((getReturnOrders_args)that);
-
 
33952
      return false;
-
 
33953
    }
-
 
33954
 
-
 
33955
    public boolean equals(getReturnOrders_args that) {
-
 
33956
      if (that == null)
-
 
33957
        return false;
-
 
33958
 
-
 
33959
      boolean this_present_warehouseId = true;
-
 
33960
      boolean that_present_warehouseId = true;
-
 
33961
      if (this_present_warehouseId || that_present_warehouseId) {
-
 
33962
        if (!(this_present_warehouseId && that_present_warehouseId))
-
 
33963
          return false;
-
 
33964
        if (this.warehouseId != that.warehouseId)
-
 
33965
          return false;
-
 
33966
      }
-
 
33967
 
-
 
33968
      boolean this_present_fromDate = true;
-
 
33969
      boolean that_present_fromDate = true;
-
 
33970
      if (this_present_fromDate || that_present_fromDate) {
-
 
33971
        if (!(this_present_fromDate && that_present_fromDate))
-
 
33972
          return false;
-
 
33973
        if (this.fromDate != that.fromDate)
-
 
33974
          return false;
-
 
33975
      }
-
 
33976
 
-
 
33977
      boolean this_present_toDate = true;
-
 
33978
      boolean that_present_toDate = true;
-
 
33979
      if (this_present_toDate || that_present_toDate) {
-
 
33980
        if (!(this_present_toDate && that_present_toDate))
-
 
33981
          return false;
-
 
33982
        if (this.toDate != that.toDate)
-
 
33983
          return false;
-
 
33984
      }
-
 
33985
 
-
 
33986
      return true;
-
 
33987
    }
-
 
33988
 
-
 
33989
    @Override
-
 
33990
    public int hashCode() {
-
 
33991
      return 0;
-
 
33992
    }
-
 
33993
 
-
 
33994
    public int compareTo(getReturnOrders_args other) {
-
 
33995
      if (!getClass().equals(other.getClass())) {
-
 
33996
        return getClass().getName().compareTo(other.getClass().getName());
-
 
33997
      }
-
 
33998
 
-
 
33999
      int lastComparison = 0;
-
 
34000
      getReturnOrders_args typedOther = (getReturnOrders_args)other;
-
 
34001
 
-
 
34002
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
-
 
34003
      if (lastComparison != 0) {
-
 
34004
        return lastComparison;
-
 
34005
      }
-
 
34006
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
-
 
34007
      if (lastComparison != 0) {
-
 
34008
        return lastComparison;
-
 
34009
      }
-
 
34010
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(isSetFromDate());
-
 
34011
      if (lastComparison != 0) {
-
 
34012
        return lastComparison;
-
 
34013
      }
-
 
34014
      lastComparison = TBaseHelper.compareTo(fromDate, typedOther.fromDate);
-
 
34015
      if (lastComparison != 0) {
-
 
34016
        return lastComparison;
-
 
34017
      }
-
 
34018
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(isSetToDate());
-
 
34019
      if (lastComparison != 0) {
-
 
34020
        return lastComparison;
-
 
34021
      }
-
 
34022
      lastComparison = TBaseHelper.compareTo(toDate, typedOther.toDate);
-
 
34023
      if (lastComparison != 0) {
-
 
34024
        return lastComparison;
-
 
34025
      }
-
 
34026
      return 0;
-
 
34027
    }
-
 
34028
 
-
 
34029
    public void read(TProtocol iprot) throws TException {
-
 
34030
      TField field;
-
 
34031
      iprot.readStructBegin();
-
 
34032
      while (true)
-
 
34033
      {
-
 
34034
        field = iprot.readFieldBegin();
-
 
34035
        if (field.type == TType.STOP) { 
-
 
34036
          break;
-
 
34037
        }
-
 
34038
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
34039
        if (fieldId == null) {
-
 
34040
          TProtocolUtil.skip(iprot, field.type);
-
 
34041
        } else {
-
 
34042
          switch (fieldId) {
-
 
34043
            case WAREHOUSE_ID:
-
 
34044
              if (field.type == TType.I64) {
-
 
34045
                this.warehouseId = iprot.readI64();
-
 
34046
                setWarehouseIdIsSet(true);
-
 
34047
              } else { 
-
 
34048
                TProtocolUtil.skip(iprot, field.type);
-
 
34049
              }
-
 
34050
              break;
-
 
34051
            case FROM_DATE:
-
 
34052
              if (field.type == TType.I64) {
-
 
34053
                this.fromDate = iprot.readI64();
-
 
34054
                setFromDateIsSet(true);
-
 
34055
              } else { 
-
 
34056
                TProtocolUtil.skip(iprot, field.type);
-
 
34057
              }
-
 
34058
              break;
-
 
34059
            case TO_DATE:
-
 
34060
              if (field.type == TType.I64) {
-
 
34061
                this.toDate = iprot.readI64();
-
 
34062
                setToDateIsSet(true);
-
 
34063
              } else { 
-
 
34064
                TProtocolUtil.skip(iprot, field.type);
-
 
34065
              }
-
 
34066
              break;
-
 
34067
          }
-
 
34068
          iprot.readFieldEnd();
-
 
34069
        }
-
 
34070
      }
-
 
34071
      iprot.readStructEnd();
-
 
34072
      validate();
-
 
34073
    }
-
 
34074
 
-
 
34075
    public void write(TProtocol oprot) throws TException {
-
 
34076
      validate();
-
 
34077
 
-
 
34078
      oprot.writeStructBegin(STRUCT_DESC);
-
 
34079
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
-
 
34080
      oprot.writeI64(this.warehouseId);
-
 
34081
      oprot.writeFieldEnd();
-
 
34082
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
-
 
34083
      oprot.writeI64(this.fromDate);
-
 
34084
      oprot.writeFieldEnd();
-
 
34085
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
-
 
34086
      oprot.writeI64(this.toDate);
-
 
34087
      oprot.writeFieldEnd();
-
 
34088
      oprot.writeFieldStop();
-
 
34089
      oprot.writeStructEnd();
-
 
34090
    }
-
 
34091
 
-
 
34092
    @Override
-
 
34093
    public String toString() {
-
 
34094
      StringBuilder sb = new StringBuilder("getReturnOrders_args(");
-
 
34095
      boolean first = true;
-
 
34096
 
-
 
34097
      sb.append("warehouseId:");
-
 
34098
      sb.append(this.warehouseId);
-
 
34099
      first = false;
-
 
34100
      if (!first) sb.append(", ");
-
 
34101
      sb.append("fromDate:");
-
 
34102
      sb.append(this.fromDate);
-
 
34103
      first = false;
-
 
34104
      if (!first) sb.append(", ");
-
 
34105
      sb.append("toDate:");
-
 
34106
      sb.append(this.toDate);
-
 
34107
      first = false;
-
 
34108
      sb.append(")");
-
 
34109
      return sb.toString();
-
 
34110
    }
-
 
34111
 
-
 
34112
    public void validate() throws TException {
-
 
34113
      // check for required fields
-
 
34114
    }
-
 
34115
 
-
 
34116
  }
-
 
34117
 
-
 
34118
  public static class getReturnOrders_result implements TBase<getReturnOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrders_result>   {
-
 
34119
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrders_result");
-
 
34120
 
-
 
34121
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
34122
 
-
 
34123
    private List<ReturnOrder> success;
-
 
34124
 
-
 
34125
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
34126
    public enum _Fields implements TFieldIdEnum {
-
 
34127
      SUCCESS((short)0, "success");
-
 
34128
 
-
 
34129
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
34130
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
34131
 
-
 
34132
      static {
-
 
34133
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
34134
          byId.put((int)field._thriftId, field);
-
 
34135
          byName.put(field.getFieldName(), field);
-
 
34136
        }
-
 
34137
      }
-
 
34138
 
-
 
34139
      /**
-
 
34140
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
34141
       */
-
 
34142
      public static _Fields findByThriftId(int fieldId) {
-
 
34143
        return byId.get(fieldId);
-
 
34144
      }
-
 
34145
 
-
 
34146
      /**
-
 
34147
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
34148
       * if it is not found.
-
 
34149
       */
-
 
34150
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
34151
        _Fields fields = findByThriftId(fieldId);
-
 
34152
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
34153
        return fields;
-
 
34154
      }
-
 
34155
 
-
 
34156
      /**
-
 
34157
       * Find the _Fields constant that matches name, or null if its not found.
-
 
34158
       */
-
 
34159
      public static _Fields findByName(String name) {
-
 
34160
        return byName.get(name);
-
 
34161
      }
-
 
34162
 
-
 
34163
      private final short _thriftId;
-
 
34164
      private final String _fieldName;
-
 
34165
 
-
 
34166
      _Fields(short thriftId, String fieldName) {
-
 
34167
        _thriftId = thriftId;
-
 
34168
        _fieldName = fieldName;
-
 
34169
      }
-
 
34170
 
-
 
34171
      public short getThriftFieldId() {
-
 
34172
        return _thriftId;
-
 
34173
      }
-
 
34174
 
-
 
34175
      public String getFieldName() {
-
 
34176
        return _fieldName;
-
 
34177
      }
-
 
34178
    }
-
 
34179
 
-
 
34180
    // isset id assignments
-
 
34181
 
-
 
34182
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
34183
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
34184
          new ListMetaData(TType.LIST, 
-
 
34185
              new StructMetaData(TType.STRUCT, ReturnOrder.class))));
-
 
34186
    }});
-
 
34187
 
-
 
34188
    static {
-
 
34189
      FieldMetaData.addStructMetaDataMap(getReturnOrders_result.class, metaDataMap);
-
 
34190
    }
-
 
34191
 
-
 
34192
    public getReturnOrders_result() {
-
 
34193
    }
-
 
34194
 
-
 
34195
    public getReturnOrders_result(
-
 
34196
      List<ReturnOrder> success)
-
 
34197
    {
-
 
34198
      this();
-
 
34199
      this.success = success;
-
 
34200
    }
-
 
34201
 
-
 
34202
    /**
-
 
34203
     * Performs a deep copy on <i>other</i>.
-
 
34204
     */
-
 
34205
    public getReturnOrders_result(getReturnOrders_result other) {
-
 
34206
      if (other.isSetSuccess()) {
-
 
34207
        List<ReturnOrder> __this__success = new ArrayList<ReturnOrder>();
-
 
34208
        for (ReturnOrder other_element : other.success) {
-
 
34209
          __this__success.add(new ReturnOrder(other_element));
-
 
34210
        }
-
 
34211
        this.success = __this__success;
-
 
34212
      }
-
 
34213
    }
-
 
34214
 
-
 
34215
    public getReturnOrders_result deepCopy() {
-
 
34216
      return new getReturnOrders_result(this);
-
 
34217
    }
-
 
34218
 
-
 
34219
    @Deprecated
-
 
34220
    public getReturnOrders_result clone() {
-
 
34221
      return new getReturnOrders_result(this);
-
 
34222
    }
-
 
34223
 
-
 
34224
    public int getSuccessSize() {
-
 
34225
      return (this.success == null) ? 0 : this.success.size();
-
 
34226
    }
-
 
34227
 
-
 
34228
    public java.util.Iterator<ReturnOrder> getSuccessIterator() {
-
 
34229
      return (this.success == null) ? null : this.success.iterator();
-
 
34230
    }
-
 
34231
 
-
 
34232
    public void addToSuccess(ReturnOrder elem) {
-
 
34233
      if (this.success == null) {
-
 
34234
        this.success = new ArrayList<ReturnOrder>();
-
 
34235
      }
-
 
34236
      this.success.add(elem);
-
 
34237
    }
-
 
34238
 
-
 
34239
    public List<ReturnOrder> getSuccess() {
-
 
34240
      return this.success;
-
 
34241
    }
-
 
34242
 
-
 
34243
    public getReturnOrders_result setSuccess(List<ReturnOrder> success) {
-
 
34244
      this.success = success;
-
 
34245
      return this;
-
 
34246
    }
-
 
34247
 
-
 
34248
    public void unsetSuccess() {
-
 
34249
      this.success = null;
-
 
34250
    }
-
 
34251
 
-
 
34252
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
34253
    public boolean isSetSuccess() {
-
 
34254
      return this.success != null;
-
 
34255
    }
-
 
34256
 
-
 
34257
    public void setSuccessIsSet(boolean value) {
-
 
34258
      if (!value) {
-
 
34259
        this.success = null;
-
 
34260
      }
-
 
34261
    }
-
 
34262
 
-
 
34263
    public void setFieldValue(_Fields field, Object value) {
-
 
34264
      switch (field) {
-
 
34265
      case SUCCESS:
-
 
34266
        if (value == null) {
-
 
34267
          unsetSuccess();
-
 
34268
        } else {
-
 
34269
          setSuccess((List<ReturnOrder>)value);
-
 
34270
        }
-
 
34271
        break;
-
 
34272
 
-
 
34273
      }
-
 
34274
    }
-
 
34275
 
-
 
34276
    public void setFieldValue(int fieldID, Object value) {
-
 
34277
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
34278
    }
-
 
34279
 
-
 
34280
    public Object getFieldValue(_Fields field) {
-
 
34281
      switch (field) {
-
 
34282
      case SUCCESS:
-
 
34283
        return getSuccess();
-
 
34284
 
-
 
34285
      }
-
 
34286
      throw new IllegalStateException();
-
 
34287
    }
-
 
34288
 
-
 
34289
    public Object getFieldValue(int fieldId) {
-
 
34290
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
34291
    }
-
 
34292
 
-
 
34293
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
34294
    public boolean isSet(_Fields field) {
-
 
34295
      switch (field) {
-
 
34296
      case SUCCESS:
-
 
34297
        return isSetSuccess();
-
 
34298
      }
-
 
34299
      throw new IllegalStateException();
-
 
34300
    }
-
 
34301
 
-
 
34302
    public boolean isSet(int fieldID) {
-
 
34303
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
34304
    }
-
 
34305
 
-
 
34306
    @Override
-
 
34307
    public boolean equals(Object that) {
-
 
34308
      if (that == null)
-
 
34309
        return false;
-
 
34310
      if (that instanceof getReturnOrders_result)
-
 
34311
        return this.equals((getReturnOrders_result)that);
-
 
34312
      return false;
-
 
34313
    }
-
 
34314
 
-
 
34315
    public boolean equals(getReturnOrders_result that) {
-
 
34316
      if (that == null)
-
 
34317
        return false;
-
 
34318
 
-
 
34319
      boolean this_present_success = true && this.isSetSuccess();
-
 
34320
      boolean that_present_success = true && that.isSetSuccess();
-
 
34321
      if (this_present_success || that_present_success) {
-
 
34322
        if (!(this_present_success && that_present_success))
-
 
34323
          return false;
-
 
34324
        if (!this.success.equals(that.success))
-
 
34325
          return false;
-
 
34326
      }
-
 
34327
 
-
 
34328
      return true;
-
 
34329
    }
-
 
34330
 
-
 
34331
    @Override
-
 
34332
    public int hashCode() {
-
 
34333
      return 0;
-
 
34334
    }
-
 
34335
 
-
 
34336
    public int compareTo(getReturnOrders_result other) {
-
 
34337
      if (!getClass().equals(other.getClass())) {
-
 
34338
        return getClass().getName().compareTo(other.getClass().getName());
-
 
34339
      }
-
 
34340
 
-
 
34341
      int lastComparison = 0;
-
 
34342
      getReturnOrders_result typedOther = (getReturnOrders_result)other;
-
 
34343
 
-
 
34344
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
34345
      if (lastComparison != 0) {
-
 
34346
        return lastComparison;
-
 
34347
      }
-
 
34348
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
34349
      if (lastComparison != 0) {
-
 
34350
        return lastComparison;
-
 
34351
      }
-
 
34352
      return 0;
-
 
34353
    }
-
 
34354
 
-
 
34355
    public void read(TProtocol iprot) throws TException {
-
 
34356
      TField field;
-
 
34357
      iprot.readStructBegin();
-
 
34358
      while (true)
-
 
34359
      {
-
 
34360
        field = iprot.readFieldBegin();
-
 
34361
        if (field.type == TType.STOP) { 
-
 
34362
          break;
-
 
34363
        }
-
 
34364
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
34365
        if (fieldId == null) {
-
 
34366
          TProtocolUtil.skip(iprot, field.type);
-
 
34367
        } else {
-
 
34368
          switch (fieldId) {
-
 
34369
            case SUCCESS:
-
 
34370
              if (field.type == TType.LIST) {
-
 
34371
                {
-
 
34372
                  TList _list88 = iprot.readListBegin();
-
 
34373
                  this.success = new ArrayList<ReturnOrder>(_list88.size);
-
 
34374
                  for (int _i89 = 0; _i89 < _list88.size; ++_i89)
-
 
34375
                  {
-
 
34376
                    ReturnOrder _elem90;
-
 
34377
                    _elem90 = new ReturnOrder();
-
 
34378
                    _elem90.read(iprot);
-
 
34379
                    this.success.add(_elem90);
-
 
34380
                  }
-
 
34381
                  iprot.readListEnd();
-
 
34382
                }
-
 
34383
              } else { 
-
 
34384
                TProtocolUtil.skip(iprot, field.type);
-
 
34385
              }
-
 
34386
              break;
-
 
34387
          }
-
 
34388
          iprot.readFieldEnd();
-
 
34389
        }
-
 
34390
      }
-
 
34391
      iprot.readStructEnd();
-
 
34392
      validate();
-
 
34393
    }
-
 
34394
 
-
 
34395
    public void write(TProtocol oprot) throws TException {
-
 
34396
      oprot.writeStructBegin(STRUCT_DESC);
-
 
34397
 
-
 
34398
      if (this.isSetSuccess()) {
-
 
34399
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
34400
        {
-
 
34401
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
34402
          for (ReturnOrder _iter91 : this.success)
-
 
34403
          {
-
 
34404
            _iter91.write(oprot);
-
 
34405
          }
-
 
34406
          oprot.writeListEnd();
-
 
34407
        }
-
 
34408
        oprot.writeFieldEnd();
-
 
34409
      }
-
 
34410
      oprot.writeFieldStop();
-
 
34411
      oprot.writeStructEnd();
-
 
34412
    }
-
 
34413
 
-
 
34414
    @Override
-
 
34415
    public String toString() {
-
 
34416
      StringBuilder sb = new StringBuilder("getReturnOrders_result(");
-
 
34417
      boolean first = true;
-
 
34418
 
-
 
34419
      sb.append("success:");
-
 
34420
      if (this.success == null) {
-
 
34421
        sb.append("null");
-
 
34422
      } else {
-
 
34423
        sb.append(this.success);
-
 
34424
      }
-
 
34425
      first = false;
-
 
34426
      sb.append(")");
-
 
34427
      return sb.toString();
-
 
34428
    }
-
 
34429
 
-
 
34430
    public void validate() throws TException {
-
 
34431
      // check for required fields
-
 
34432
    }
-
 
34433
 
-
 
34434
  }
-
 
34435
 
-
 
34436
  public static class processReturn_args implements TBase<processReturn_args._Fields>, java.io.Serializable, Cloneable, Comparable<processReturn_args>   {
-
 
34437
    private static final TStruct STRUCT_DESC = new TStruct("processReturn_args");
-
 
34438
 
-
 
34439
    private static final TField RETURN_ORDER_ID_FIELD_DESC = new TField("returnOrderId", TType.I64, (short)1);
-
 
34440
 
-
 
34441
    private long returnOrderId;
-
 
34442
 
-
 
34443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
34444
    public enum _Fields implements TFieldIdEnum {
-
 
34445
      RETURN_ORDER_ID((short)1, "returnOrderId");
-
 
34446
 
-
 
34447
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
34448
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
34449
 
-
 
34450
      static {
-
 
34451
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
34452
          byId.put((int)field._thriftId, field);
-
 
34453
          byName.put(field.getFieldName(), field);
-
 
34454
        }
-
 
34455
      }
-
 
34456
 
-
 
34457
      /**
-
 
34458
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
34459
       */
-
 
34460
      public static _Fields findByThriftId(int fieldId) {
-
 
34461
        return byId.get(fieldId);
-
 
34462
      }
-
 
34463
 
-
 
34464
      /**
-
 
34465
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
34466
       * if it is not found.
-
 
34467
       */
-
 
34468
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
34469
        _Fields fields = findByThriftId(fieldId);
-
 
34470
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
34471
        return fields;
-
 
34472
      }
-
 
34473
 
-
 
34474
      /**
-
 
34475
       * Find the _Fields constant that matches name, or null if its not found.
-
 
34476
       */
-
 
34477
      public static _Fields findByName(String name) {
-
 
34478
        return byName.get(name);
-
 
34479
      }
-
 
34480
 
-
 
34481
      private final short _thriftId;
-
 
34482
      private final String _fieldName;
-
 
34483
 
-
 
34484
      _Fields(short thriftId, String fieldName) {
-
 
34485
        _thriftId = thriftId;
-
 
34486
        _fieldName = fieldName;
-
 
34487
      }
-
 
34488
 
-
 
34489
      public short getThriftFieldId() {
-
 
34490
        return _thriftId;
-
 
34491
      }
-
 
34492
 
-
 
34493
      public String getFieldName() {
-
 
34494
        return _fieldName;
-
 
34495
      }
-
 
34496
    }
-
 
34497
 
-
 
34498
    // isset id assignments
-
 
34499
    private static final int __RETURNORDERID_ISSET_ID = 0;
-
 
34500
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
34501
 
-
 
34502
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
34503
      put(_Fields.RETURN_ORDER_ID, new FieldMetaData("returnOrderId", TFieldRequirementType.DEFAULT, 
-
 
34504
          new FieldValueMetaData(TType.I64)));
-
 
34505
    }});
-
 
34506
 
-
 
34507
    static {
-
 
34508
      FieldMetaData.addStructMetaDataMap(processReturn_args.class, metaDataMap);
-
 
34509
    }
-
 
34510
 
-
 
34511
    public processReturn_args() {
-
 
34512
    }
-
 
34513
 
-
 
34514
    public processReturn_args(
-
 
34515
      long returnOrderId)
-
 
34516
    {
-
 
34517
      this();
-
 
34518
      this.returnOrderId = returnOrderId;
-
 
34519
      setReturnOrderIdIsSet(true);
-
 
34520
    }
-
 
34521
 
-
 
34522
    /**
-
 
34523
     * Performs a deep copy on <i>other</i>.
-
 
34524
     */
-
 
34525
    public processReturn_args(processReturn_args other) {
-
 
34526
      __isset_bit_vector.clear();
-
 
34527
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
34528
      this.returnOrderId = other.returnOrderId;
-
 
34529
    }
-
 
34530
 
-
 
34531
    public processReturn_args deepCopy() {
-
 
34532
      return new processReturn_args(this);
-
 
34533
    }
-
 
34534
 
-
 
34535
    @Deprecated
-
 
34536
    public processReturn_args clone() {
-
 
34537
      return new processReturn_args(this);
-
 
34538
    }
-
 
34539
 
-
 
34540
    public long getReturnOrderId() {
-
 
34541
      return this.returnOrderId;
-
 
34542
    }
-
 
34543
 
-
 
34544
    public processReturn_args setReturnOrderId(long returnOrderId) {
-
 
34545
      this.returnOrderId = returnOrderId;
-
 
34546
      setReturnOrderIdIsSet(true);
-
 
34547
      return this;
-
 
34548
    }
-
 
34549
 
-
 
34550
    public void unsetReturnOrderId() {
-
 
34551
      __isset_bit_vector.clear(__RETURNORDERID_ISSET_ID);
-
 
34552
    }
-
 
34553
 
-
 
34554
    /** Returns true if field returnOrderId is set (has been asigned a value) and false otherwise */
-
 
34555
    public boolean isSetReturnOrderId() {
-
 
34556
      return __isset_bit_vector.get(__RETURNORDERID_ISSET_ID);
-
 
34557
    }
-
 
34558
 
-
 
34559
    public void setReturnOrderIdIsSet(boolean value) {
-
 
34560
      __isset_bit_vector.set(__RETURNORDERID_ISSET_ID, value);
-
 
34561
    }
-
 
34562
 
-
 
34563
    public void setFieldValue(_Fields field, Object value) {
-
 
34564
      switch (field) {
-
 
34565
      case RETURN_ORDER_ID:
-
 
34566
        if (value == null) {
-
 
34567
          unsetReturnOrderId();
-
 
34568
        } else {
-
 
34569
          setReturnOrderId((Long)value);
-
 
34570
        }
-
 
34571
        break;
-
 
34572
 
-
 
34573
      }
-
 
34574
    }
-
 
34575
 
-
 
34576
    public void setFieldValue(int fieldID, Object value) {
-
 
34577
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
34578
    }
-
 
34579
 
-
 
34580
    public Object getFieldValue(_Fields field) {
-
 
34581
      switch (field) {
-
 
34582
      case RETURN_ORDER_ID:
-
 
34583
        return new Long(getReturnOrderId());
-
 
34584
 
-
 
34585
      }
-
 
34586
      throw new IllegalStateException();
-
 
34587
    }
-
 
34588
 
-
 
34589
    public Object getFieldValue(int fieldId) {
-
 
34590
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
34591
    }
-
 
34592
 
-
 
34593
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
34594
    public boolean isSet(_Fields field) {
-
 
34595
      switch (field) {
-
 
34596
      case RETURN_ORDER_ID:
-
 
34597
        return isSetReturnOrderId();
-
 
34598
      }
-
 
34599
      throw new IllegalStateException();
-
 
34600
    }
-
 
34601
 
-
 
34602
    public boolean isSet(int fieldID) {
-
 
34603
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
34604
    }
-
 
34605
 
-
 
34606
    @Override
-
 
34607
    public boolean equals(Object that) {
-
 
34608
      if (that == null)
-
 
34609
        return false;
-
 
34610
      if (that instanceof processReturn_args)
-
 
34611
        return this.equals((processReturn_args)that);
-
 
34612
      return false;
-
 
34613
    }
-
 
34614
 
-
 
34615
    public boolean equals(processReturn_args that) {
-
 
34616
      if (that == null)
-
 
34617
        return false;
-
 
34618
 
-
 
34619
      boolean this_present_returnOrderId = true;
-
 
34620
      boolean that_present_returnOrderId = true;
-
 
34621
      if (this_present_returnOrderId || that_present_returnOrderId) {
-
 
34622
        if (!(this_present_returnOrderId && that_present_returnOrderId))
-
 
34623
          return false;
-
 
34624
        if (this.returnOrderId != that.returnOrderId)
-
 
34625
          return false;
-
 
34626
      }
-
 
34627
 
-
 
34628
      return true;
-
 
34629
    }
-
 
34630
 
-
 
34631
    @Override
-
 
34632
    public int hashCode() {
-
 
34633
      return 0;
-
 
34634
    }
-
 
34635
 
-
 
34636
    public int compareTo(processReturn_args other) {
-
 
34637
      if (!getClass().equals(other.getClass())) {
-
 
34638
        return getClass().getName().compareTo(other.getClass().getName());
-
 
34639
      }
-
 
34640
 
-
 
34641
      int lastComparison = 0;
-
 
34642
      processReturn_args typedOther = (processReturn_args)other;
-
 
34643
 
-
 
34644
      lastComparison = Boolean.valueOf(isSetReturnOrderId()).compareTo(isSetReturnOrderId());
-
 
34645
      if (lastComparison != 0) {
-
 
34646
        return lastComparison;
-
 
34647
      }
-
 
34648
      lastComparison = TBaseHelper.compareTo(returnOrderId, typedOther.returnOrderId);
-
 
34649
      if (lastComparison != 0) {
-
 
34650
        return lastComparison;
-
 
34651
      }
-
 
34652
      return 0;
-
 
34653
    }
-
 
34654
 
-
 
34655
    public void read(TProtocol iprot) throws TException {
-
 
34656
      TField field;
-
 
34657
      iprot.readStructBegin();
-
 
34658
      while (true)
-
 
34659
      {
-
 
34660
        field = iprot.readFieldBegin();
-
 
34661
        if (field.type == TType.STOP) { 
-
 
34662
          break;
-
 
34663
        }
-
 
34664
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
34665
        if (fieldId == null) {
-
 
34666
          TProtocolUtil.skip(iprot, field.type);
-
 
34667
        } else {
-
 
34668
          switch (fieldId) {
-
 
34669
            case RETURN_ORDER_ID:
-
 
34670
              if (field.type == TType.I64) {
-
 
34671
                this.returnOrderId = iprot.readI64();
-
 
34672
                setReturnOrderIdIsSet(true);
-
 
34673
              } else { 
-
 
34674
                TProtocolUtil.skip(iprot, field.type);
-
 
34675
              }
-
 
34676
              break;
-
 
34677
          }
-
 
34678
          iprot.readFieldEnd();
-
 
34679
        }
-
 
34680
      }
-
 
34681
      iprot.readStructEnd();
-
 
34682
      validate();
-
 
34683
    }
-
 
34684
 
-
 
34685
    public void write(TProtocol oprot) throws TException {
-
 
34686
      validate();
-
 
34687
 
-
 
34688
      oprot.writeStructBegin(STRUCT_DESC);
-
 
34689
      oprot.writeFieldBegin(RETURN_ORDER_ID_FIELD_DESC);
-
 
34690
      oprot.writeI64(this.returnOrderId);
-
 
34691
      oprot.writeFieldEnd();
-
 
34692
      oprot.writeFieldStop();
-
 
34693
      oprot.writeStructEnd();
-
 
34694
    }
-
 
34695
 
-
 
34696
    @Override
-
 
34697
    public String toString() {
-
 
34698
      StringBuilder sb = new StringBuilder("processReturn_args(");
-
 
34699
      boolean first = true;
-
 
34700
 
-
 
34701
      sb.append("returnOrderId:");
-
 
34702
      sb.append(this.returnOrderId);
-
 
34703
      first = false;
-
 
34704
      sb.append(")");
-
 
34705
      return sb.toString();
-
 
34706
    }
-
 
34707
 
-
 
34708
    public void validate() throws TException {
-
 
34709
      // check for required fields
-
 
34710
    }
-
 
34711
 
-
 
34712
  }
-
 
34713
 
-
 
34714
  public static class processReturn_result implements TBase<processReturn_result._Fields>, java.io.Serializable, Cloneable, Comparable<processReturn_result>   {
-
 
34715
    private static final TStruct STRUCT_DESC = new TStruct("processReturn_result");
-
 
34716
 
-
 
34717
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
-
 
34718
 
-
 
34719
    private TransactionServiceException ex;
-
 
34720
 
-
 
34721
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
34722
    public enum _Fields implements TFieldIdEnum {
-
 
34723
      EX((short)1, "ex");
-
 
34724
 
-
 
34725
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
34726
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
34727
 
-
 
34728
      static {
-
 
34729
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
34730
          byId.put((int)field._thriftId, field);
-
 
34731
          byName.put(field.getFieldName(), field);
-
 
34732
        }
-
 
34733
      }
-
 
34734
 
-
 
34735
      /**
-
 
34736
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
34737
       */
-
 
34738
      public static _Fields findByThriftId(int fieldId) {
-
 
34739
        return byId.get(fieldId);
-
 
34740
      }
-
 
34741
 
-
 
34742
      /**
-
 
34743
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
34744
       * if it is not found.
-
 
34745
       */
-
 
34746
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
34747
        _Fields fields = findByThriftId(fieldId);
-
 
34748
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
34749
        return fields;
-
 
34750
      }
-
 
34751
 
-
 
34752
      /**
-
 
34753
       * Find the _Fields constant that matches name, or null if its not found.
-
 
34754
       */
-
 
34755
      public static _Fields findByName(String name) {
-
 
34756
        return byName.get(name);
-
 
34757
      }
-
 
34758
 
-
 
34759
      private final short _thriftId;
-
 
34760
      private final String _fieldName;
-
 
34761
 
-
 
34762
      _Fields(short thriftId, String fieldName) {
-
 
34763
        _thriftId = thriftId;
-
 
34764
        _fieldName = fieldName;
-
 
34765
      }
-
 
34766
 
-
 
34767
      public short getThriftFieldId() {
-
 
34768
        return _thriftId;
-
 
34769
      }
-
 
34770
 
-
 
34771
      public String getFieldName() {
-
 
34772
        return _fieldName;
-
 
34773
      }
-
 
34774
    }
-
 
34775
 
-
 
34776
    // isset id assignments
-
 
34777
 
-
 
34778
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
34779
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
-
 
34780
          new FieldValueMetaData(TType.STRUCT)));
-
 
34781
    }});
-
 
34782
 
-
 
34783
    static {
-
 
34784
      FieldMetaData.addStructMetaDataMap(processReturn_result.class, metaDataMap);
-
 
34785
    }
-
 
34786
 
-
 
34787
    public processReturn_result() {
-
 
34788
    }
-
 
34789
 
-
 
34790
    public processReturn_result(
-
 
34791
      TransactionServiceException ex)
-
 
34792
    {
-
 
34793
      this();
-
 
34794
      this.ex = ex;
-
 
34795
    }
-
 
34796
 
-
 
34797
    /**
-
 
34798
     * Performs a deep copy on <i>other</i>.
-
 
34799
     */
-
 
34800
    public processReturn_result(processReturn_result other) {
-
 
34801
      if (other.isSetEx()) {
-
 
34802
        this.ex = new TransactionServiceException(other.ex);
-
 
34803
      }
-
 
34804
    }
-
 
34805
 
-
 
34806
    public processReturn_result deepCopy() {
-
 
34807
      return new processReturn_result(this);
-
 
34808
    }
-
 
34809
 
-
 
34810
    @Deprecated
-
 
34811
    public processReturn_result clone() {
-
 
34812
      return new processReturn_result(this);
-
 
34813
    }
-
 
34814
 
-
 
34815
    public TransactionServiceException getEx() {
-
 
34816
      return this.ex;
-
 
34817
    }
-
 
34818
 
-
 
34819
    public processReturn_result setEx(TransactionServiceException ex) {
-
 
34820
      this.ex = ex;
-
 
34821
      return this;
-
 
34822
    }
-
 
34823
 
-
 
34824
    public void unsetEx() {
-
 
34825
      this.ex = null;
-
 
34826
    }
-
 
34827
 
-
 
34828
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
-
 
34829
    public boolean isSetEx() {
-
 
34830
      return this.ex != null;
-
 
34831
    }
-
 
34832
 
-
 
34833
    public void setExIsSet(boolean value) {
-
 
34834
      if (!value) {
-
 
34835
        this.ex = null;
-
 
34836
      }
-
 
34837
    }
-
 
34838
 
-
 
34839
    public void setFieldValue(_Fields field, Object value) {
-
 
34840
      switch (field) {
-
 
34841
      case EX:
-
 
34842
        if (value == null) {
-
 
34843
          unsetEx();
-
 
34844
        } else {
-
 
34845
          setEx((TransactionServiceException)value);
-
 
34846
        }
-
 
34847
        break;
-
 
34848
 
-
 
34849
      }
-
 
34850
    }
-
 
34851
 
-
 
34852
    public void setFieldValue(int fieldID, Object value) {
-
 
34853
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
34854
    }
-
 
34855
 
-
 
34856
    public Object getFieldValue(_Fields field) {
-
 
34857
      switch (field) {
-
 
34858
      case EX:
-
 
34859
        return getEx();
-
 
34860
 
-
 
34861
      }
-
 
34862
      throw new IllegalStateException();
-
 
34863
    }
-
 
34864
 
-
 
34865
    public Object getFieldValue(int fieldId) {
-
 
34866
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
34867
    }
-
 
34868
 
-
 
34869
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
34870
    public boolean isSet(_Fields field) {
-
 
34871
      switch (field) {
-
 
34872
      case EX:
-
 
34873
        return isSetEx();
-
 
34874
      }
-
 
34875
      throw new IllegalStateException();
-
 
34876
    }
-
 
34877
 
-
 
34878
    public boolean isSet(int fieldID) {
-
 
34879
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
34880
    }
-
 
34881
 
-
 
34882
    @Override
-
 
34883
    public boolean equals(Object that) {
-
 
34884
      if (that == null)
-
 
34885
        return false;
-
 
34886
      if (that instanceof processReturn_result)
-
 
34887
        return this.equals((processReturn_result)that);
-
 
34888
      return false;
-
 
34889
    }
-
 
34890
 
-
 
34891
    public boolean equals(processReturn_result that) {
-
 
34892
      if (that == null)
-
 
34893
        return false;
-
 
34894
 
-
 
34895
      boolean this_present_ex = true && this.isSetEx();
-
 
34896
      boolean that_present_ex = true && that.isSetEx();
-
 
34897
      if (this_present_ex || that_present_ex) {
-
 
34898
        if (!(this_present_ex && that_present_ex))
-
 
34899
          return false;
-
 
34900
        if (!this.ex.equals(that.ex))
-
 
34901
          return false;
-
 
34902
      }
-
 
34903
 
-
 
34904
      return true;
-
 
34905
    }
-
 
34906
 
-
 
34907
    @Override
-
 
34908
    public int hashCode() {
-
 
34909
      return 0;
-
 
34910
    }
-
 
34911
 
-
 
34912
    public int compareTo(processReturn_result other) {
-
 
34913
      if (!getClass().equals(other.getClass())) {
-
 
34914
        return getClass().getName().compareTo(other.getClass().getName());
-
 
34915
      }
-
 
34916
 
-
 
34917
      int lastComparison = 0;
-
 
34918
      processReturn_result typedOther = (processReturn_result)other;
-
 
34919
 
-
 
34920
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
-
 
34921
      if (lastComparison != 0) {
-
 
34922
        return lastComparison;
-
 
34923
      }
-
 
34924
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
-
 
34925
      if (lastComparison != 0) {
-
 
34926
        return lastComparison;
-
 
34927
      }
-
 
34928
      return 0;
-
 
34929
    }
-
 
34930
 
-
 
34931
    public void read(TProtocol iprot) throws TException {
-
 
34932
      TField field;
-
 
34933
      iprot.readStructBegin();
-
 
34934
      while (true)
-
 
34935
      {
-
 
34936
        field = iprot.readFieldBegin();
-
 
34937
        if (field.type == TType.STOP) { 
-
 
34938
          break;
-
 
34939
        }
-
 
34940
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
34941
        if (fieldId == null) {
-
 
34942
          TProtocolUtil.skip(iprot, field.type);
-
 
34943
        } else {
-
 
34944
          switch (fieldId) {
-
 
34945
            case EX:
-
 
34946
              if (field.type == TType.STRUCT) {
-
 
34947
                this.ex = new TransactionServiceException();
-
 
34948
                this.ex.read(iprot);
-
 
34949
              } else { 
-
 
34950
                TProtocolUtil.skip(iprot, field.type);
-
 
34951
              }
-
 
34952
              break;
-
 
34953
          }
-
 
34954
          iprot.readFieldEnd();
-
 
34955
        }
-
 
34956
      }
-
 
34957
      iprot.readStructEnd();
-
 
34958
      validate();
-
 
34959
    }
-
 
34960
 
-
 
34961
    public void write(TProtocol oprot) throws TException {
-
 
34962
      oprot.writeStructBegin(STRUCT_DESC);
-
 
34963
 
-
 
34964
      if (this.isSetEx()) {
-
 
34965
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
34966
        this.ex.write(oprot);
-
 
34967
        oprot.writeFieldEnd();
-
 
34968
      }
-
 
34969
      oprot.writeFieldStop();
-
 
34970
      oprot.writeStructEnd();
-
 
34971
    }
-
 
34972
 
-
 
34973
    @Override
-
 
34974
    public String toString() {
-
 
34975
      StringBuilder sb = new StringBuilder("processReturn_result(");
-
 
34976
      boolean first = true;
-
 
34977
 
-
 
34978
      sb.append("ex:");
-
 
34979
      if (this.ex == null) {
-
 
34980
        sb.append("null");
-
 
34981
      } else {
-
 
34982
        sb.append(this.ex);
33541
      }
34983
      }
33542
      first = false;
34984
      first = false;
33543
      sb.append(")");
34985
      sb.append(")");
33544
      return sb.toString();
34986
      return sb.toString();
33545
    }
34987
    }