Subversion Repositories SmartDukaan

Rev

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

Rev 1139 Rev 1730
Line 91... Line 91...
91
     * 
91
     * 
92
     * @param providerId
92
     * @param providerId
93
     */
93
     */
94
    public long getFreeAwbCount(long providerId) throws TException;
94
    public long getFreeAwbCount(long providerId) throws TException;
95
 
95
 
-
 
96
    /**
-
 
97
     * Returns list of Holiday dates between fromDate and toDate (both inclusive)
-
 
98
     * fromDate should be passed as milliseconds corresponding to the start of the day.
-
 
99
     * If fromDate is passed as -1, fromDate is not considered for filtering
-
 
100
     * If toDate is passed as -1, toDate is not considered for filtering
-
 
101
     * 
-
 
102
     * @param fromDate
-
 
103
     * @param toDate
-
 
104
     */
-
 
105
    public List<Long> getHolidays(long fromDate, long toDate) throws TException;
-
 
106
 
96
  }
107
  }
97
 
108
 
98
  public static class Client implements Iface {
109
  public static class Client implements Iface {
99
    public Client(TProtocol prot)
110
    public Client(TProtocol prot)
100
    {
111
    {
Line 437... Line 448...
437
        return result.success;
448
        return result.success;
438
      }
449
      }
439
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getFreeAwbCount failed: unknown result");
450
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getFreeAwbCount failed: unknown result");
440
    }
451
    }
441
 
452
 
-
 
453
    public List<Long> getHolidays(long fromDate, long toDate) throws TException
-
 
454
    {
-
 
455
      send_getHolidays(fromDate, toDate);
-
 
456
      return recv_getHolidays();
-
 
457
    }
-
 
458
 
-
 
459
    public void send_getHolidays(long fromDate, long toDate) throws TException
-
 
460
    {
-
 
461
      oprot_.writeMessageBegin(new TMessage("getHolidays", TMessageType.CALL, seqid_));
-
 
462
      getHolidays_args args = new getHolidays_args();
-
 
463
      args.fromDate = fromDate;
-
 
464
      args.toDate = toDate;
-
 
465
      args.write(oprot_);
-
 
466
      oprot_.writeMessageEnd();
-
 
467
      oprot_.getTransport().flush();
-
 
468
    }
-
 
469
 
-
 
470
    public List<Long> recv_getHolidays() throws TException
-
 
471
    {
-
 
472
      TMessage msg = iprot_.readMessageBegin();
-
 
473
      if (msg.type == TMessageType.EXCEPTION) {
-
 
474
        TApplicationException x = TApplicationException.read(iprot_);
-
 
475
        iprot_.readMessageEnd();
-
 
476
        throw x;
-
 
477
      }
-
 
478
      getHolidays_result result = new getHolidays_result();
-
 
479
      result.read(iprot_);
-
 
480
      iprot_.readMessageEnd();
-
 
481
      if (result.isSetSuccess()) {
-
 
482
        return result.success;
-
 
483
      }
-
 
484
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
-
 
485
    }
-
 
486
 
442
  }
487
  }
443
  public static class Processor implements TProcessor {
488
  public static class Processor implements TProcessor {
444
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
489
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
445
    public Processor(Iface iface)
490
    public Processor(Iface iface)
446
    {
491
    {
Line 452... Line 497...
452
      processMap_.put("getLogisticsInfo", new getLogisticsInfo());
497
      processMap_.put("getLogisticsInfo", new getLogisticsInfo());
453
      processMap_.put("getEmptyAWB", new getEmptyAWB());
498
      processMap_.put("getEmptyAWB", new getEmptyAWB());
454
      processMap_.put("getShipmentInfo", new getShipmentInfo());
499
      processMap_.put("getShipmentInfo", new getShipmentInfo());
455
      processMap_.put("getDestinationCode", new getDestinationCode());
500
      processMap_.put("getDestinationCode", new getDestinationCode());
456
      processMap_.put("getFreeAwbCount", new getFreeAwbCount());
501
      processMap_.put("getFreeAwbCount", new getFreeAwbCount());
-
 
502
      processMap_.put("getHolidays", new getHolidays());
457
    }
503
    }
458
 
504
 
459
    protected static interface ProcessFunction {
505
    protected static interface ProcessFunction {
460
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
506
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
461
    }
507
    }
Line 708... Line 754...
708
        oprot.getTransport().flush();
754
        oprot.getTransport().flush();
709
      }
755
      }
710
 
756
 
711
    }
757
    }
712
 
758
 
-
 
759
    private class getHolidays implements ProcessFunction {
-
 
760
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
761
      {
-
 
762
        getHolidays_args args = new getHolidays_args();
-
 
763
        args.read(iprot);
-
 
764
        iprot.readMessageEnd();
-
 
765
        getHolidays_result result = new getHolidays_result();
-
 
766
        result.success = iface_.getHolidays(args.fromDate, args.toDate);
-
 
767
        oprot.writeMessageBegin(new TMessage("getHolidays", TMessageType.REPLY, seqid));
-
 
768
        result.write(oprot);
-
 
769
        oprot.writeMessageEnd();
-
 
770
        oprot.getTransport().flush();
-
 
771
      }
-
 
772
 
-
 
773
    }
-
 
774
 
713
  }
775
  }
714
 
776
 
715
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
777
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
716
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
778
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
717
 
779
 
Line 6464... Line 6526...
6464
      first = false;
6526
      first = false;
6465
      sb.append(")");
6527
      sb.append(")");
6466
      return sb.toString();
6528
      return sb.toString();
6467
    }
6529
    }
6468
 
6530
 
-
 
6531
    public void validate() throws TException {
-
 
6532
      // check for required fields
-
 
6533
    }
-
 
6534
 
-
 
6535
  }
-
 
6536
 
-
 
6537
  public static class getHolidays_args implements TBase<getHolidays_args._Fields>, java.io.Serializable, Cloneable, Comparable<getHolidays_args>   {
-
 
6538
    private static final TStruct STRUCT_DESC = new TStruct("getHolidays_args");
-
 
6539
 
-
 
6540
    private static final TField FROM_DATE_FIELD_DESC = new TField("fromDate", TType.I64, (short)1);
-
 
6541
    private static final TField TO_DATE_FIELD_DESC = new TField("toDate", TType.I64, (short)2);
-
 
6542
 
-
 
6543
    private long fromDate;
-
 
6544
    private long toDate;
-
 
6545
 
-
 
6546
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
6547
    public enum _Fields implements TFieldIdEnum {
-
 
6548
      FROM_DATE((short)1, "fromDate"),
-
 
6549
      TO_DATE((short)2, "toDate");
-
 
6550
 
-
 
6551
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6552
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
6553
 
-
 
6554
      static {
-
 
6555
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
6556
          byId.put((int)field._thriftId, field);
-
 
6557
          byName.put(field.getFieldName(), field);
-
 
6558
        }
-
 
6559
      }
-
 
6560
 
-
 
6561
      /**
-
 
6562
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
6563
       */
-
 
6564
      public static _Fields findByThriftId(int fieldId) {
-
 
6565
        return byId.get(fieldId);
-
 
6566
      }
-
 
6567
 
-
 
6568
      /**
-
 
6569
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
6570
       * if it is not found.
-
 
6571
       */
-
 
6572
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
6573
        _Fields fields = findByThriftId(fieldId);
-
 
6574
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
6575
        return fields;
-
 
6576
      }
-
 
6577
 
-
 
6578
      /**
-
 
6579
       * Find the _Fields constant that matches name, or null if its not found.
-
 
6580
       */
-
 
6581
      public static _Fields findByName(String name) {
-
 
6582
        return byName.get(name);
-
 
6583
      }
-
 
6584
 
-
 
6585
      private final short _thriftId;
-
 
6586
      private final String _fieldName;
-
 
6587
 
-
 
6588
      _Fields(short thriftId, String fieldName) {
-
 
6589
        _thriftId = thriftId;
-
 
6590
        _fieldName = fieldName;
-
 
6591
      }
-
 
6592
 
-
 
6593
      public short getThriftFieldId() {
-
 
6594
        return _thriftId;
-
 
6595
      }
-
 
6596
 
-
 
6597
      public String getFieldName() {
-
 
6598
        return _fieldName;
-
 
6599
      }
-
 
6600
    }
-
 
6601
 
-
 
6602
    // isset id assignments
-
 
6603
    private static final int __FROMDATE_ISSET_ID = 0;
-
 
6604
    private static final int __TODATE_ISSET_ID = 1;
-
 
6605
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
6606
 
-
 
6607
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
6608
      put(_Fields.FROM_DATE, new FieldMetaData("fromDate", TFieldRequirementType.DEFAULT, 
-
 
6609
          new FieldValueMetaData(TType.I64)));
-
 
6610
      put(_Fields.TO_DATE, new FieldMetaData("toDate", TFieldRequirementType.DEFAULT, 
-
 
6611
          new FieldValueMetaData(TType.I64)));
-
 
6612
    }});
-
 
6613
 
-
 
6614
    static {
-
 
6615
      FieldMetaData.addStructMetaDataMap(getHolidays_args.class, metaDataMap);
-
 
6616
    }
-
 
6617
 
-
 
6618
    public getHolidays_args() {
-
 
6619
    }
-
 
6620
 
-
 
6621
    public getHolidays_args(
-
 
6622
      long fromDate,
-
 
6623
      long toDate)
-
 
6624
    {
-
 
6625
      this();
-
 
6626
      this.fromDate = fromDate;
-
 
6627
      setFromDateIsSet(true);
-
 
6628
      this.toDate = toDate;
-
 
6629
      setToDateIsSet(true);
-
 
6630
    }
-
 
6631
 
-
 
6632
    /**
-
 
6633
     * Performs a deep copy on <i>other</i>.
-
 
6634
     */
-
 
6635
    public getHolidays_args(getHolidays_args other) {
-
 
6636
      __isset_bit_vector.clear();
-
 
6637
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
6638
      this.fromDate = other.fromDate;
-
 
6639
      this.toDate = other.toDate;
-
 
6640
    }
-
 
6641
 
-
 
6642
    public getHolidays_args deepCopy() {
-
 
6643
      return new getHolidays_args(this);
-
 
6644
    }
-
 
6645
 
-
 
6646
    @Deprecated
-
 
6647
    public getHolidays_args clone() {
-
 
6648
      return new getHolidays_args(this);
-
 
6649
    }
-
 
6650
 
-
 
6651
    public long getFromDate() {
-
 
6652
      return this.fromDate;
-
 
6653
    }
-
 
6654
 
-
 
6655
    public getHolidays_args setFromDate(long fromDate) {
-
 
6656
      this.fromDate = fromDate;
-
 
6657
      setFromDateIsSet(true);
-
 
6658
      return this;
-
 
6659
    }
-
 
6660
 
-
 
6661
    public void unsetFromDate() {
-
 
6662
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
-
 
6663
    }
-
 
6664
 
-
 
6665
    /** Returns true if field fromDate is set (has been asigned a value) and false otherwise */
-
 
6666
    public boolean isSetFromDate() {
-
 
6667
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
-
 
6668
    }
-
 
6669
 
-
 
6670
    public void setFromDateIsSet(boolean value) {
-
 
6671
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
-
 
6672
    }
-
 
6673
 
-
 
6674
    public long getToDate() {
-
 
6675
      return this.toDate;
-
 
6676
    }
-
 
6677
 
-
 
6678
    public getHolidays_args setToDate(long toDate) {
-
 
6679
      this.toDate = toDate;
-
 
6680
      setToDateIsSet(true);
-
 
6681
      return this;
-
 
6682
    }
-
 
6683
 
-
 
6684
    public void unsetToDate() {
-
 
6685
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
-
 
6686
    }
-
 
6687
 
-
 
6688
    /** Returns true if field toDate is set (has been asigned a value) and false otherwise */
-
 
6689
    public boolean isSetToDate() {
-
 
6690
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
-
 
6691
    }
-
 
6692
 
-
 
6693
    public void setToDateIsSet(boolean value) {
-
 
6694
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
-
 
6695
    }
-
 
6696
 
-
 
6697
    public void setFieldValue(_Fields field, Object value) {
-
 
6698
      switch (field) {
-
 
6699
      case FROM_DATE:
-
 
6700
        if (value == null) {
-
 
6701
          unsetFromDate();
-
 
6702
        } else {
-
 
6703
          setFromDate((Long)value);
-
 
6704
        }
-
 
6705
        break;
-
 
6706
 
-
 
6707
      case TO_DATE:
-
 
6708
        if (value == null) {
-
 
6709
          unsetToDate();
-
 
6710
        } else {
-
 
6711
          setToDate((Long)value);
-
 
6712
        }
-
 
6713
        break;
-
 
6714
 
-
 
6715
      }
-
 
6716
    }
-
 
6717
 
-
 
6718
    public void setFieldValue(int fieldID, Object value) {
-
 
6719
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
6720
    }
-
 
6721
 
-
 
6722
    public Object getFieldValue(_Fields field) {
-
 
6723
      switch (field) {
-
 
6724
      case FROM_DATE:
-
 
6725
        return new Long(getFromDate());
-
 
6726
 
-
 
6727
      case TO_DATE:
-
 
6728
        return new Long(getToDate());
-
 
6729
 
-
 
6730
      }
-
 
6731
      throw new IllegalStateException();
-
 
6732
    }
-
 
6733
 
-
 
6734
    public Object getFieldValue(int fieldId) {
-
 
6735
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
6736
    }
-
 
6737
 
-
 
6738
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
6739
    public boolean isSet(_Fields field) {
-
 
6740
      switch (field) {
-
 
6741
      case FROM_DATE:
-
 
6742
        return isSetFromDate();
-
 
6743
      case TO_DATE:
-
 
6744
        return isSetToDate();
-
 
6745
      }
-
 
6746
      throw new IllegalStateException();
-
 
6747
    }
-
 
6748
 
-
 
6749
    public boolean isSet(int fieldID) {
-
 
6750
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
6751
    }
-
 
6752
 
-
 
6753
    @Override
-
 
6754
    public boolean equals(Object that) {
-
 
6755
      if (that == null)
-
 
6756
        return false;
-
 
6757
      if (that instanceof getHolidays_args)
-
 
6758
        return this.equals((getHolidays_args)that);
-
 
6759
      return false;
-
 
6760
    }
-
 
6761
 
-
 
6762
    public boolean equals(getHolidays_args that) {
-
 
6763
      if (that == null)
-
 
6764
        return false;
-
 
6765
 
-
 
6766
      boolean this_present_fromDate = true;
-
 
6767
      boolean that_present_fromDate = true;
-
 
6768
      if (this_present_fromDate || that_present_fromDate) {
-
 
6769
        if (!(this_present_fromDate && that_present_fromDate))
-
 
6770
          return false;
-
 
6771
        if (this.fromDate != that.fromDate)
-
 
6772
          return false;
-
 
6773
      }
-
 
6774
 
-
 
6775
      boolean this_present_toDate = true;
-
 
6776
      boolean that_present_toDate = true;
-
 
6777
      if (this_present_toDate || that_present_toDate) {
-
 
6778
        if (!(this_present_toDate && that_present_toDate))
-
 
6779
          return false;
-
 
6780
        if (this.toDate != that.toDate)
-
 
6781
          return false;
-
 
6782
      }
-
 
6783
 
-
 
6784
      return true;
-
 
6785
    }
-
 
6786
 
-
 
6787
    @Override
-
 
6788
    public int hashCode() {
-
 
6789
      return 0;
-
 
6790
    }
-
 
6791
 
-
 
6792
    public int compareTo(getHolidays_args other) {
-
 
6793
      if (!getClass().equals(other.getClass())) {
-
 
6794
        return getClass().getName().compareTo(other.getClass().getName());
-
 
6795
      }
-
 
6796
 
-
 
6797
      int lastComparison = 0;
-
 
6798
      getHolidays_args typedOther = (getHolidays_args)other;
-
 
6799
 
-
 
6800
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(isSetFromDate());
-
 
6801
      if (lastComparison != 0) {
-
 
6802
        return lastComparison;
-
 
6803
      }
-
 
6804
      lastComparison = TBaseHelper.compareTo(fromDate, typedOther.fromDate);
-
 
6805
      if (lastComparison != 0) {
-
 
6806
        return lastComparison;
-
 
6807
      }
-
 
6808
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(isSetToDate());
-
 
6809
      if (lastComparison != 0) {
-
 
6810
        return lastComparison;
-
 
6811
      }
-
 
6812
      lastComparison = TBaseHelper.compareTo(toDate, typedOther.toDate);
-
 
6813
      if (lastComparison != 0) {
-
 
6814
        return lastComparison;
-
 
6815
      }
-
 
6816
      return 0;
-
 
6817
    }
-
 
6818
 
-
 
6819
    public void read(TProtocol iprot) throws TException {
-
 
6820
      TField field;
-
 
6821
      iprot.readStructBegin();
-
 
6822
      while (true)
-
 
6823
      {
-
 
6824
        field = iprot.readFieldBegin();
-
 
6825
        if (field.type == TType.STOP) { 
-
 
6826
          break;
-
 
6827
        }
-
 
6828
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
6829
        if (fieldId == null) {
-
 
6830
          TProtocolUtil.skip(iprot, field.type);
-
 
6831
        } else {
-
 
6832
          switch (fieldId) {
-
 
6833
            case FROM_DATE:
-
 
6834
              if (field.type == TType.I64) {
-
 
6835
                this.fromDate = iprot.readI64();
-
 
6836
                setFromDateIsSet(true);
-
 
6837
              } else { 
-
 
6838
                TProtocolUtil.skip(iprot, field.type);
-
 
6839
              }
-
 
6840
              break;
-
 
6841
            case TO_DATE:
-
 
6842
              if (field.type == TType.I64) {
-
 
6843
                this.toDate = iprot.readI64();
-
 
6844
                setToDateIsSet(true);
-
 
6845
              } else { 
-
 
6846
                TProtocolUtil.skip(iprot, field.type);
-
 
6847
              }
-
 
6848
              break;
-
 
6849
          }
-
 
6850
          iprot.readFieldEnd();
-
 
6851
        }
-
 
6852
      }
-
 
6853
      iprot.readStructEnd();
-
 
6854
      validate();
-
 
6855
    }
-
 
6856
 
-
 
6857
    public void write(TProtocol oprot) throws TException {
-
 
6858
      validate();
-
 
6859
 
-
 
6860
      oprot.writeStructBegin(STRUCT_DESC);
-
 
6861
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
-
 
6862
      oprot.writeI64(this.fromDate);
-
 
6863
      oprot.writeFieldEnd();
-
 
6864
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
-
 
6865
      oprot.writeI64(this.toDate);
-
 
6866
      oprot.writeFieldEnd();
-
 
6867
      oprot.writeFieldStop();
-
 
6868
      oprot.writeStructEnd();
-
 
6869
    }
-
 
6870
 
-
 
6871
    @Override
-
 
6872
    public String toString() {
-
 
6873
      StringBuilder sb = new StringBuilder("getHolidays_args(");
-
 
6874
      boolean first = true;
-
 
6875
 
-
 
6876
      sb.append("fromDate:");
-
 
6877
      sb.append(this.fromDate);
-
 
6878
      first = false;
-
 
6879
      if (!first) sb.append(", ");
-
 
6880
      sb.append("toDate:");
-
 
6881
      sb.append(this.toDate);
-
 
6882
      first = false;
-
 
6883
      sb.append(")");
-
 
6884
      return sb.toString();
-
 
6885
    }
-
 
6886
 
-
 
6887
    public void validate() throws TException {
-
 
6888
      // check for required fields
-
 
6889
    }
-
 
6890
 
-
 
6891
  }
-
 
6892
 
-
 
6893
  public static class getHolidays_result implements TBase<getHolidays_result._Fields>, java.io.Serializable, Cloneable, Comparable<getHolidays_result>   {
-
 
6894
    private static final TStruct STRUCT_DESC = new TStruct("getHolidays_result");
-
 
6895
 
-
 
6896
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
6897
 
-
 
6898
    private List<Long> success;
-
 
6899
 
-
 
6900
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
6901
    public enum _Fields implements TFieldIdEnum {
-
 
6902
      SUCCESS((short)0, "success");
-
 
6903
 
-
 
6904
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6905
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
6906
 
-
 
6907
      static {
-
 
6908
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
6909
          byId.put((int)field._thriftId, field);
-
 
6910
          byName.put(field.getFieldName(), field);
-
 
6911
        }
-
 
6912
      }
-
 
6913
 
-
 
6914
      /**
-
 
6915
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
6916
       */
-
 
6917
      public static _Fields findByThriftId(int fieldId) {
-
 
6918
        return byId.get(fieldId);
-
 
6919
      }
-
 
6920
 
-
 
6921
      /**
-
 
6922
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
6923
       * if it is not found.
-
 
6924
       */
-
 
6925
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
6926
        _Fields fields = findByThriftId(fieldId);
-
 
6927
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
6928
        return fields;
-
 
6929
      }
-
 
6930
 
-
 
6931
      /**
-
 
6932
       * Find the _Fields constant that matches name, or null if its not found.
-
 
6933
       */
-
 
6934
      public static _Fields findByName(String name) {
-
 
6935
        return byName.get(name);
-
 
6936
      }
-
 
6937
 
-
 
6938
      private final short _thriftId;
-
 
6939
      private final String _fieldName;
-
 
6940
 
-
 
6941
      _Fields(short thriftId, String fieldName) {
-
 
6942
        _thriftId = thriftId;
-
 
6943
        _fieldName = fieldName;
-
 
6944
      }
-
 
6945
 
-
 
6946
      public short getThriftFieldId() {
-
 
6947
        return _thriftId;
-
 
6948
      }
-
 
6949
 
-
 
6950
      public String getFieldName() {
-
 
6951
        return _fieldName;
-
 
6952
      }
-
 
6953
    }
-
 
6954
 
-
 
6955
    // isset id assignments
-
 
6956
 
-
 
6957
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
6958
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
6959
          new ListMetaData(TType.LIST, 
-
 
6960
              new FieldValueMetaData(TType.I64))));
-
 
6961
    }});
-
 
6962
 
-
 
6963
    static {
-
 
6964
      FieldMetaData.addStructMetaDataMap(getHolidays_result.class, metaDataMap);
-
 
6965
    }
-
 
6966
 
-
 
6967
    public getHolidays_result() {
-
 
6968
    }
-
 
6969
 
-
 
6970
    public getHolidays_result(
-
 
6971
      List<Long> success)
-
 
6972
    {
-
 
6973
      this();
-
 
6974
      this.success = success;
-
 
6975
    }
-
 
6976
 
-
 
6977
    /**
-
 
6978
     * Performs a deep copy on <i>other</i>.
-
 
6979
     */
-
 
6980
    public getHolidays_result(getHolidays_result other) {
-
 
6981
      if (other.isSetSuccess()) {
-
 
6982
        List<Long> __this__success = new ArrayList<Long>();
-
 
6983
        for (Long other_element : other.success) {
-
 
6984
          __this__success.add(other_element);
-
 
6985
        }
-
 
6986
        this.success = __this__success;
-
 
6987
      }
-
 
6988
    }
-
 
6989
 
-
 
6990
    public getHolidays_result deepCopy() {
-
 
6991
      return new getHolidays_result(this);
-
 
6992
    }
-
 
6993
 
-
 
6994
    @Deprecated
-
 
6995
    public getHolidays_result clone() {
-
 
6996
      return new getHolidays_result(this);
-
 
6997
    }
-
 
6998
 
-
 
6999
    public int getSuccessSize() {
-
 
7000
      return (this.success == null) ? 0 : this.success.size();
-
 
7001
    }
-
 
7002
 
-
 
7003
    public java.util.Iterator<Long> getSuccessIterator() {
-
 
7004
      return (this.success == null) ? null : this.success.iterator();
-
 
7005
    }
-
 
7006
 
-
 
7007
    public void addToSuccess(long elem) {
-
 
7008
      if (this.success == null) {
-
 
7009
        this.success = new ArrayList<Long>();
-
 
7010
      }
-
 
7011
      this.success.add(elem);
-
 
7012
    }
-
 
7013
 
-
 
7014
    public List<Long> getSuccess() {
-
 
7015
      return this.success;
-
 
7016
    }
-
 
7017
 
-
 
7018
    public getHolidays_result setSuccess(List<Long> success) {
-
 
7019
      this.success = success;
-
 
7020
      return this;
-
 
7021
    }
-
 
7022
 
-
 
7023
    public void unsetSuccess() {
-
 
7024
      this.success = null;
-
 
7025
    }
-
 
7026
 
-
 
7027
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
7028
    public boolean isSetSuccess() {
-
 
7029
      return this.success != null;
-
 
7030
    }
-
 
7031
 
-
 
7032
    public void setSuccessIsSet(boolean value) {
-
 
7033
      if (!value) {
-
 
7034
        this.success = null;
-
 
7035
      }
-
 
7036
    }
-
 
7037
 
-
 
7038
    public void setFieldValue(_Fields field, Object value) {
-
 
7039
      switch (field) {
-
 
7040
      case SUCCESS:
-
 
7041
        if (value == null) {
-
 
7042
          unsetSuccess();
-
 
7043
        } else {
-
 
7044
          setSuccess((List<Long>)value);
-
 
7045
        }
-
 
7046
        break;
-
 
7047
 
-
 
7048
      }
-
 
7049
    }
-
 
7050
 
-
 
7051
    public void setFieldValue(int fieldID, Object value) {
-
 
7052
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7053
    }
-
 
7054
 
-
 
7055
    public Object getFieldValue(_Fields field) {
-
 
7056
      switch (field) {
-
 
7057
      case SUCCESS:
-
 
7058
        return getSuccess();
-
 
7059
 
-
 
7060
      }
-
 
7061
      throw new IllegalStateException();
-
 
7062
    }
-
 
7063
 
-
 
7064
    public Object getFieldValue(int fieldId) {
-
 
7065
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7066
    }
-
 
7067
 
-
 
7068
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7069
    public boolean isSet(_Fields field) {
-
 
7070
      switch (field) {
-
 
7071
      case SUCCESS:
-
 
7072
        return isSetSuccess();
-
 
7073
      }
-
 
7074
      throw new IllegalStateException();
-
 
7075
    }
-
 
7076
 
-
 
7077
    public boolean isSet(int fieldID) {
-
 
7078
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7079
    }
-
 
7080
 
-
 
7081
    @Override
-
 
7082
    public boolean equals(Object that) {
-
 
7083
      if (that == null)
-
 
7084
        return false;
-
 
7085
      if (that instanceof getHolidays_result)
-
 
7086
        return this.equals((getHolidays_result)that);
-
 
7087
      return false;
-
 
7088
    }
-
 
7089
 
-
 
7090
    public boolean equals(getHolidays_result that) {
-
 
7091
      if (that == null)
-
 
7092
        return false;
-
 
7093
 
-
 
7094
      boolean this_present_success = true && this.isSetSuccess();
-
 
7095
      boolean that_present_success = true && that.isSetSuccess();
-
 
7096
      if (this_present_success || that_present_success) {
-
 
7097
        if (!(this_present_success && that_present_success))
-
 
7098
          return false;
-
 
7099
        if (!this.success.equals(that.success))
-
 
7100
          return false;
-
 
7101
      }
-
 
7102
 
-
 
7103
      return true;
-
 
7104
    }
-
 
7105
 
-
 
7106
    @Override
-
 
7107
    public int hashCode() {
-
 
7108
      return 0;
-
 
7109
    }
-
 
7110
 
-
 
7111
    public int compareTo(getHolidays_result other) {
-
 
7112
      if (!getClass().equals(other.getClass())) {
-
 
7113
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7114
      }
-
 
7115
 
-
 
7116
      int lastComparison = 0;
-
 
7117
      getHolidays_result typedOther = (getHolidays_result)other;
-
 
7118
 
-
 
7119
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
7120
      if (lastComparison != 0) {
-
 
7121
        return lastComparison;
-
 
7122
      }
-
 
7123
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
7124
      if (lastComparison != 0) {
-
 
7125
        return lastComparison;
-
 
7126
      }
-
 
7127
      return 0;
-
 
7128
    }
-
 
7129
 
-
 
7130
    public void read(TProtocol iprot) throws TException {
-
 
7131
      TField field;
-
 
7132
      iprot.readStructBegin();
-
 
7133
      while (true)
-
 
7134
      {
-
 
7135
        field = iprot.readFieldBegin();
-
 
7136
        if (field.type == TType.STOP) { 
-
 
7137
          break;
-
 
7138
        }
-
 
7139
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7140
        if (fieldId == null) {
-
 
7141
          TProtocolUtil.skip(iprot, field.type);
-
 
7142
        } else {
-
 
7143
          switch (fieldId) {
-
 
7144
            case SUCCESS:
-
 
7145
              if (field.type == TType.LIST) {
-
 
7146
                {
-
 
7147
                  TList _list8 = iprot.readListBegin();
-
 
7148
                  this.success = new ArrayList<Long>(_list8.size);
-
 
7149
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
-
 
7150
                  {
-
 
7151
                    long _elem10;
-
 
7152
                    _elem10 = iprot.readI64();
-
 
7153
                    this.success.add(_elem10);
-
 
7154
                  }
-
 
7155
                  iprot.readListEnd();
-
 
7156
                }
-
 
7157
              } else { 
-
 
7158
                TProtocolUtil.skip(iprot, field.type);
-
 
7159
              }
-
 
7160
              break;
-
 
7161
          }
-
 
7162
          iprot.readFieldEnd();
-
 
7163
        }
-
 
7164
      }
-
 
7165
      iprot.readStructEnd();
-
 
7166
      validate();
-
 
7167
    }
-
 
7168
 
-
 
7169
    public void write(TProtocol oprot) throws TException {
-
 
7170
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7171
 
-
 
7172
      if (this.isSetSuccess()) {
-
 
7173
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
7174
        {
-
 
7175
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
-
 
7176
          for (long _iter11 : this.success)
-
 
7177
          {
-
 
7178
            oprot.writeI64(_iter11);
-
 
7179
          }
-
 
7180
          oprot.writeListEnd();
-
 
7181
        }
-
 
7182
        oprot.writeFieldEnd();
-
 
7183
      }
-
 
7184
      oprot.writeFieldStop();
-
 
7185
      oprot.writeStructEnd();
-
 
7186
    }
-
 
7187
 
-
 
7188
    @Override
-
 
7189
    public String toString() {
-
 
7190
      StringBuilder sb = new StringBuilder("getHolidays_result(");
-
 
7191
      boolean first = true;
-
 
7192
 
-
 
7193
      sb.append("success:");
-
 
7194
      if (this.success == null) {
-
 
7195
        sb.append("null");
-
 
7196
      } else {
-
 
7197
        sb.append(this.success);
-
 
7198
      }
-
 
7199
      first = false;
-
 
7200
      sb.append(")");
-
 
7201
      return sb.toString();
-
 
7202
    }
-
 
7203
 
6469
    public void validate() throws TException {
7204
    public void validate() throws TException {
6470
      // check for required fields
7205
      // check for required fields
6471
    }
7206
    }
6472
 
7207
 
6473
  }
7208
  }