Subversion Repositories SmartDukaan

Rev

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

Rev 2690 Rev 2700
Line 324... Line 324...
324
     * @param toDate
324
     * @param toDate
325
     */
325
     */
326
    public List<ReturnOrder> getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException;
326
    public List<ReturnOrder> getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException;
327
 
327
 
328
    /**
328
    /**
-
 
329
     * Returns the ReturnOrder corresponding to the given id.
-
 
330
     * Throws an exception if the return order with the given id couldn't be found.
-
 
331
     * 
-
 
332
     * @param id
-
 
333
     */
-
 
334
    public ReturnOrder getReturnOrder(long id) throws TransactionServiceException, TException;
-
 
335
 
-
 
336
    /**
329
     * Marks the return order with the given id as processed. Raises an exception if no such return order exists.
337
     * Marks the return order with the given id as processed. Raises an exception if no such return order exists.
330
     * 
338
     * 
331
     * @param returnOrderId
339
     * @param returnOrderId
332
     */
340
     */
333
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException;
341
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException;
Line 1970... Line 1978...
1970
        return result.success;
1978
        return result.success;
1971
      }
1979
      }
1972
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrders failed: unknown result");
1980
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrders failed: unknown result");
1973
    }
1981
    }
1974
 
1982
 
-
 
1983
    public ReturnOrder getReturnOrder(long id) throws TransactionServiceException, TException
-
 
1984
    {
-
 
1985
      send_getReturnOrder(id);
-
 
1986
      return recv_getReturnOrder();
-
 
1987
    }
-
 
1988
 
-
 
1989
    public void send_getReturnOrder(long id) throws TException
-
 
1990
    {
-
 
1991
      oprot_.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.CALL, seqid_));
-
 
1992
      getReturnOrder_args args = new getReturnOrder_args();
-
 
1993
      args.id = id;
-
 
1994
      args.write(oprot_);
-
 
1995
      oprot_.writeMessageEnd();
-
 
1996
      oprot_.getTransport().flush();
-
 
1997
    }
-
 
1998
 
-
 
1999
    public ReturnOrder recv_getReturnOrder() throws TransactionServiceException, TException
-
 
2000
    {
-
 
2001
      TMessage msg = iprot_.readMessageBegin();
-
 
2002
      if (msg.type == TMessageType.EXCEPTION) {
-
 
2003
        TApplicationException x = TApplicationException.read(iprot_);
-
 
2004
        iprot_.readMessageEnd();
-
 
2005
        throw x;
-
 
2006
      }
-
 
2007
      getReturnOrder_result result = new getReturnOrder_result();
-
 
2008
      result.read(iprot_);
-
 
2009
      iprot_.readMessageEnd();
-
 
2010
      if (result.isSetSuccess()) {
-
 
2011
        return result.success;
-
 
2012
      }
-
 
2013
      if (result.ex != null) {
-
 
2014
        throw result.ex;
-
 
2015
      }
-
 
2016
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrder failed: unknown result");
-
 
2017
    }
-
 
2018
 
1975
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException
2019
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException
1976
    {
2020
    {
1977
      send_processReturn(returnOrderId);
2021
      send_processReturn(returnOrderId);
1978
      recv_processReturn();
2022
      recv_processReturn();
1979
    }
2023
    }
Line 2054... Line 2098...
2054
      processMap_.put("receiveReturn", new receiveReturn());
2098
      processMap_.put("receiveReturn", new receiveReturn());
2055
      processMap_.put("validateDoa", new validateDoa());
2099
      processMap_.put("validateDoa", new validateDoa());
2056
      processMap_.put("reshipOrder", new reshipOrder());
2100
      processMap_.put("reshipOrder", new reshipOrder());
2057
      processMap_.put("refundOrder", new refundOrder());
2101
      processMap_.put("refundOrder", new refundOrder());
2058
      processMap_.put("getReturnOrders", new getReturnOrders());
2102
      processMap_.put("getReturnOrders", new getReturnOrders());
-
 
2103
      processMap_.put("getReturnOrder", new getReturnOrder());
2059
      processMap_.put("processReturn", new processReturn());
2104
      processMap_.put("processReturn", new processReturn());
2060
    }
2105
    }
2061
 
2106
 
2062
    protected static interface ProcessFunction {
2107
    protected static interface ProcessFunction {
2063
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
2108
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
Line 3254... Line 3299...
3254
        oprot.getTransport().flush();
3299
        oprot.getTransport().flush();
3255
      }
3300
      }
3256
 
3301
 
3257
    }
3302
    }
3258
 
3303
 
-
 
3304
    private class getReturnOrder implements ProcessFunction {
-
 
3305
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
3306
      {
-
 
3307
        getReturnOrder_args args = new getReturnOrder_args();
-
 
3308
        args.read(iprot);
-
 
3309
        iprot.readMessageEnd();
-
 
3310
        getReturnOrder_result result = new getReturnOrder_result();
-
 
3311
        try {
-
 
3312
          result.success = iface_.getReturnOrder(args.id);
-
 
3313
        } catch (TransactionServiceException ex) {
-
 
3314
          result.ex = ex;
-
 
3315
        } catch (Throwable th) {
-
 
3316
          LOGGER.error("Internal error processing getReturnOrder", th);
-
 
3317
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnOrder");
-
 
3318
          oprot.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.EXCEPTION, seqid));
-
 
3319
          x.write(oprot);
-
 
3320
          oprot.writeMessageEnd();
-
 
3321
          oprot.getTransport().flush();
-
 
3322
          return;
-
 
3323
        }
-
 
3324
        oprot.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.REPLY, seqid));
-
 
3325
        result.write(oprot);
-
 
3326
        oprot.writeMessageEnd();
-
 
3327
        oprot.getTransport().flush();
-
 
3328
      }
-
 
3329
 
-
 
3330
    }
-
 
3331
 
3259
    private class processReturn implements ProcessFunction {
3332
    private class processReturn implements ProcessFunction {
3260
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3333
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3261
      {
3334
      {
3262
        processReturn_args args = new processReturn_args();
3335
        processReturn_args args = new processReturn_args();
3263
        args.read(iprot);
3336
        args.read(iprot);
Line 34424... Line 34497...
34424
      }
34497
      }
34425
      first = false;
34498
      first = false;
34426
      sb.append(")");
34499
      sb.append(")");
34427
      return sb.toString();
34500
      return sb.toString();
34428
    }
34501
    }
-
 
34502
 
-
 
34503
    public void validate() throws TException {
-
 
34504
      // check for required fields
-
 
34505
    }
-
 
34506
 
-
 
34507
  }
-
 
34508
 
-
 
34509
  public static class getReturnOrder_args implements TBase<getReturnOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrder_args>   {
-
 
34510
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrder_args");
-
 
34511
 
-
 
34512
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
-
 
34513
 
-
 
34514
    private long id;
-
 
34515
 
-
 
34516
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
34517
    public enum _Fields implements TFieldIdEnum {
-
 
34518
      ID((short)1, "id");
-
 
34519
 
-
 
34520
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
34521
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
34522
 
-
 
34523
      static {
-
 
34524
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
34525
          byId.put((int)field._thriftId, field);
-
 
34526
          byName.put(field.getFieldName(), field);
-
 
34527
        }
-
 
34528
      }
-
 
34529
 
-
 
34530
      /**
-
 
34531
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
34532
       */
-
 
34533
      public static _Fields findByThriftId(int fieldId) {
-
 
34534
        return byId.get(fieldId);
-
 
34535
      }
-
 
34536
 
-
 
34537
      /**
-
 
34538
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
34539
       * if it is not found.
-
 
34540
       */
-
 
34541
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
34542
        _Fields fields = findByThriftId(fieldId);
-
 
34543
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
34544
        return fields;
-
 
34545
      }
-
 
34546
 
-
 
34547
      /**
-
 
34548
       * Find the _Fields constant that matches name, or null if its not found.
-
 
34549
       */
-
 
34550
      public static _Fields findByName(String name) {
-
 
34551
        return byName.get(name);
-
 
34552
      }
-
 
34553
 
-
 
34554
      private final short _thriftId;
-
 
34555
      private final String _fieldName;
-
 
34556
 
-
 
34557
      _Fields(short thriftId, String fieldName) {
-
 
34558
        _thriftId = thriftId;
-
 
34559
        _fieldName = fieldName;
-
 
34560
      }
-
 
34561
 
-
 
34562
      public short getThriftFieldId() {
-
 
34563
        return _thriftId;
-
 
34564
      }
-
 
34565
 
-
 
34566
      public String getFieldName() {
-
 
34567
        return _fieldName;
-
 
34568
      }
-
 
34569
    }
-
 
34570
 
-
 
34571
    // isset id assignments
-
 
34572
    private static final int __ID_ISSET_ID = 0;
-
 
34573
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
34574
 
-
 
34575
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
34576
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
-
 
34577
          new FieldValueMetaData(TType.I64)));
-
 
34578
    }});
-
 
34579
 
-
 
34580
    static {
-
 
34581
      FieldMetaData.addStructMetaDataMap(getReturnOrder_args.class, metaDataMap);
-
 
34582
    }
-
 
34583
 
-
 
34584
    public getReturnOrder_args() {
-
 
34585
    }
-
 
34586
 
-
 
34587
    public getReturnOrder_args(
-
 
34588
      long id)
-
 
34589
    {
-
 
34590
      this();
-
 
34591
      this.id = id;
-
 
34592
      setIdIsSet(true);
-
 
34593
    }
-
 
34594
 
-
 
34595
    /**
-
 
34596
     * Performs a deep copy on <i>other</i>.
-
 
34597
     */
-
 
34598
    public getReturnOrder_args(getReturnOrder_args other) {
-
 
34599
      __isset_bit_vector.clear();
-
 
34600
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
34601
      this.id = other.id;
-
 
34602
    }
-
 
34603
 
-
 
34604
    public getReturnOrder_args deepCopy() {
-
 
34605
      return new getReturnOrder_args(this);
-
 
34606
    }
-
 
34607
 
-
 
34608
    @Deprecated
-
 
34609
    public getReturnOrder_args clone() {
-
 
34610
      return new getReturnOrder_args(this);
-
 
34611
    }
-
 
34612
 
-
 
34613
    public long getId() {
-
 
34614
      return this.id;
-
 
34615
    }
-
 
34616
 
-
 
34617
    public getReturnOrder_args setId(long id) {
-
 
34618
      this.id = id;
-
 
34619
      setIdIsSet(true);
-
 
34620
      return this;
-
 
34621
    }
-
 
34622
 
-
 
34623
    public void unsetId() {
-
 
34624
      __isset_bit_vector.clear(__ID_ISSET_ID);
-
 
34625
    }
-
 
34626
 
-
 
34627
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
-
 
34628
    public boolean isSetId() {
-
 
34629
      return __isset_bit_vector.get(__ID_ISSET_ID);
-
 
34630
    }
-
 
34631
 
-
 
34632
    public void setIdIsSet(boolean value) {
-
 
34633
      __isset_bit_vector.set(__ID_ISSET_ID, value);
-
 
34634
    }
-
 
34635
 
-
 
34636
    public void setFieldValue(_Fields field, Object value) {
-
 
34637
      switch (field) {
-
 
34638
      case ID:
-
 
34639
        if (value == null) {
-
 
34640
          unsetId();
-
 
34641
        } else {
-
 
34642
          setId((Long)value);
-
 
34643
        }
-
 
34644
        break;
-
 
34645
 
-
 
34646
      }
-
 
34647
    }
-
 
34648
 
-
 
34649
    public void setFieldValue(int fieldID, Object value) {
-
 
34650
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
34651
    }
-
 
34652
 
-
 
34653
    public Object getFieldValue(_Fields field) {
-
 
34654
      switch (field) {
-
 
34655
      case ID:
-
 
34656
        return new Long(getId());
-
 
34657
 
-
 
34658
      }
-
 
34659
      throw new IllegalStateException();
-
 
34660
    }
-
 
34661
 
-
 
34662
    public Object getFieldValue(int fieldId) {
-
 
34663
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
34664
    }
-
 
34665
 
-
 
34666
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
34667
    public boolean isSet(_Fields field) {
-
 
34668
      switch (field) {
-
 
34669
      case ID:
-
 
34670
        return isSetId();
-
 
34671
      }
-
 
34672
      throw new IllegalStateException();
-
 
34673
    }
-
 
34674
 
-
 
34675
    public boolean isSet(int fieldID) {
-
 
34676
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
34677
    }
-
 
34678
 
-
 
34679
    @Override
-
 
34680
    public boolean equals(Object that) {
-
 
34681
      if (that == null)
-
 
34682
        return false;
-
 
34683
      if (that instanceof getReturnOrder_args)
-
 
34684
        return this.equals((getReturnOrder_args)that);
-
 
34685
      return false;
-
 
34686
    }
-
 
34687
 
-
 
34688
    public boolean equals(getReturnOrder_args that) {
-
 
34689
      if (that == null)
-
 
34690
        return false;
-
 
34691
 
-
 
34692
      boolean this_present_id = true;
-
 
34693
      boolean that_present_id = true;
-
 
34694
      if (this_present_id || that_present_id) {
-
 
34695
        if (!(this_present_id && that_present_id))
-
 
34696
          return false;
-
 
34697
        if (this.id != that.id)
-
 
34698
          return false;
-
 
34699
      }
-
 
34700
 
-
 
34701
      return true;
-
 
34702
    }
-
 
34703
 
-
 
34704
    @Override
-
 
34705
    public int hashCode() {
-
 
34706
      return 0;
-
 
34707
    }
-
 
34708
 
-
 
34709
    public int compareTo(getReturnOrder_args other) {
-
 
34710
      if (!getClass().equals(other.getClass())) {
-
 
34711
        return getClass().getName().compareTo(other.getClass().getName());
-
 
34712
      }
-
 
34713
 
-
 
34714
      int lastComparison = 0;
-
 
34715
      getReturnOrder_args typedOther = (getReturnOrder_args)other;
-
 
34716
 
-
 
34717
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
-
 
34718
      if (lastComparison != 0) {
-
 
34719
        return lastComparison;
-
 
34720
      }
-
 
34721
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
-
 
34722
      if (lastComparison != 0) {
-
 
34723
        return lastComparison;
-
 
34724
      }
-
 
34725
      return 0;
-
 
34726
    }
-
 
34727
 
-
 
34728
    public void read(TProtocol iprot) throws TException {
-
 
34729
      TField field;
-
 
34730
      iprot.readStructBegin();
-
 
34731
      while (true)
-
 
34732
      {
-
 
34733
        field = iprot.readFieldBegin();
-
 
34734
        if (field.type == TType.STOP) { 
-
 
34735
          break;
-
 
34736
        }
-
 
34737
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
34738
        if (fieldId == null) {
-
 
34739
          TProtocolUtil.skip(iprot, field.type);
-
 
34740
        } else {
-
 
34741
          switch (fieldId) {
-
 
34742
            case ID:
-
 
34743
              if (field.type == TType.I64) {
-
 
34744
                this.id = iprot.readI64();
-
 
34745
                setIdIsSet(true);
-
 
34746
              } else { 
-
 
34747
                TProtocolUtil.skip(iprot, field.type);
-
 
34748
              }
-
 
34749
              break;
-
 
34750
          }
-
 
34751
          iprot.readFieldEnd();
-
 
34752
        }
-
 
34753
      }
-
 
34754
      iprot.readStructEnd();
-
 
34755
      validate();
-
 
34756
    }
-
 
34757
 
-
 
34758
    public void write(TProtocol oprot) throws TException {
-
 
34759
      validate();
-
 
34760
 
-
 
34761
      oprot.writeStructBegin(STRUCT_DESC);
-
 
34762
      oprot.writeFieldBegin(ID_FIELD_DESC);
-
 
34763
      oprot.writeI64(this.id);
-
 
34764
      oprot.writeFieldEnd();
-
 
34765
      oprot.writeFieldStop();
-
 
34766
      oprot.writeStructEnd();
-
 
34767
    }
-
 
34768
 
-
 
34769
    @Override
-
 
34770
    public String toString() {
-
 
34771
      StringBuilder sb = new StringBuilder("getReturnOrder_args(");
-
 
34772
      boolean first = true;
-
 
34773
 
-
 
34774
      sb.append("id:");
-
 
34775
      sb.append(this.id);
-
 
34776
      first = false;
-
 
34777
      sb.append(")");
-
 
34778
      return sb.toString();
-
 
34779
    }
-
 
34780
 
-
 
34781
    public void validate() throws TException {
-
 
34782
      // check for required fields
-
 
34783
    }
-
 
34784
 
-
 
34785
  }
-
 
34786
 
-
 
34787
  public static class getReturnOrder_result implements TBase<getReturnOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrder_result>   {
-
 
34788
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrder_result");
-
 
34789
 
-
 
34790
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
-
 
34791
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
-
 
34792
 
-
 
34793
    private ReturnOrder success;
-
 
34794
    private TransactionServiceException ex;
-
 
34795
 
-
 
34796
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
34797
    public enum _Fields implements TFieldIdEnum {
-
 
34798
      SUCCESS((short)0, "success"),
-
 
34799
      EX((short)1, "ex");
-
 
34800
 
-
 
34801
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
34802
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
34803
 
-
 
34804
      static {
-
 
34805
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
34806
          byId.put((int)field._thriftId, field);
-
 
34807
          byName.put(field.getFieldName(), field);
-
 
34808
        }
-
 
34809
      }
-
 
34810
 
-
 
34811
      /**
-
 
34812
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
34813
       */
-
 
34814
      public static _Fields findByThriftId(int fieldId) {
-
 
34815
        return byId.get(fieldId);
-
 
34816
      }
-
 
34817
 
-
 
34818
      /**
-
 
34819
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
34820
       * if it is not found.
-
 
34821
       */
-
 
34822
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
34823
        _Fields fields = findByThriftId(fieldId);
-
 
34824
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
34825
        return fields;
-
 
34826
      }
-
 
34827
 
-
 
34828
      /**
-
 
34829
       * Find the _Fields constant that matches name, or null if its not found.
-
 
34830
       */
-
 
34831
      public static _Fields findByName(String name) {
-
 
34832
        return byName.get(name);
-
 
34833
      }
-
 
34834
 
-
 
34835
      private final short _thriftId;
-
 
34836
      private final String _fieldName;
-
 
34837
 
-
 
34838
      _Fields(short thriftId, String fieldName) {
-
 
34839
        _thriftId = thriftId;
-
 
34840
        _fieldName = fieldName;
-
 
34841
      }
-
 
34842
 
-
 
34843
      public short getThriftFieldId() {
-
 
34844
        return _thriftId;
-
 
34845
      }
-
 
34846
 
-
 
34847
      public String getFieldName() {
-
 
34848
        return _fieldName;
-
 
34849
      }
-
 
34850
    }
-
 
34851
 
-
 
34852
    // isset id assignments
-
 
34853
 
-
 
34854
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
34855
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
34856
          new StructMetaData(TType.STRUCT, ReturnOrder.class)));
-
 
34857
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
-
 
34858
          new FieldValueMetaData(TType.STRUCT)));
-
 
34859
    }});
-
 
34860
 
-
 
34861
    static {
-
 
34862
      FieldMetaData.addStructMetaDataMap(getReturnOrder_result.class, metaDataMap);
-
 
34863
    }
-
 
34864
 
-
 
34865
    public getReturnOrder_result() {
-
 
34866
    }
-
 
34867
 
-
 
34868
    public getReturnOrder_result(
-
 
34869
      ReturnOrder success,
-
 
34870
      TransactionServiceException ex)
-
 
34871
    {
-
 
34872
      this();
-
 
34873
      this.success = success;
-
 
34874
      this.ex = ex;
-
 
34875
    }
-
 
34876
 
-
 
34877
    /**
-
 
34878
     * Performs a deep copy on <i>other</i>.
-
 
34879
     */
-
 
34880
    public getReturnOrder_result(getReturnOrder_result other) {
-
 
34881
      if (other.isSetSuccess()) {
-
 
34882
        this.success = new ReturnOrder(other.success);
-
 
34883
      }
-
 
34884
      if (other.isSetEx()) {
-
 
34885
        this.ex = new TransactionServiceException(other.ex);
-
 
34886
      }
-
 
34887
    }
-
 
34888
 
-
 
34889
    public getReturnOrder_result deepCopy() {
-
 
34890
      return new getReturnOrder_result(this);
-
 
34891
    }
-
 
34892
 
-
 
34893
    @Deprecated
-
 
34894
    public getReturnOrder_result clone() {
-
 
34895
      return new getReturnOrder_result(this);
-
 
34896
    }
-
 
34897
 
-
 
34898
    public ReturnOrder getSuccess() {
-
 
34899
      return this.success;
-
 
34900
    }
-
 
34901
 
-
 
34902
    public getReturnOrder_result setSuccess(ReturnOrder success) {
-
 
34903
      this.success = success;
-
 
34904
      return this;
-
 
34905
    }
-
 
34906
 
-
 
34907
    public void unsetSuccess() {
-
 
34908
      this.success = null;
-
 
34909
    }
-
 
34910
 
-
 
34911
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
34912
    public boolean isSetSuccess() {
-
 
34913
      return this.success != null;
-
 
34914
    }
-
 
34915
 
-
 
34916
    public void setSuccessIsSet(boolean value) {
-
 
34917
      if (!value) {
-
 
34918
        this.success = null;
-
 
34919
      }
-
 
34920
    }
-
 
34921
 
-
 
34922
    public TransactionServiceException getEx() {
-
 
34923
      return this.ex;
-
 
34924
    }
-
 
34925
 
-
 
34926
    public getReturnOrder_result setEx(TransactionServiceException ex) {
-
 
34927
      this.ex = ex;
-
 
34928
      return this;
-
 
34929
    }
-
 
34930
 
-
 
34931
    public void unsetEx() {
-
 
34932
      this.ex = null;
-
 
34933
    }
-
 
34934
 
-
 
34935
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
-
 
34936
    public boolean isSetEx() {
-
 
34937
      return this.ex != null;
-
 
34938
    }
-
 
34939
 
-
 
34940
    public void setExIsSet(boolean value) {
-
 
34941
      if (!value) {
-
 
34942
        this.ex = null;
-
 
34943
      }
-
 
34944
    }
-
 
34945
 
-
 
34946
    public void setFieldValue(_Fields field, Object value) {
-
 
34947
      switch (field) {
-
 
34948
      case SUCCESS:
-
 
34949
        if (value == null) {
-
 
34950
          unsetSuccess();
-
 
34951
        } else {
-
 
34952
          setSuccess((ReturnOrder)value);
-
 
34953
        }
-
 
34954
        break;
-
 
34955
 
-
 
34956
      case EX:
-
 
34957
        if (value == null) {
-
 
34958
          unsetEx();
-
 
34959
        } else {
-
 
34960
          setEx((TransactionServiceException)value);
-
 
34961
        }
-
 
34962
        break;
-
 
34963
 
-
 
34964
      }
-
 
34965
    }
-
 
34966
 
-
 
34967
    public void setFieldValue(int fieldID, Object value) {
-
 
34968
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
34969
    }
-
 
34970
 
-
 
34971
    public Object getFieldValue(_Fields field) {
-
 
34972
      switch (field) {
-
 
34973
      case SUCCESS:
-
 
34974
        return getSuccess();
-
 
34975
 
-
 
34976
      case EX:
-
 
34977
        return getEx();
-
 
34978
 
-
 
34979
      }
-
 
34980
      throw new IllegalStateException();
-
 
34981
    }
-
 
34982
 
-
 
34983
    public Object getFieldValue(int fieldId) {
-
 
34984
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
34985
    }
-
 
34986
 
-
 
34987
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
34988
    public boolean isSet(_Fields field) {
-
 
34989
      switch (field) {
-
 
34990
      case SUCCESS:
-
 
34991
        return isSetSuccess();
-
 
34992
      case EX:
-
 
34993
        return isSetEx();
-
 
34994
      }
-
 
34995
      throw new IllegalStateException();
-
 
34996
    }
-
 
34997
 
-
 
34998
    public boolean isSet(int fieldID) {
-
 
34999
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
35000
    }
-
 
35001
 
-
 
35002
    @Override
-
 
35003
    public boolean equals(Object that) {
-
 
35004
      if (that == null)
-
 
35005
        return false;
-
 
35006
      if (that instanceof getReturnOrder_result)
-
 
35007
        return this.equals((getReturnOrder_result)that);
-
 
35008
      return false;
-
 
35009
    }
-
 
35010
 
-
 
35011
    public boolean equals(getReturnOrder_result that) {
-
 
35012
      if (that == null)
-
 
35013
        return false;
-
 
35014
 
-
 
35015
      boolean this_present_success = true && this.isSetSuccess();
-
 
35016
      boolean that_present_success = true && that.isSetSuccess();
-
 
35017
      if (this_present_success || that_present_success) {
-
 
35018
        if (!(this_present_success && that_present_success))
-
 
35019
          return false;
-
 
35020
        if (!this.success.equals(that.success))
-
 
35021
          return false;
-
 
35022
      }
-
 
35023
 
-
 
35024
      boolean this_present_ex = true && this.isSetEx();
-
 
35025
      boolean that_present_ex = true && that.isSetEx();
-
 
35026
      if (this_present_ex || that_present_ex) {
-
 
35027
        if (!(this_present_ex && that_present_ex))
-
 
35028
          return false;
-
 
35029
        if (!this.ex.equals(that.ex))
-
 
35030
          return false;
-
 
35031
      }
-
 
35032
 
-
 
35033
      return true;
-
 
35034
    }
-
 
35035
 
-
 
35036
    @Override
-
 
35037
    public int hashCode() {
-
 
35038
      return 0;
-
 
35039
    }
-
 
35040
 
-
 
35041
    public int compareTo(getReturnOrder_result other) {
-
 
35042
      if (!getClass().equals(other.getClass())) {
-
 
35043
        return getClass().getName().compareTo(other.getClass().getName());
-
 
35044
      }
-
 
35045
 
-
 
35046
      int lastComparison = 0;
-
 
35047
      getReturnOrder_result typedOther = (getReturnOrder_result)other;
-
 
35048
 
-
 
35049
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
35050
      if (lastComparison != 0) {
-
 
35051
        return lastComparison;
-
 
35052
      }
-
 
35053
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
35054
      if (lastComparison != 0) {
-
 
35055
        return lastComparison;
-
 
35056
      }
-
 
35057
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
-
 
35058
      if (lastComparison != 0) {
-
 
35059
        return lastComparison;
-
 
35060
      }
-
 
35061
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
-
 
35062
      if (lastComparison != 0) {
-
 
35063
        return lastComparison;
-
 
35064
      }
-
 
35065
      return 0;
-
 
35066
    }
-
 
35067
 
-
 
35068
    public void read(TProtocol iprot) throws TException {
-
 
35069
      TField field;
-
 
35070
      iprot.readStructBegin();
-
 
35071
      while (true)
-
 
35072
      {
-
 
35073
        field = iprot.readFieldBegin();
-
 
35074
        if (field.type == TType.STOP) { 
-
 
35075
          break;
-
 
35076
        }
-
 
35077
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
35078
        if (fieldId == null) {
-
 
35079
          TProtocolUtil.skip(iprot, field.type);
-
 
35080
        } else {
-
 
35081
          switch (fieldId) {
-
 
35082
            case SUCCESS:
-
 
35083
              if (field.type == TType.STRUCT) {
-
 
35084
                this.success = new ReturnOrder();
-
 
35085
                this.success.read(iprot);
-
 
35086
              } else { 
-
 
35087
                TProtocolUtil.skip(iprot, field.type);
-
 
35088
              }
-
 
35089
              break;
-
 
35090
            case EX:
-
 
35091
              if (field.type == TType.STRUCT) {
-
 
35092
                this.ex = new TransactionServiceException();
-
 
35093
                this.ex.read(iprot);
-
 
35094
              } else { 
-
 
35095
                TProtocolUtil.skip(iprot, field.type);
-
 
35096
              }
-
 
35097
              break;
-
 
35098
          }
-
 
35099
          iprot.readFieldEnd();
-
 
35100
        }
-
 
35101
      }
-
 
35102
      iprot.readStructEnd();
-
 
35103
      validate();
-
 
35104
    }
-
 
35105
 
-
 
35106
    public void write(TProtocol oprot) throws TException {
-
 
35107
      oprot.writeStructBegin(STRUCT_DESC);
-
 
35108
 
-
 
35109
      if (this.isSetSuccess()) {
-
 
35110
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
35111
        this.success.write(oprot);
-
 
35112
        oprot.writeFieldEnd();
-
 
35113
      } else if (this.isSetEx()) {
-
 
35114
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
35115
        this.ex.write(oprot);
-
 
35116
        oprot.writeFieldEnd();
-
 
35117
      }
-
 
35118
      oprot.writeFieldStop();
-
 
35119
      oprot.writeStructEnd();
-
 
35120
    }
-
 
35121
 
-
 
35122
    @Override
-
 
35123
    public String toString() {
-
 
35124
      StringBuilder sb = new StringBuilder("getReturnOrder_result(");
-
 
35125
      boolean first = true;
-
 
35126
 
-
 
35127
      sb.append("success:");
-
 
35128
      if (this.success == null) {
-
 
35129
        sb.append("null");
-
 
35130
      } else {
-
 
35131
        sb.append(this.success);
-
 
35132
      }
-
 
35133
      first = false;
-
 
35134
      if (!first) sb.append(", ");
-
 
35135
      sb.append("ex:");
-
 
35136
      if (this.ex == null) {
-
 
35137
        sb.append("null");
-
 
35138
      } else {
-
 
35139
        sb.append(this.ex);
-
 
35140
      }
-
 
35141
      first = false;
-
 
35142
      sb.append(")");
-
 
35143
      return sb.toString();
-
 
35144
    }
34429
 
35145
 
34430
    public void validate() throws TException {
35146
    public void validate() throws TException {
34431
      // check for required fields
35147
      // check for required fields
34432
    }
35148
    }
34433
 
35149