Subversion Repositories SmartDukaan

Rev

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

Rev 1731 Rev 1886
Line 213... Line 213...
213
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
213
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
214
     * List contains two values, first minimum amount and second maximum amount.
214
     * List contains two values, first minimum amount and second maximum amount.
215
     */
215
     */
216
    public List<Double> getValidOrdersAmountRange() throws TException;
216
    public List<Double> getValidOrdersAmountRange() throws TException;
217
 
217
 
-
 
218
    /**
-
 
219
     * Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
-
 
220
     * If limit is passed as 0, then all valid Orders are returned.
-
 
221
     * 
-
 
222
     * @param limit
-
 
223
     */
-
 
224
    public List<Order> getValidOrders(long limit) throws TException;
-
 
225
 
218
  }
226
  }
219
 
227
 
220
  public static class Client implements Iface {
228
  public static class Client implements Iface {
221
    public Client(TProtocol prot)
229
    public Client(TProtocol prot)
222
    {
230
    {
Line 1531... Line 1539...
1531
        return result.success;
1539
        return result.success;
1532
      }
1540
      }
1533
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1541
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1534
    }
1542
    }
1535
 
1543
 
-
 
1544
    public List<Order> getValidOrders(long limit) throws TException
-
 
1545
    {
-
 
1546
      send_getValidOrders(limit);
-
 
1547
      return recv_getValidOrders();
-
 
1548
    }
-
 
1549
 
-
 
1550
    public void send_getValidOrders(long limit) throws TException
-
 
1551
    {
-
 
1552
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
-
 
1553
      getValidOrders_args args = new getValidOrders_args();
-
 
1554
      args.limit = limit;
-
 
1555
      args.write(oprot_);
-
 
1556
      oprot_.writeMessageEnd();
-
 
1557
      oprot_.getTransport().flush();
-
 
1558
    }
-
 
1559
 
-
 
1560
    public List<Order> recv_getValidOrders() throws TException
-
 
1561
    {
-
 
1562
      TMessage msg = iprot_.readMessageBegin();
-
 
1563
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1564
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1565
        iprot_.readMessageEnd();
-
 
1566
        throw x;
-
 
1567
      }
-
 
1568
      getValidOrders_result result = new getValidOrders_result();
-
 
1569
      result.read(iprot_);
-
 
1570
      iprot_.readMessageEnd();
-
 
1571
      if (result.isSetSuccess()) {
-
 
1572
        return result.success;
-
 
1573
      }
-
 
1574
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
-
 
1575
    }
-
 
1576
 
1536
  }
1577
  }
1537
  public static class Processor implements TProcessor {
1578
  public static class Processor implements TProcessor {
1538
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1579
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1539
    public Processor(Iface iface)
1580
    public Processor(Iface iface)
1540
    {
1581
    {
Line 1573... Line 1614...
1573
      processMap_.put("getAlerts", new getAlerts());
1614
      processMap_.put("getAlerts", new getAlerts());
1574
      processMap_.put("setAlert", new setAlert());
1615
      processMap_.put("setAlert", new setAlert());
1575
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1616
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1576
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1617
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1577
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1618
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
-
 
1619
      processMap_.put("getValidOrders", new getValidOrders());
1578
    }
1620
    }
1579
 
1621
 
1580
    protected static interface ProcessFunction {
1622
    protected static interface ProcessFunction {
1581
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1623
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1582
    }
1624
    }
Line 2537... Line 2579...
2537
        oprot.getTransport().flush();
2579
        oprot.getTransport().flush();
2538
      }
2580
      }
2539
 
2581
 
2540
    }
2582
    }
2541
 
2583
 
-
 
2584
    private class getValidOrders implements ProcessFunction {
-
 
2585
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
2586
      {
-
 
2587
        getValidOrders_args args = new getValidOrders_args();
-
 
2588
        args.read(iprot);
-
 
2589
        iprot.readMessageEnd();
-
 
2590
        getValidOrders_result result = new getValidOrders_result();
-
 
2591
        result.success = iface_.getValidOrders(args.limit);
-
 
2592
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
-
 
2593
        result.write(oprot);
-
 
2594
        oprot.writeMessageEnd();
-
 
2595
        oprot.getTransport().flush();
-
 
2596
      }
-
 
2597
 
-
 
2598
    }
-
 
2599
 
2542
  }
2600
  }
2543
 
2601
 
2544
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2602
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2545
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2603
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2546
 
2604
 
Line 27675... Line 27733...
27675
      boolean first = true;
27733
      boolean first = true;
27676
 
27734
 
27677
      sb.append("success:");
27735
      sb.append("success:");
27678
      if (this.success == null) {
27736
      if (this.success == null) {
27679
        sb.append("null");
27737
        sb.append("null");
-
 
27738
      } else {
-
 
27739
        sb.append(this.success);
-
 
27740
      }
-
 
27741
      first = false;
-
 
27742
      sb.append(")");
-
 
27743
      return sb.toString();
-
 
27744
    }
-
 
27745
 
-
 
27746
    public void validate() throws TException {
-
 
27747
      // check for required fields
-
 
27748
    }
-
 
27749
 
-
 
27750
  }
-
 
27751
 
-
 
27752
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
-
 
27753
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
-
 
27754
 
-
 
27755
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
-
 
27756
 
-
 
27757
    private long limit;
-
 
27758
 
-
 
27759
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
27760
    public enum _Fields implements TFieldIdEnum {
-
 
27761
      LIMIT((short)1, "limit");
-
 
27762
 
-
 
27763
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
27764
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
27765
 
-
 
27766
      static {
-
 
27767
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
27768
          byId.put((int)field._thriftId, field);
-
 
27769
          byName.put(field.getFieldName(), field);
-
 
27770
        }
-
 
27771
      }
-
 
27772
 
-
 
27773
      /**
-
 
27774
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
27775
       */
-
 
27776
      public static _Fields findByThriftId(int fieldId) {
-
 
27777
        return byId.get(fieldId);
-
 
27778
      }
-
 
27779
 
-
 
27780
      /**
-
 
27781
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
27782
       * if it is not found.
-
 
27783
       */
-
 
27784
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
27785
        _Fields fields = findByThriftId(fieldId);
-
 
27786
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
27787
        return fields;
-
 
27788
      }
-
 
27789
 
-
 
27790
      /**
-
 
27791
       * Find the _Fields constant that matches name, or null if its not found.
-
 
27792
       */
-
 
27793
      public static _Fields findByName(String name) {
-
 
27794
        return byName.get(name);
-
 
27795
      }
-
 
27796
 
-
 
27797
      private final short _thriftId;
-
 
27798
      private final String _fieldName;
-
 
27799
 
-
 
27800
      _Fields(short thriftId, String fieldName) {
-
 
27801
        _thriftId = thriftId;
-
 
27802
        _fieldName = fieldName;
-
 
27803
      }
-
 
27804
 
-
 
27805
      public short getThriftFieldId() {
-
 
27806
        return _thriftId;
-
 
27807
      }
-
 
27808
 
-
 
27809
      public String getFieldName() {
-
 
27810
        return _fieldName;
-
 
27811
      }
-
 
27812
    }
-
 
27813
 
-
 
27814
    // isset id assignments
-
 
27815
    private static final int __LIMIT_ISSET_ID = 0;
-
 
27816
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
27817
 
-
 
27818
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
27819
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
-
 
27820
          new FieldValueMetaData(TType.I64)));
-
 
27821
    }});
-
 
27822
 
-
 
27823
    static {
-
 
27824
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
-
 
27825
    }
-
 
27826
 
-
 
27827
    public getValidOrders_args() {
-
 
27828
    }
-
 
27829
 
-
 
27830
    public getValidOrders_args(
-
 
27831
      long limit)
-
 
27832
    {
-
 
27833
      this();
-
 
27834
      this.limit = limit;
-
 
27835
      setLimitIsSet(true);
-
 
27836
    }
-
 
27837
 
-
 
27838
    /**
-
 
27839
     * Performs a deep copy on <i>other</i>.
-
 
27840
     */
-
 
27841
    public getValidOrders_args(getValidOrders_args other) {
-
 
27842
      __isset_bit_vector.clear();
-
 
27843
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
27844
      this.limit = other.limit;
-
 
27845
    }
-
 
27846
 
-
 
27847
    public getValidOrders_args deepCopy() {
-
 
27848
      return new getValidOrders_args(this);
-
 
27849
    }
-
 
27850
 
-
 
27851
    @Deprecated
-
 
27852
    public getValidOrders_args clone() {
-
 
27853
      return new getValidOrders_args(this);
-
 
27854
    }
-
 
27855
 
-
 
27856
    public long getLimit() {
-
 
27857
      return this.limit;
-
 
27858
    }
-
 
27859
 
-
 
27860
    public getValidOrders_args setLimit(long limit) {
-
 
27861
      this.limit = limit;
-
 
27862
      setLimitIsSet(true);
-
 
27863
      return this;
-
 
27864
    }
-
 
27865
 
-
 
27866
    public void unsetLimit() {
-
 
27867
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
-
 
27868
    }
-
 
27869
 
-
 
27870
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
-
 
27871
    public boolean isSetLimit() {
-
 
27872
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
-
 
27873
    }
-
 
27874
 
-
 
27875
    public void setLimitIsSet(boolean value) {
-
 
27876
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
-
 
27877
    }
-
 
27878
 
-
 
27879
    public void setFieldValue(_Fields field, Object value) {
-
 
27880
      switch (field) {
-
 
27881
      case LIMIT:
-
 
27882
        if (value == null) {
-
 
27883
          unsetLimit();
-
 
27884
        } else {
-
 
27885
          setLimit((Long)value);
-
 
27886
        }
-
 
27887
        break;
-
 
27888
 
-
 
27889
      }
-
 
27890
    }
-
 
27891
 
-
 
27892
    public void setFieldValue(int fieldID, Object value) {
-
 
27893
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
27894
    }
-
 
27895
 
-
 
27896
    public Object getFieldValue(_Fields field) {
-
 
27897
      switch (field) {
-
 
27898
      case LIMIT:
-
 
27899
        return new Long(getLimit());
-
 
27900
 
-
 
27901
      }
-
 
27902
      throw new IllegalStateException();
-
 
27903
    }
-
 
27904
 
-
 
27905
    public Object getFieldValue(int fieldId) {
-
 
27906
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
27907
    }
-
 
27908
 
-
 
27909
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
27910
    public boolean isSet(_Fields field) {
-
 
27911
      switch (field) {
-
 
27912
      case LIMIT:
-
 
27913
        return isSetLimit();
-
 
27914
      }
-
 
27915
      throw new IllegalStateException();
-
 
27916
    }
-
 
27917
 
-
 
27918
    public boolean isSet(int fieldID) {
-
 
27919
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
27920
    }
-
 
27921
 
-
 
27922
    @Override
-
 
27923
    public boolean equals(Object that) {
-
 
27924
      if (that == null)
-
 
27925
        return false;
-
 
27926
      if (that instanceof getValidOrders_args)
-
 
27927
        return this.equals((getValidOrders_args)that);
-
 
27928
      return false;
-
 
27929
    }
-
 
27930
 
-
 
27931
    public boolean equals(getValidOrders_args that) {
-
 
27932
      if (that == null)
-
 
27933
        return false;
-
 
27934
 
-
 
27935
      boolean this_present_limit = true;
-
 
27936
      boolean that_present_limit = true;
-
 
27937
      if (this_present_limit || that_present_limit) {
-
 
27938
        if (!(this_present_limit && that_present_limit))
-
 
27939
          return false;
-
 
27940
        if (this.limit != that.limit)
-
 
27941
          return false;
-
 
27942
      }
-
 
27943
 
-
 
27944
      return true;
-
 
27945
    }
-
 
27946
 
-
 
27947
    @Override
-
 
27948
    public int hashCode() {
-
 
27949
      return 0;
-
 
27950
    }
-
 
27951
 
-
 
27952
    public int compareTo(getValidOrders_args other) {
-
 
27953
      if (!getClass().equals(other.getClass())) {
-
 
27954
        return getClass().getName().compareTo(other.getClass().getName());
-
 
27955
      }
-
 
27956
 
-
 
27957
      int lastComparison = 0;
-
 
27958
      getValidOrders_args typedOther = (getValidOrders_args)other;
-
 
27959
 
-
 
27960
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
-
 
27961
      if (lastComparison != 0) {
-
 
27962
        return lastComparison;
-
 
27963
      }
-
 
27964
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
-
 
27965
      if (lastComparison != 0) {
-
 
27966
        return lastComparison;
-
 
27967
      }
-
 
27968
      return 0;
-
 
27969
    }
-
 
27970
 
-
 
27971
    public void read(TProtocol iprot) throws TException {
-
 
27972
      TField field;
-
 
27973
      iprot.readStructBegin();
-
 
27974
      while (true)
-
 
27975
      {
-
 
27976
        field = iprot.readFieldBegin();
-
 
27977
        if (field.type == TType.STOP) { 
-
 
27978
          break;
-
 
27979
        }
-
 
27980
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
27981
        if (fieldId == null) {
-
 
27982
          TProtocolUtil.skip(iprot, field.type);
-
 
27983
        } else {
-
 
27984
          switch (fieldId) {
-
 
27985
            case LIMIT:
-
 
27986
              if (field.type == TType.I64) {
-
 
27987
                this.limit = iprot.readI64();
-
 
27988
                setLimitIsSet(true);
-
 
27989
              } else { 
-
 
27990
                TProtocolUtil.skip(iprot, field.type);
-
 
27991
              }
-
 
27992
              break;
-
 
27993
          }
-
 
27994
          iprot.readFieldEnd();
-
 
27995
        }
-
 
27996
      }
-
 
27997
      iprot.readStructEnd();
-
 
27998
      validate();
-
 
27999
    }
-
 
28000
 
-
 
28001
    public void write(TProtocol oprot) throws TException {
-
 
28002
      validate();
-
 
28003
 
-
 
28004
      oprot.writeStructBegin(STRUCT_DESC);
-
 
28005
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
-
 
28006
      oprot.writeI64(this.limit);
-
 
28007
      oprot.writeFieldEnd();
-
 
28008
      oprot.writeFieldStop();
-
 
28009
      oprot.writeStructEnd();
-
 
28010
    }
-
 
28011
 
-
 
28012
    @Override
-
 
28013
    public String toString() {
-
 
28014
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
-
 
28015
      boolean first = true;
-
 
28016
 
-
 
28017
      sb.append("limit:");
-
 
28018
      sb.append(this.limit);
-
 
28019
      first = false;
-
 
28020
      sb.append(")");
-
 
28021
      return sb.toString();
-
 
28022
    }
-
 
28023
 
-
 
28024
    public void validate() throws TException {
-
 
28025
      // check for required fields
-
 
28026
    }
-
 
28027
 
-
 
28028
  }
-
 
28029
 
-
 
28030
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
-
 
28031
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
-
 
28032
 
-
 
28033
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
28034
 
-
 
28035
    private List<Order> success;
-
 
28036
 
-
 
28037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
28038
    public enum _Fields implements TFieldIdEnum {
-
 
28039
      SUCCESS((short)0, "success");
-
 
28040
 
-
 
28041
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
28042
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
28043
 
-
 
28044
      static {
-
 
28045
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
28046
          byId.put((int)field._thriftId, field);
-
 
28047
          byName.put(field.getFieldName(), field);
-
 
28048
        }
-
 
28049
      }
-
 
28050
 
-
 
28051
      /**
-
 
28052
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
28053
       */
-
 
28054
      public static _Fields findByThriftId(int fieldId) {
-
 
28055
        return byId.get(fieldId);
-
 
28056
      }
-
 
28057
 
-
 
28058
      /**
-
 
28059
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
28060
       * if it is not found.
-
 
28061
       */
-
 
28062
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
28063
        _Fields fields = findByThriftId(fieldId);
-
 
28064
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
28065
        return fields;
-
 
28066
      }
-
 
28067
 
-
 
28068
      /**
-
 
28069
       * Find the _Fields constant that matches name, or null if its not found.
-
 
28070
       */
-
 
28071
      public static _Fields findByName(String name) {
-
 
28072
        return byName.get(name);
-
 
28073
      }
-
 
28074
 
-
 
28075
      private final short _thriftId;
-
 
28076
      private final String _fieldName;
-
 
28077
 
-
 
28078
      _Fields(short thriftId, String fieldName) {
-
 
28079
        _thriftId = thriftId;
-
 
28080
        _fieldName = fieldName;
-
 
28081
      }
-
 
28082
 
-
 
28083
      public short getThriftFieldId() {
-
 
28084
        return _thriftId;
-
 
28085
      }
-
 
28086
 
-
 
28087
      public String getFieldName() {
-
 
28088
        return _fieldName;
-
 
28089
      }
-
 
28090
    }
-
 
28091
 
-
 
28092
    // isset id assignments
-
 
28093
 
-
 
28094
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
28095
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
28096
          new ListMetaData(TType.LIST, 
-
 
28097
              new StructMetaData(TType.STRUCT, Order.class))));
-
 
28098
    }});
-
 
28099
 
-
 
28100
    static {
-
 
28101
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
-
 
28102
    }
-
 
28103
 
-
 
28104
    public getValidOrders_result() {
-
 
28105
    }
-
 
28106
 
-
 
28107
    public getValidOrders_result(
-
 
28108
      List<Order> success)
-
 
28109
    {
-
 
28110
      this();
-
 
28111
      this.success = success;
-
 
28112
    }
-
 
28113
 
-
 
28114
    /**
-
 
28115
     * Performs a deep copy on <i>other</i>.
-
 
28116
     */
-
 
28117
    public getValidOrders_result(getValidOrders_result other) {
-
 
28118
      if (other.isSetSuccess()) {
-
 
28119
        List<Order> __this__success = new ArrayList<Order>();
-
 
28120
        for (Order other_element : other.success) {
-
 
28121
          __this__success.add(new Order(other_element));
-
 
28122
        }
-
 
28123
        this.success = __this__success;
-
 
28124
      }
-
 
28125
    }
-
 
28126
 
-
 
28127
    public getValidOrders_result deepCopy() {
-
 
28128
      return new getValidOrders_result(this);
-
 
28129
    }
-
 
28130
 
-
 
28131
    @Deprecated
-
 
28132
    public getValidOrders_result clone() {
-
 
28133
      return new getValidOrders_result(this);
-
 
28134
    }
-
 
28135
 
-
 
28136
    public int getSuccessSize() {
-
 
28137
      return (this.success == null) ? 0 : this.success.size();
-
 
28138
    }
-
 
28139
 
-
 
28140
    public java.util.Iterator<Order> getSuccessIterator() {
-
 
28141
      return (this.success == null) ? null : this.success.iterator();
-
 
28142
    }
-
 
28143
 
-
 
28144
    public void addToSuccess(Order elem) {
-
 
28145
      if (this.success == null) {
-
 
28146
        this.success = new ArrayList<Order>();
-
 
28147
      }
-
 
28148
      this.success.add(elem);
-
 
28149
    }
-
 
28150
 
-
 
28151
    public List<Order> getSuccess() {
-
 
28152
      return this.success;
-
 
28153
    }
-
 
28154
 
-
 
28155
    public getValidOrders_result setSuccess(List<Order> success) {
-
 
28156
      this.success = success;
-
 
28157
      return this;
-
 
28158
    }
-
 
28159
 
-
 
28160
    public void unsetSuccess() {
-
 
28161
      this.success = null;
-
 
28162
    }
-
 
28163
 
-
 
28164
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
28165
    public boolean isSetSuccess() {
-
 
28166
      return this.success != null;
-
 
28167
    }
-
 
28168
 
-
 
28169
    public void setSuccessIsSet(boolean value) {
-
 
28170
      if (!value) {
-
 
28171
        this.success = null;
-
 
28172
      }
-
 
28173
    }
-
 
28174
 
-
 
28175
    public void setFieldValue(_Fields field, Object value) {
-
 
28176
      switch (field) {
-
 
28177
      case SUCCESS:
-
 
28178
        if (value == null) {
-
 
28179
          unsetSuccess();
-
 
28180
        } else {
-
 
28181
          setSuccess((List<Order>)value);
-
 
28182
        }
-
 
28183
        break;
-
 
28184
 
-
 
28185
      }
-
 
28186
    }
-
 
28187
 
-
 
28188
    public void setFieldValue(int fieldID, Object value) {
-
 
28189
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
28190
    }
-
 
28191
 
-
 
28192
    public Object getFieldValue(_Fields field) {
-
 
28193
      switch (field) {
-
 
28194
      case SUCCESS:
-
 
28195
        return getSuccess();
-
 
28196
 
-
 
28197
      }
-
 
28198
      throw new IllegalStateException();
-
 
28199
    }
-
 
28200
 
-
 
28201
    public Object getFieldValue(int fieldId) {
-
 
28202
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
28203
    }
-
 
28204
 
-
 
28205
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
28206
    public boolean isSet(_Fields field) {
-
 
28207
      switch (field) {
-
 
28208
      case SUCCESS:
-
 
28209
        return isSetSuccess();
-
 
28210
      }
-
 
28211
      throw new IllegalStateException();
-
 
28212
    }
-
 
28213
 
-
 
28214
    public boolean isSet(int fieldID) {
-
 
28215
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
28216
    }
-
 
28217
 
-
 
28218
    @Override
-
 
28219
    public boolean equals(Object that) {
-
 
28220
      if (that == null)
-
 
28221
        return false;
-
 
28222
      if (that instanceof getValidOrders_result)
-
 
28223
        return this.equals((getValidOrders_result)that);
-
 
28224
      return false;
-
 
28225
    }
-
 
28226
 
-
 
28227
    public boolean equals(getValidOrders_result that) {
-
 
28228
      if (that == null)
-
 
28229
        return false;
-
 
28230
 
-
 
28231
      boolean this_present_success = true && this.isSetSuccess();
-
 
28232
      boolean that_present_success = true && that.isSetSuccess();
-
 
28233
      if (this_present_success || that_present_success) {
-
 
28234
        if (!(this_present_success && that_present_success))
-
 
28235
          return false;
-
 
28236
        if (!this.success.equals(that.success))
-
 
28237
          return false;
-
 
28238
      }
-
 
28239
 
-
 
28240
      return true;
-
 
28241
    }
-
 
28242
 
-
 
28243
    @Override
-
 
28244
    public int hashCode() {
-
 
28245
      return 0;
-
 
28246
    }
-
 
28247
 
-
 
28248
    public int compareTo(getValidOrders_result other) {
-
 
28249
      if (!getClass().equals(other.getClass())) {
-
 
28250
        return getClass().getName().compareTo(other.getClass().getName());
-
 
28251
      }
-
 
28252
 
-
 
28253
      int lastComparison = 0;
-
 
28254
      getValidOrders_result typedOther = (getValidOrders_result)other;
-
 
28255
 
-
 
28256
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
28257
      if (lastComparison != 0) {
-
 
28258
        return lastComparison;
-
 
28259
      }
-
 
28260
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
28261
      if (lastComparison != 0) {
-
 
28262
        return lastComparison;
-
 
28263
      }
-
 
28264
      return 0;
-
 
28265
    }
-
 
28266
 
-
 
28267
    public void read(TProtocol iprot) throws TException {
-
 
28268
      TField field;
-
 
28269
      iprot.readStructBegin();
-
 
28270
      while (true)
-
 
28271
      {
-
 
28272
        field = iprot.readFieldBegin();
-
 
28273
        if (field.type == TType.STOP) { 
-
 
28274
          break;
-
 
28275
        }
-
 
28276
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
28277
        if (fieldId == null) {
-
 
28278
          TProtocolUtil.skip(iprot, field.type);
-
 
28279
        } else {
-
 
28280
          switch (fieldId) {
-
 
28281
            case SUCCESS:
-
 
28282
              if (field.type == TType.LIST) {
-
 
28283
                {
-
 
28284
                  TList _list84 = iprot.readListBegin();
-
 
28285
                  this.success = new ArrayList<Order>(_list84.size);
-
 
28286
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
-
 
28287
                  {
-
 
28288
                    Order _elem86;
-
 
28289
                    _elem86 = new Order();
-
 
28290
                    _elem86.read(iprot);
-
 
28291
                    this.success.add(_elem86);
-
 
28292
                  }
-
 
28293
                  iprot.readListEnd();
-
 
28294
                }
-
 
28295
              } else { 
-
 
28296
                TProtocolUtil.skip(iprot, field.type);
-
 
28297
              }
-
 
28298
              break;
-
 
28299
          }
-
 
28300
          iprot.readFieldEnd();
-
 
28301
        }
-
 
28302
      }
-
 
28303
      iprot.readStructEnd();
-
 
28304
      validate();
-
 
28305
    }
-
 
28306
 
-
 
28307
    public void write(TProtocol oprot) throws TException {
-
 
28308
      oprot.writeStructBegin(STRUCT_DESC);
-
 
28309
 
-
 
28310
      if (this.isSetSuccess()) {
-
 
28311
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
28312
        {
-
 
28313
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
28314
          for (Order _iter87 : this.success)
-
 
28315
          {
-
 
28316
            _iter87.write(oprot);
-
 
28317
          }
-
 
28318
          oprot.writeListEnd();
-
 
28319
        }
-
 
28320
        oprot.writeFieldEnd();
-
 
28321
      }
-
 
28322
      oprot.writeFieldStop();
-
 
28323
      oprot.writeStructEnd();
-
 
28324
    }
-
 
28325
 
-
 
28326
    @Override
-
 
28327
    public String toString() {
-
 
28328
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
-
 
28329
      boolean first = true;
-
 
28330
 
-
 
28331
      sb.append("success:");
-
 
28332
      if (this.success == null) {
-
 
28333
        sb.append("null");
27680
      } else {
28334
      } else {
27681
        sb.append(this.success);
28335
        sb.append(this.success);
27682
      }
28336
      }
27683
      first = false;
28337
      first = false;
27684
      sb.append(")");
28338
      sb.append(")");