Subversion Repositories SmartDukaan

Rev

Rev 1013 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
48 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.config;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class Configuration {
27
 
28
  public interface Iface {
29
 
30
    public String getPropetry(String propertyName) throws ConfigException, TException;
31
 
32
    public void loadProperty(String propertyName, String propertyValue) throws TException;
33
 
2926 rajveer 34
    public void reloadProperties() throws TException;
35
 
48 ashish 36
  }
37
 
38
  public static class Client implements Iface {
39
    public Client(TProtocol prot)
40
    {
41
      this(prot, prot);
42
    }
43
 
44
    public Client(TProtocol iprot, TProtocol oprot)
45
    {
46
      iprot_ = iprot;
47
      oprot_ = oprot;
48
    }
49
 
50
    protected TProtocol iprot_;
51
    protected TProtocol oprot_;
52
 
53
    protected int seqid_;
54
 
55
    public TProtocol getInputProtocol()
56
    {
57
      return this.iprot_;
58
    }
59
 
60
    public TProtocol getOutputProtocol()
61
    {
62
      return this.oprot_;
63
    }
64
 
65
    public String getPropetry(String propertyName) throws ConfigException, TException
66
    {
67
      send_getPropetry(propertyName);
68
      return recv_getPropetry();
69
    }
70
 
71
    public void send_getPropetry(String propertyName) throws TException
72
    {
73
      oprot_.writeMessageBegin(new TMessage("getPropetry", TMessageType.CALL, seqid_));
74
      getPropetry_args args = new getPropetry_args();
75
      args.propertyName = propertyName;
76
      args.write(oprot_);
77
      oprot_.writeMessageEnd();
78
      oprot_.getTransport().flush();
79
    }
80
 
81
    public String recv_getPropetry() throws ConfigException, TException
82
    {
83
      TMessage msg = iprot_.readMessageBegin();
84
      if (msg.type == TMessageType.EXCEPTION) {
85
        TApplicationException x = TApplicationException.read(iprot_);
86
        iprot_.readMessageEnd();
87
        throw x;
88
      }
89
      getPropetry_result result = new getPropetry_result();
90
      result.read(iprot_);
91
      iprot_.readMessageEnd();
92
      if (result.isSetSuccess()) {
93
        return result.success;
94
      }
95
      if (result.e != null) {
96
        throw result.e;
97
      }
98
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPropetry failed: unknown result");
99
    }
100
 
101
    public void loadProperty(String propertyName, String propertyValue) throws TException
102
    {
103
      send_loadProperty(propertyName, propertyValue);
104
      recv_loadProperty();
105
    }
106
 
107
    public void send_loadProperty(String propertyName, String propertyValue) throws TException
108
    {
109
      oprot_.writeMessageBegin(new TMessage("loadProperty", TMessageType.CALL, seqid_));
110
      loadProperty_args args = new loadProperty_args();
111
      args.propertyName = propertyName;
112
      args.propertyValue = propertyValue;
113
      args.write(oprot_);
114
      oprot_.writeMessageEnd();
115
      oprot_.getTransport().flush();
116
    }
117
 
118
    public void recv_loadProperty() throws TException
119
    {
120
      TMessage msg = iprot_.readMessageBegin();
121
      if (msg.type == TMessageType.EXCEPTION) {
122
        TApplicationException x = TApplicationException.read(iprot_);
123
        iprot_.readMessageEnd();
124
        throw x;
125
      }
126
      loadProperty_result result = new loadProperty_result();
127
      result.read(iprot_);
128
      iprot_.readMessageEnd();
129
      return;
130
    }
131
 
2926 rajveer 132
    public void reloadProperties() throws TException
133
    {
134
      send_reloadProperties();
135
      recv_reloadProperties();
136
    }
137
 
138
    public void send_reloadProperties() throws TException
139
    {
140
      oprot_.writeMessageBegin(new TMessage("reloadProperties", TMessageType.CALL, seqid_));
141
      reloadProperties_args args = new reloadProperties_args();
142
      args.write(oprot_);
143
      oprot_.writeMessageEnd();
144
      oprot_.getTransport().flush();
145
    }
146
 
147
    public void recv_reloadProperties() throws TException
148
    {
149
      TMessage msg = iprot_.readMessageBegin();
150
      if (msg.type == TMessageType.EXCEPTION) {
151
        TApplicationException x = TApplicationException.read(iprot_);
152
        iprot_.readMessageEnd();
153
        throw x;
154
      }
155
      reloadProperties_result result = new reloadProperties_result();
156
      result.read(iprot_);
157
      iprot_.readMessageEnd();
158
      return;
159
    }
160
 
48 ashish 161
  }
162
  public static class Processor implements TProcessor {
163
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
164
    public Processor(Iface iface)
165
    {
166
      iface_ = iface;
167
      processMap_.put("getPropetry", new getPropetry());
168
      processMap_.put("loadProperty", new loadProperty());
2926 rajveer 169
      processMap_.put("reloadProperties", new reloadProperties());
48 ashish 170
    }
171
 
172
    protected static interface ProcessFunction {
173
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
174
    }
175
 
176
    private Iface iface_;
177
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
178
 
179
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
180
    {
181
      TMessage msg = iprot.readMessageBegin();
182
      ProcessFunction fn = processMap_.get(msg.name);
183
      if (fn == null) {
184
        TProtocolUtil.skip(iprot, TType.STRUCT);
185
        iprot.readMessageEnd();
186
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
187
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
188
        x.write(oprot);
189
        oprot.writeMessageEnd();
190
        oprot.getTransport().flush();
191
        return true;
192
      }
193
      fn.process(msg.seqid, iprot, oprot);
194
      return true;
195
    }
196
 
197
    private class getPropetry implements ProcessFunction {
198
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
199
      {
200
        getPropetry_args args = new getPropetry_args();
201
        args.read(iprot);
202
        iprot.readMessageEnd();
203
        getPropetry_result result = new getPropetry_result();
204
        try {
205
          result.success = iface_.getPropetry(args.propertyName);
206
        } catch (ConfigException e) {
207
          result.e = e;
208
        } catch (Throwable th) {
209
          LOGGER.error("Internal error processing getPropetry", th);
210
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPropetry");
211
          oprot.writeMessageBegin(new TMessage("getPropetry", TMessageType.EXCEPTION, seqid));
212
          x.write(oprot);
213
          oprot.writeMessageEnd();
214
          oprot.getTransport().flush();
215
          return;
216
        }
217
        oprot.writeMessageBegin(new TMessage("getPropetry", TMessageType.REPLY, seqid));
218
        result.write(oprot);
219
        oprot.writeMessageEnd();
220
        oprot.getTransport().flush();
221
      }
222
 
223
    }
224
 
225
    private class loadProperty implements ProcessFunction {
226
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
227
      {
228
        loadProperty_args args = new loadProperty_args();
229
        args.read(iprot);
230
        iprot.readMessageEnd();
231
        loadProperty_result result = new loadProperty_result();
232
        iface_.loadProperty(args.propertyName, args.propertyValue);
233
        oprot.writeMessageBegin(new TMessage("loadProperty", TMessageType.REPLY, seqid));
234
        result.write(oprot);
235
        oprot.writeMessageEnd();
236
        oprot.getTransport().flush();
237
      }
238
 
239
    }
240
 
2926 rajveer 241
    private class reloadProperties implements ProcessFunction {
242
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
243
      {
244
        reloadProperties_args args = new reloadProperties_args();
245
        args.read(iprot);
246
        iprot.readMessageEnd();
247
        reloadProperties_result result = new reloadProperties_result();
248
        iface_.reloadProperties();
249
        oprot.writeMessageBegin(new TMessage("reloadProperties", TMessageType.REPLY, seqid));
250
        result.write(oprot);
251
        oprot.writeMessageEnd();
252
        oprot.getTransport().flush();
253
      }
254
 
255
    }
256
 
48 ashish 257
  }
258
 
259
  public static class getPropetry_args implements TBase<getPropetry_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPropetry_args>   {
260
    private static final TStruct STRUCT_DESC = new TStruct("getPropetry_args");
261
 
262
    private static final TField PROPERTY_NAME_FIELD_DESC = new TField("propertyName", TType.STRING, (short)1);
263
 
264
    private String propertyName;
265
 
266
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
267
    public enum _Fields implements TFieldIdEnum {
268
      PROPERTY_NAME((short)1, "propertyName");
269
 
270
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
271
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
272
 
273
      static {
274
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
275
          byId.put((int)field._thriftId, field);
276
          byName.put(field.getFieldName(), field);
277
        }
278
      }
279
 
280
      /**
281
       * Find the _Fields constant that matches fieldId, or null if its not found.
282
       */
283
      public static _Fields findByThriftId(int fieldId) {
284
        return byId.get(fieldId);
285
      }
286
 
287
      /**
288
       * Find the _Fields constant that matches fieldId, throwing an exception
289
       * if it is not found.
290
       */
291
      public static _Fields findByThriftIdOrThrow(int fieldId) {
292
        _Fields fields = findByThriftId(fieldId);
293
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
294
        return fields;
295
      }
296
 
297
      /**
298
       * Find the _Fields constant that matches name, or null if its not found.
299
       */
300
      public static _Fields findByName(String name) {
301
        return byName.get(name);
302
      }
303
 
304
      private final short _thriftId;
305
      private final String _fieldName;
306
 
307
      _Fields(short thriftId, String fieldName) {
308
        _thriftId = thriftId;
309
        _fieldName = fieldName;
310
      }
311
 
312
      public short getThriftFieldId() {
313
        return _thriftId;
314
      }
315
 
316
      public String getFieldName() {
317
        return _fieldName;
318
      }
319
    }
320
 
321
    // isset id assignments
322
 
323
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
324
      put(_Fields.PROPERTY_NAME, new FieldMetaData("propertyName", TFieldRequirementType.DEFAULT, 
325
          new FieldValueMetaData(TType.STRING)));
326
    }});
327
 
328
    static {
329
      FieldMetaData.addStructMetaDataMap(getPropetry_args.class, metaDataMap);
330
    }
331
 
332
    public getPropetry_args() {
333
    }
334
 
335
    public getPropetry_args(
336
      String propertyName)
337
    {
338
      this();
339
      this.propertyName = propertyName;
340
    }
341
 
342
    /**
343
     * Performs a deep copy on <i>other</i>.
344
     */
345
    public getPropetry_args(getPropetry_args other) {
346
      if (other.isSetPropertyName()) {
347
        this.propertyName = other.propertyName;
348
      }
349
    }
350
 
351
    public getPropetry_args deepCopy() {
352
      return new getPropetry_args(this);
353
    }
354
 
355
    @Deprecated
356
    public getPropetry_args clone() {
357
      return new getPropetry_args(this);
358
    }
359
 
360
    public String getPropertyName() {
361
      return this.propertyName;
362
    }
363
 
364
    public getPropetry_args setPropertyName(String propertyName) {
365
      this.propertyName = propertyName;
366
      return this;
367
    }
368
 
369
    public void unsetPropertyName() {
370
      this.propertyName = null;
371
    }
372
 
373
    /** Returns true if field propertyName is set (has been asigned a value) and false otherwise */
374
    public boolean isSetPropertyName() {
375
      return this.propertyName != null;
376
    }
377
 
378
    public void setPropertyNameIsSet(boolean value) {
379
      if (!value) {
380
        this.propertyName = null;
381
      }
382
    }
383
 
384
    public void setFieldValue(_Fields field, Object value) {
385
      switch (field) {
386
      case PROPERTY_NAME:
387
        if (value == null) {
388
          unsetPropertyName();
389
        } else {
390
          setPropertyName((String)value);
391
        }
392
        break;
393
 
394
      }
395
    }
396
 
397
    public void setFieldValue(int fieldID, Object value) {
398
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
399
    }
400
 
401
    public Object getFieldValue(_Fields field) {
402
      switch (field) {
403
      case PROPERTY_NAME:
404
        return getPropertyName();
405
 
406
      }
407
      throw new IllegalStateException();
408
    }
409
 
410
    public Object getFieldValue(int fieldId) {
411
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
412
    }
413
 
414
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
415
    public boolean isSet(_Fields field) {
416
      switch (field) {
417
      case PROPERTY_NAME:
418
        return isSetPropertyName();
419
      }
420
      throw new IllegalStateException();
421
    }
422
 
423
    public boolean isSet(int fieldID) {
424
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
425
    }
426
 
427
    @Override
428
    public boolean equals(Object that) {
429
      if (that == null)
430
        return false;
431
      if (that instanceof getPropetry_args)
432
        return this.equals((getPropetry_args)that);
433
      return false;
434
    }
435
 
436
    public boolean equals(getPropetry_args that) {
437
      if (that == null)
438
        return false;
439
 
440
      boolean this_present_propertyName = true && this.isSetPropertyName();
441
      boolean that_present_propertyName = true && that.isSetPropertyName();
442
      if (this_present_propertyName || that_present_propertyName) {
443
        if (!(this_present_propertyName && that_present_propertyName))
444
          return false;
445
        if (!this.propertyName.equals(that.propertyName))
446
          return false;
447
      }
448
 
449
      return true;
450
    }
451
 
452
    @Override
453
    public int hashCode() {
454
      return 0;
455
    }
456
 
457
    public int compareTo(getPropetry_args other) {
458
      if (!getClass().equals(other.getClass())) {
459
        return getClass().getName().compareTo(other.getClass().getName());
460
      }
461
 
462
      int lastComparison = 0;
463
      getPropetry_args typedOther = (getPropetry_args)other;
464
 
465
      lastComparison = Boolean.valueOf(isSetPropertyName()).compareTo(isSetPropertyName());
466
      if (lastComparison != 0) {
467
        return lastComparison;
468
      }
469
      lastComparison = TBaseHelper.compareTo(propertyName, typedOther.propertyName);
470
      if (lastComparison != 0) {
471
        return lastComparison;
472
      }
473
      return 0;
474
    }
475
 
476
    public void read(TProtocol iprot) throws TException {
477
      TField field;
478
      iprot.readStructBegin();
479
      while (true)
480
      {
481
        field = iprot.readFieldBegin();
482
        if (field.type == TType.STOP) { 
483
          break;
484
        }
485
        _Fields fieldId = _Fields.findByThriftId(field.id);
486
        if (fieldId == null) {
487
          TProtocolUtil.skip(iprot, field.type);
488
        } else {
489
          switch (fieldId) {
490
            case PROPERTY_NAME:
491
              if (field.type == TType.STRING) {
492
                this.propertyName = iprot.readString();
493
              } else { 
494
                TProtocolUtil.skip(iprot, field.type);
495
              }
496
              break;
497
          }
498
          iprot.readFieldEnd();
499
        }
500
      }
501
      iprot.readStructEnd();
502
      validate();
503
    }
504
 
505
    public void write(TProtocol oprot) throws TException {
506
      validate();
507
 
508
      oprot.writeStructBegin(STRUCT_DESC);
509
      if (this.propertyName != null) {
510
        oprot.writeFieldBegin(PROPERTY_NAME_FIELD_DESC);
511
        oprot.writeString(this.propertyName);
512
        oprot.writeFieldEnd();
513
      }
514
      oprot.writeFieldStop();
515
      oprot.writeStructEnd();
516
    }
517
 
518
    @Override
519
    public String toString() {
520
      StringBuilder sb = new StringBuilder("getPropetry_args(");
521
      boolean first = true;
522
 
523
      sb.append("propertyName:");
524
      if (this.propertyName == null) {
525
        sb.append("null");
526
      } else {
527
        sb.append(this.propertyName);
528
      }
529
      first = false;
530
      sb.append(")");
531
      return sb.toString();
532
    }
533
 
534
    public void validate() throws TException {
535
      // check for required fields
536
    }
537
 
538
  }
539
 
540
  public static class getPropetry_result implements TBase<getPropetry_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPropetry_result>   {
541
    private static final TStruct STRUCT_DESC = new TStruct("getPropetry_result");
542
 
543
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
544
    private static final TField E_FIELD_DESC = new TField("e", TType.STRUCT, (short)1);
545
 
546
    private String success;
547
    private ConfigException e;
548
 
549
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
550
    public enum _Fields implements TFieldIdEnum {
551
      SUCCESS((short)0, "success"),
552
      E((short)1, "e");
553
 
554
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
555
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
556
 
557
      static {
558
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
559
          byId.put((int)field._thriftId, field);
560
          byName.put(field.getFieldName(), field);
561
        }
562
      }
563
 
564
      /**
565
       * Find the _Fields constant that matches fieldId, or null if its not found.
566
       */
567
      public static _Fields findByThriftId(int fieldId) {
568
        return byId.get(fieldId);
569
      }
570
 
571
      /**
572
       * Find the _Fields constant that matches fieldId, throwing an exception
573
       * if it is not found.
574
       */
575
      public static _Fields findByThriftIdOrThrow(int fieldId) {
576
        _Fields fields = findByThriftId(fieldId);
577
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
578
        return fields;
579
      }
580
 
581
      /**
582
       * Find the _Fields constant that matches name, or null if its not found.
583
       */
584
      public static _Fields findByName(String name) {
585
        return byName.get(name);
586
      }
587
 
588
      private final short _thriftId;
589
      private final String _fieldName;
590
 
591
      _Fields(short thriftId, String fieldName) {
592
        _thriftId = thriftId;
593
        _fieldName = fieldName;
594
      }
595
 
596
      public short getThriftFieldId() {
597
        return _thriftId;
598
      }
599
 
600
      public String getFieldName() {
601
        return _fieldName;
602
      }
603
    }
604
 
605
    // isset id assignments
606
 
607
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
608
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
609
          new FieldValueMetaData(TType.STRING)));
610
      put(_Fields.E, new FieldMetaData("e", TFieldRequirementType.DEFAULT, 
611
          new FieldValueMetaData(TType.STRUCT)));
612
    }});
613
 
614
    static {
615
      FieldMetaData.addStructMetaDataMap(getPropetry_result.class, metaDataMap);
616
    }
617
 
618
    public getPropetry_result() {
619
    }
620
 
621
    public getPropetry_result(
622
      String success,
623
      ConfigException e)
624
    {
625
      this();
626
      this.success = success;
627
      this.e = e;
628
    }
629
 
630
    /**
631
     * Performs a deep copy on <i>other</i>.
632
     */
633
    public getPropetry_result(getPropetry_result other) {
634
      if (other.isSetSuccess()) {
635
        this.success = other.success;
636
      }
637
      if (other.isSetE()) {
638
        this.e = new ConfigException(other.e);
639
      }
640
    }
641
 
642
    public getPropetry_result deepCopy() {
643
      return new getPropetry_result(this);
644
    }
645
 
646
    @Deprecated
647
    public getPropetry_result clone() {
648
      return new getPropetry_result(this);
649
    }
650
 
651
    public String getSuccess() {
652
      return this.success;
653
    }
654
 
655
    public getPropetry_result setSuccess(String success) {
656
      this.success = success;
657
      return this;
658
    }
659
 
660
    public void unsetSuccess() {
661
      this.success = null;
662
    }
663
 
664
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
665
    public boolean isSetSuccess() {
666
      return this.success != null;
667
    }
668
 
669
    public void setSuccessIsSet(boolean value) {
670
      if (!value) {
671
        this.success = null;
672
      }
673
    }
674
 
675
    public ConfigException getE() {
676
      return this.e;
677
    }
678
 
679
    public getPropetry_result setE(ConfigException e) {
680
      this.e = e;
681
      return this;
682
    }
683
 
684
    public void unsetE() {
685
      this.e = null;
686
    }
687
 
688
    /** Returns true if field e is set (has been asigned a value) and false otherwise */
689
    public boolean isSetE() {
690
      return this.e != null;
691
    }
692
 
693
    public void setEIsSet(boolean value) {
694
      if (!value) {
695
        this.e = null;
696
      }
697
    }
698
 
699
    public void setFieldValue(_Fields field, Object value) {
700
      switch (field) {
701
      case SUCCESS:
702
        if (value == null) {
703
          unsetSuccess();
704
        } else {
705
          setSuccess((String)value);
706
        }
707
        break;
708
 
709
      case E:
710
        if (value == null) {
711
          unsetE();
712
        } else {
713
          setE((ConfigException)value);
714
        }
715
        break;
716
 
717
      }
718
    }
719
 
720
    public void setFieldValue(int fieldID, Object value) {
721
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
722
    }
723
 
724
    public Object getFieldValue(_Fields field) {
725
      switch (field) {
726
      case SUCCESS:
727
        return getSuccess();
728
 
729
      case E:
730
        return getE();
731
 
732
      }
733
      throw new IllegalStateException();
734
    }
735
 
736
    public Object getFieldValue(int fieldId) {
737
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
738
    }
739
 
740
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
741
    public boolean isSet(_Fields field) {
742
      switch (field) {
743
      case SUCCESS:
744
        return isSetSuccess();
745
      case E:
746
        return isSetE();
747
      }
748
      throw new IllegalStateException();
749
    }
750
 
751
    public boolean isSet(int fieldID) {
752
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
753
    }
754
 
755
    @Override
756
    public boolean equals(Object that) {
757
      if (that == null)
758
        return false;
759
      if (that instanceof getPropetry_result)
760
        return this.equals((getPropetry_result)that);
761
      return false;
762
    }
763
 
764
    public boolean equals(getPropetry_result that) {
765
      if (that == null)
766
        return false;
767
 
768
      boolean this_present_success = true && this.isSetSuccess();
769
      boolean that_present_success = true && that.isSetSuccess();
770
      if (this_present_success || that_present_success) {
771
        if (!(this_present_success && that_present_success))
772
          return false;
773
        if (!this.success.equals(that.success))
774
          return false;
775
      }
776
 
777
      boolean this_present_e = true && this.isSetE();
778
      boolean that_present_e = true && that.isSetE();
779
      if (this_present_e || that_present_e) {
780
        if (!(this_present_e && that_present_e))
781
          return false;
782
        if (!this.e.equals(that.e))
783
          return false;
784
      }
785
 
786
      return true;
787
    }
788
 
789
    @Override
790
    public int hashCode() {
791
      return 0;
792
    }
793
 
794
    public int compareTo(getPropetry_result other) {
795
      if (!getClass().equals(other.getClass())) {
796
        return getClass().getName().compareTo(other.getClass().getName());
797
      }
798
 
799
      int lastComparison = 0;
800
      getPropetry_result typedOther = (getPropetry_result)other;
801
 
802
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
803
      if (lastComparison != 0) {
804
        return lastComparison;
805
      }
806
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
807
      if (lastComparison != 0) {
808
        return lastComparison;
809
      }
810
      lastComparison = Boolean.valueOf(isSetE()).compareTo(isSetE());
811
      if (lastComparison != 0) {
812
        return lastComparison;
813
      }
814
      lastComparison = TBaseHelper.compareTo(e, typedOther.e);
815
      if (lastComparison != 0) {
816
        return lastComparison;
817
      }
818
      return 0;
819
    }
820
 
821
    public void read(TProtocol iprot) throws TException {
822
      TField field;
823
      iprot.readStructBegin();
824
      while (true)
825
      {
826
        field = iprot.readFieldBegin();
827
        if (field.type == TType.STOP) { 
828
          break;
829
        }
830
        _Fields fieldId = _Fields.findByThriftId(field.id);
831
        if (fieldId == null) {
832
          TProtocolUtil.skip(iprot, field.type);
833
        } else {
834
          switch (fieldId) {
835
            case SUCCESS:
836
              if (field.type == TType.STRING) {
837
                this.success = iprot.readString();
838
              } else { 
839
                TProtocolUtil.skip(iprot, field.type);
840
              }
841
              break;
842
            case E:
843
              if (field.type == TType.STRUCT) {
844
                this.e = new ConfigException();
845
                this.e.read(iprot);
846
              } else { 
847
                TProtocolUtil.skip(iprot, field.type);
848
              }
849
              break;
850
          }
851
          iprot.readFieldEnd();
852
        }
853
      }
854
      iprot.readStructEnd();
855
      validate();
856
    }
857
 
858
    public void write(TProtocol oprot) throws TException {
859
      oprot.writeStructBegin(STRUCT_DESC);
860
 
861
      if (this.isSetSuccess()) {
862
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
863
        oprot.writeString(this.success);
864
        oprot.writeFieldEnd();
865
      } else if (this.isSetE()) {
866
        oprot.writeFieldBegin(E_FIELD_DESC);
867
        this.e.write(oprot);
868
        oprot.writeFieldEnd();
869
      }
870
      oprot.writeFieldStop();
871
      oprot.writeStructEnd();
872
    }
873
 
874
    @Override
875
    public String toString() {
876
      StringBuilder sb = new StringBuilder("getPropetry_result(");
877
      boolean first = true;
878
 
879
      sb.append("success:");
880
      if (this.success == null) {
881
        sb.append("null");
882
      } else {
883
        sb.append(this.success);
884
      }
885
      first = false;
886
      if (!first) sb.append(", ");
887
      sb.append("e:");
888
      if (this.e == null) {
889
        sb.append("null");
890
      } else {
891
        sb.append(this.e);
892
      }
893
      first = false;
894
      sb.append(")");
895
      return sb.toString();
896
    }
897
 
898
    public void validate() throws TException {
899
      // check for required fields
900
    }
901
 
902
  }
903
 
904
  public static class loadProperty_args implements TBase<loadProperty_args._Fields>, java.io.Serializable, Cloneable, Comparable<loadProperty_args>   {
905
    private static final TStruct STRUCT_DESC = new TStruct("loadProperty_args");
906
 
907
    private static final TField PROPERTY_NAME_FIELD_DESC = new TField("propertyName", TType.STRING, (short)1);
908
    private static final TField PROPERTY_VALUE_FIELD_DESC = new TField("propertyValue", TType.STRING, (short)2);
909
 
910
    private String propertyName;
911
    private String propertyValue;
912
 
913
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
914
    public enum _Fields implements TFieldIdEnum {
915
      PROPERTY_NAME((short)1, "propertyName"),
916
      PROPERTY_VALUE((short)2, "propertyValue");
917
 
918
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
919
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
920
 
921
      static {
922
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
923
          byId.put((int)field._thriftId, field);
924
          byName.put(field.getFieldName(), field);
925
        }
926
      }
927
 
928
      /**
929
       * Find the _Fields constant that matches fieldId, or null if its not found.
930
       */
931
      public static _Fields findByThriftId(int fieldId) {
932
        return byId.get(fieldId);
933
      }
934
 
935
      /**
936
       * Find the _Fields constant that matches fieldId, throwing an exception
937
       * if it is not found.
938
       */
939
      public static _Fields findByThriftIdOrThrow(int fieldId) {
940
        _Fields fields = findByThriftId(fieldId);
941
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
942
        return fields;
943
      }
944
 
945
      /**
946
       * Find the _Fields constant that matches name, or null if its not found.
947
       */
948
      public static _Fields findByName(String name) {
949
        return byName.get(name);
950
      }
951
 
952
      private final short _thriftId;
953
      private final String _fieldName;
954
 
955
      _Fields(short thriftId, String fieldName) {
956
        _thriftId = thriftId;
957
        _fieldName = fieldName;
958
      }
959
 
960
      public short getThriftFieldId() {
961
        return _thriftId;
962
      }
963
 
964
      public String getFieldName() {
965
        return _fieldName;
966
      }
967
    }
968
 
969
    // isset id assignments
970
 
971
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
972
      put(_Fields.PROPERTY_NAME, new FieldMetaData("propertyName", TFieldRequirementType.DEFAULT, 
973
          new FieldValueMetaData(TType.STRING)));
974
      put(_Fields.PROPERTY_VALUE, new FieldMetaData("propertyValue", TFieldRequirementType.DEFAULT, 
975
          new FieldValueMetaData(TType.STRING)));
976
    }});
977
 
978
    static {
979
      FieldMetaData.addStructMetaDataMap(loadProperty_args.class, metaDataMap);
980
    }
981
 
982
    public loadProperty_args() {
983
    }
984
 
985
    public loadProperty_args(
986
      String propertyName,
987
      String propertyValue)
988
    {
989
      this();
990
      this.propertyName = propertyName;
991
      this.propertyValue = propertyValue;
992
    }
993
 
994
    /**
995
     * Performs a deep copy on <i>other</i>.
996
     */
997
    public loadProperty_args(loadProperty_args other) {
998
      if (other.isSetPropertyName()) {
999
        this.propertyName = other.propertyName;
1000
      }
1001
      if (other.isSetPropertyValue()) {
1002
        this.propertyValue = other.propertyValue;
1003
      }
1004
    }
1005
 
1006
    public loadProperty_args deepCopy() {
1007
      return new loadProperty_args(this);
1008
    }
1009
 
1010
    @Deprecated
1011
    public loadProperty_args clone() {
1012
      return new loadProperty_args(this);
1013
    }
1014
 
1015
    public String getPropertyName() {
1016
      return this.propertyName;
1017
    }
1018
 
1019
    public loadProperty_args setPropertyName(String propertyName) {
1020
      this.propertyName = propertyName;
1021
      return this;
1022
    }
1023
 
1024
    public void unsetPropertyName() {
1025
      this.propertyName = null;
1026
    }
1027
 
1028
    /** Returns true if field propertyName is set (has been asigned a value) and false otherwise */
1029
    public boolean isSetPropertyName() {
1030
      return this.propertyName != null;
1031
    }
1032
 
1033
    public void setPropertyNameIsSet(boolean value) {
1034
      if (!value) {
1035
        this.propertyName = null;
1036
      }
1037
    }
1038
 
1039
    public String getPropertyValue() {
1040
      return this.propertyValue;
1041
    }
1042
 
1043
    public loadProperty_args setPropertyValue(String propertyValue) {
1044
      this.propertyValue = propertyValue;
1045
      return this;
1046
    }
1047
 
1048
    public void unsetPropertyValue() {
1049
      this.propertyValue = null;
1050
    }
1051
 
1052
    /** Returns true if field propertyValue is set (has been asigned a value) and false otherwise */
1053
    public boolean isSetPropertyValue() {
1054
      return this.propertyValue != null;
1055
    }
1056
 
1057
    public void setPropertyValueIsSet(boolean value) {
1058
      if (!value) {
1059
        this.propertyValue = null;
1060
      }
1061
    }
1062
 
1063
    public void setFieldValue(_Fields field, Object value) {
1064
      switch (field) {
1065
      case PROPERTY_NAME:
1066
        if (value == null) {
1067
          unsetPropertyName();
1068
        } else {
1069
          setPropertyName((String)value);
1070
        }
1071
        break;
1072
 
1073
      case PROPERTY_VALUE:
1074
        if (value == null) {
1075
          unsetPropertyValue();
1076
        } else {
1077
          setPropertyValue((String)value);
1078
        }
1079
        break;
1080
 
1081
      }
1082
    }
1083
 
1084
    public void setFieldValue(int fieldID, Object value) {
1085
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1086
    }
1087
 
1088
    public Object getFieldValue(_Fields field) {
1089
      switch (field) {
1090
      case PROPERTY_NAME:
1091
        return getPropertyName();
1092
 
1093
      case PROPERTY_VALUE:
1094
        return getPropertyValue();
1095
 
1096
      }
1097
      throw new IllegalStateException();
1098
    }
1099
 
1100
    public Object getFieldValue(int fieldId) {
1101
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1102
    }
1103
 
1104
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1105
    public boolean isSet(_Fields field) {
1106
      switch (field) {
1107
      case PROPERTY_NAME:
1108
        return isSetPropertyName();
1109
      case PROPERTY_VALUE:
1110
        return isSetPropertyValue();
1111
      }
1112
      throw new IllegalStateException();
1113
    }
1114
 
1115
    public boolean isSet(int fieldID) {
1116
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1117
    }
1118
 
1119
    @Override
1120
    public boolean equals(Object that) {
1121
      if (that == null)
1122
        return false;
1123
      if (that instanceof loadProperty_args)
1124
        return this.equals((loadProperty_args)that);
1125
      return false;
1126
    }
1127
 
1128
    public boolean equals(loadProperty_args that) {
1129
      if (that == null)
1130
        return false;
1131
 
1132
      boolean this_present_propertyName = true && this.isSetPropertyName();
1133
      boolean that_present_propertyName = true && that.isSetPropertyName();
1134
      if (this_present_propertyName || that_present_propertyName) {
1135
        if (!(this_present_propertyName && that_present_propertyName))
1136
          return false;
1137
        if (!this.propertyName.equals(that.propertyName))
1138
          return false;
1139
      }
1140
 
1141
      boolean this_present_propertyValue = true && this.isSetPropertyValue();
1142
      boolean that_present_propertyValue = true && that.isSetPropertyValue();
1143
      if (this_present_propertyValue || that_present_propertyValue) {
1144
        if (!(this_present_propertyValue && that_present_propertyValue))
1145
          return false;
1146
        if (!this.propertyValue.equals(that.propertyValue))
1147
          return false;
1148
      }
1149
 
1150
      return true;
1151
    }
1152
 
1153
    @Override
1154
    public int hashCode() {
1155
      return 0;
1156
    }
1157
 
1158
    public int compareTo(loadProperty_args other) {
1159
      if (!getClass().equals(other.getClass())) {
1160
        return getClass().getName().compareTo(other.getClass().getName());
1161
      }
1162
 
1163
      int lastComparison = 0;
1164
      loadProperty_args typedOther = (loadProperty_args)other;
1165
 
1166
      lastComparison = Boolean.valueOf(isSetPropertyName()).compareTo(isSetPropertyName());
1167
      if (lastComparison != 0) {
1168
        return lastComparison;
1169
      }
1170
      lastComparison = TBaseHelper.compareTo(propertyName, typedOther.propertyName);
1171
      if (lastComparison != 0) {
1172
        return lastComparison;
1173
      }
1174
      lastComparison = Boolean.valueOf(isSetPropertyValue()).compareTo(isSetPropertyValue());
1175
      if (lastComparison != 0) {
1176
        return lastComparison;
1177
      }
1178
      lastComparison = TBaseHelper.compareTo(propertyValue, typedOther.propertyValue);
1179
      if (lastComparison != 0) {
1180
        return lastComparison;
1181
      }
1182
      return 0;
1183
    }
1184
 
1185
    public void read(TProtocol iprot) throws TException {
1186
      TField field;
1187
      iprot.readStructBegin();
1188
      while (true)
1189
      {
1190
        field = iprot.readFieldBegin();
1191
        if (field.type == TType.STOP) { 
1192
          break;
1193
        }
1194
        _Fields fieldId = _Fields.findByThriftId(field.id);
1195
        if (fieldId == null) {
1196
          TProtocolUtil.skip(iprot, field.type);
1197
        } else {
1198
          switch (fieldId) {
1199
            case PROPERTY_NAME:
1200
              if (field.type == TType.STRING) {
1201
                this.propertyName = iprot.readString();
1202
              } else { 
1203
                TProtocolUtil.skip(iprot, field.type);
1204
              }
1205
              break;
1206
            case PROPERTY_VALUE:
1207
              if (field.type == TType.STRING) {
1208
                this.propertyValue = iprot.readString();
1209
              } else { 
1210
                TProtocolUtil.skip(iprot, field.type);
1211
              }
1212
              break;
1213
          }
1214
          iprot.readFieldEnd();
1215
        }
1216
      }
1217
      iprot.readStructEnd();
1218
      validate();
1219
    }
1220
 
1221
    public void write(TProtocol oprot) throws TException {
1222
      validate();
1223
 
1224
      oprot.writeStructBegin(STRUCT_DESC);
1225
      if (this.propertyName != null) {
1226
        oprot.writeFieldBegin(PROPERTY_NAME_FIELD_DESC);
1227
        oprot.writeString(this.propertyName);
1228
        oprot.writeFieldEnd();
1229
      }
1230
      if (this.propertyValue != null) {
1231
        oprot.writeFieldBegin(PROPERTY_VALUE_FIELD_DESC);
1232
        oprot.writeString(this.propertyValue);
1233
        oprot.writeFieldEnd();
1234
      }
1235
      oprot.writeFieldStop();
1236
      oprot.writeStructEnd();
1237
    }
1238
 
1239
    @Override
1240
    public String toString() {
1241
      StringBuilder sb = new StringBuilder("loadProperty_args(");
1242
      boolean first = true;
1243
 
1244
      sb.append("propertyName:");
1245
      if (this.propertyName == null) {
1246
        sb.append("null");
1247
      } else {
1248
        sb.append(this.propertyName);
1249
      }
1250
      first = false;
1251
      if (!first) sb.append(", ");
1252
      sb.append("propertyValue:");
1253
      if (this.propertyValue == null) {
1254
        sb.append("null");
1255
      } else {
1256
        sb.append(this.propertyValue);
1257
      }
1258
      first = false;
1259
      sb.append(")");
1260
      return sb.toString();
1261
    }
1262
 
1263
    public void validate() throws TException {
1264
      // check for required fields
1265
    }
1266
 
1267
  }
1268
 
1269
  public static class loadProperty_result implements TBase<loadProperty_result._Fields>, java.io.Serializable, Cloneable, Comparable<loadProperty_result>   {
1270
    private static final TStruct STRUCT_DESC = new TStruct("loadProperty_result");
1271
 
1272
 
1273
 
1274
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1275
    public enum _Fields implements TFieldIdEnum {
1276
;
1277
 
1278
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1279
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1280
 
1281
      static {
1282
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1283
          byId.put((int)field._thriftId, field);
1284
          byName.put(field.getFieldName(), field);
1285
        }
1286
      }
1287
 
1288
      /**
1289
       * Find the _Fields constant that matches fieldId, or null if its not found.
1290
       */
1291
      public static _Fields findByThriftId(int fieldId) {
1292
        return byId.get(fieldId);
1293
      }
1294
 
1295
      /**
1296
       * Find the _Fields constant that matches fieldId, throwing an exception
1297
       * if it is not found.
1298
       */
1299
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1300
        _Fields fields = findByThriftId(fieldId);
1301
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1302
        return fields;
1303
      }
1304
 
1305
      /**
1306
       * Find the _Fields constant that matches name, or null if its not found.
1307
       */
1308
      public static _Fields findByName(String name) {
1309
        return byName.get(name);
1310
      }
1311
 
1312
      private final short _thriftId;
1313
      private final String _fieldName;
1314
 
1315
      _Fields(short thriftId, String fieldName) {
1316
        _thriftId = thriftId;
1317
        _fieldName = fieldName;
1318
      }
1319
 
1320
      public short getThriftFieldId() {
1321
        return _thriftId;
1322
      }
1323
 
1324
      public String getFieldName() {
1325
        return _fieldName;
1326
      }
1327
    }
1328
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1329
    }});
1330
 
1331
    static {
1332
      FieldMetaData.addStructMetaDataMap(loadProperty_result.class, metaDataMap);
1333
    }
1334
 
1335
    public loadProperty_result() {
1336
    }
1337
 
1338
    /**
1339
     * Performs a deep copy on <i>other</i>.
1340
     */
1341
    public loadProperty_result(loadProperty_result other) {
1342
    }
1343
 
1344
    public loadProperty_result deepCopy() {
1345
      return new loadProperty_result(this);
1346
    }
1347
 
1348
    @Deprecated
1349
    public loadProperty_result clone() {
1350
      return new loadProperty_result(this);
1351
    }
1352
 
1353
    public void setFieldValue(_Fields field, Object value) {
1354
      switch (field) {
1355
      }
1356
    }
1357
 
1358
    public void setFieldValue(int fieldID, Object value) {
1359
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1360
    }
1361
 
1362
    public Object getFieldValue(_Fields field) {
1363
      switch (field) {
1364
      }
1365
      throw new IllegalStateException();
1366
    }
1367
 
1368
    public Object getFieldValue(int fieldId) {
1369
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1370
    }
1371
 
1372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1373
    public boolean isSet(_Fields field) {
1374
      switch (field) {
1375
      }
1376
      throw new IllegalStateException();
1377
    }
1378
 
1379
    public boolean isSet(int fieldID) {
1380
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1381
    }
1382
 
1383
    @Override
1384
    public boolean equals(Object that) {
1385
      if (that == null)
1386
        return false;
1387
      if (that instanceof loadProperty_result)
1388
        return this.equals((loadProperty_result)that);
1389
      return false;
1390
    }
1391
 
1392
    public boolean equals(loadProperty_result that) {
1393
      if (that == null)
1394
        return false;
1395
 
1396
      return true;
1397
    }
1398
 
1399
    @Override
1400
    public int hashCode() {
1401
      return 0;
1402
    }
1403
 
1404
    public int compareTo(loadProperty_result other) {
1405
      if (!getClass().equals(other.getClass())) {
1406
        return getClass().getName().compareTo(other.getClass().getName());
1407
      }
1408
 
1409
      int lastComparison = 0;
1410
      loadProperty_result typedOther = (loadProperty_result)other;
1411
 
1412
      return 0;
1413
    }
1414
 
1415
    public void read(TProtocol iprot) throws TException {
1416
      TField field;
1417
      iprot.readStructBegin();
1418
      while (true)
1419
      {
1420
        field = iprot.readFieldBegin();
1421
        if (field.type == TType.STOP) { 
1422
          break;
1423
        }
1424
        _Fields fieldId = _Fields.findByThriftId(field.id);
1425
        if (fieldId == null) {
1426
          TProtocolUtil.skip(iprot, field.type);
1427
        } else {
1428
          switch (fieldId) {
1429
          }
1430
          iprot.readFieldEnd();
1431
        }
1432
      }
1433
      iprot.readStructEnd();
1434
      validate();
1435
    }
1436
 
1437
    public void write(TProtocol oprot) throws TException {
1438
      oprot.writeStructBegin(STRUCT_DESC);
1439
 
1440
      oprot.writeFieldStop();
1441
      oprot.writeStructEnd();
1442
    }
1443
 
1444
    @Override
1445
    public String toString() {
1446
      StringBuilder sb = new StringBuilder("loadProperty_result(");
1447
      boolean first = true;
1448
 
1449
      sb.append(")");
1450
      return sb.toString();
1451
    }
1452
 
1453
    public void validate() throws TException {
1454
      // check for required fields
1455
    }
1456
 
1457
  }
1458
 
2926 rajveer 1459
  public static class reloadProperties_args implements TBase<reloadProperties_args._Fields>, java.io.Serializable, Cloneable, Comparable<reloadProperties_args>   {
1460
    private static final TStruct STRUCT_DESC = new TStruct("reloadProperties_args");
1461
 
1462
 
1463
 
1464
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1465
    public enum _Fields implements TFieldIdEnum {
1466
;
1467
 
1468
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1469
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1470
 
1471
      static {
1472
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1473
          byId.put((int)field._thriftId, field);
1474
          byName.put(field.getFieldName(), field);
1475
        }
1476
      }
1477
 
1478
      /**
1479
       * Find the _Fields constant that matches fieldId, or null if its not found.
1480
       */
1481
      public static _Fields findByThriftId(int fieldId) {
1482
        return byId.get(fieldId);
1483
      }
1484
 
1485
      /**
1486
       * Find the _Fields constant that matches fieldId, throwing an exception
1487
       * if it is not found.
1488
       */
1489
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1490
        _Fields fields = findByThriftId(fieldId);
1491
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1492
        return fields;
1493
      }
1494
 
1495
      /**
1496
       * Find the _Fields constant that matches name, or null if its not found.
1497
       */
1498
      public static _Fields findByName(String name) {
1499
        return byName.get(name);
1500
      }
1501
 
1502
      private final short _thriftId;
1503
      private final String _fieldName;
1504
 
1505
      _Fields(short thriftId, String fieldName) {
1506
        _thriftId = thriftId;
1507
        _fieldName = fieldName;
1508
      }
1509
 
1510
      public short getThriftFieldId() {
1511
        return _thriftId;
1512
      }
1513
 
1514
      public String getFieldName() {
1515
        return _fieldName;
1516
      }
1517
    }
1518
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1519
    }});
1520
 
1521
    static {
1522
      FieldMetaData.addStructMetaDataMap(reloadProperties_args.class, metaDataMap);
1523
    }
1524
 
1525
    public reloadProperties_args() {
1526
    }
1527
 
1528
    /**
1529
     * Performs a deep copy on <i>other</i>.
1530
     */
1531
    public reloadProperties_args(reloadProperties_args other) {
1532
    }
1533
 
1534
    public reloadProperties_args deepCopy() {
1535
      return new reloadProperties_args(this);
1536
    }
1537
 
1538
    @Deprecated
1539
    public reloadProperties_args clone() {
1540
      return new reloadProperties_args(this);
1541
    }
1542
 
1543
    public void setFieldValue(_Fields field, Object value) {
1544
      switch (field) {
1545
      }
1546
    }
1547
 
1548
    public void setFieldValue(int fieldID, Object value) {
1549
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1550
    }
1551
 
1552
    public Object getFieldValue(_Fields field) {
1553
      switch (field) {
1554
      }
1555
      throw new IllegalStateException();
1556
    }
1557
 
1558
    public Object getFieldValue(int fieldId) {
1559
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1560
    }
1561
 
1562
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1563
    public boolean isSet(_Fields field) {
1564
      switch (field) {
1565
      }
1566
      throw new IllegalStateException();
1567
    }
1568
 
1569
    public boolean isSet(int fieldID) {
1570
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1571
    }
1572
 
1573
    @Override
1574
    public boolean equals(Object that) {
1575
      if (that == null)
1576
        return false;
1577
      if (that instanceof reloadProperties_args)
1578
        return this.equals((reloadProperties_args)that);
1579
      return false;
1580
    }
1581
 
1582
    public boolean equals(reloadProperties_args that) {
1583
      if (that == null)
1584
        return false;
1585
 
1586
      return true;
1587
    }
1588
 
1589
    @Override
1590
    public int hashCode() {
1591
      return 0;
1592
    }
1593
 
1594
    public int compareTo(reloadProperties_args other) {
1595
      if (!getClass().equals(other.getClass())) {
1596
        return getClass().getName().compareTo(other.getClass().getName());
1597
      }
1598
 
1599
      int lastComparison = 0;
1600
      reloadProperties_args typedOther = (reloadProperties_args)other;
1601
 
1602
      return 0;
1603
    }
1604
 
1605
    public void read(TProtocol iprot) throws TException {
1606
      TField field;
1607
      iprot.readStructBegin();
1608
      while (true)
1609
      {
1610
        field = iprot.readFieldBegin();
1611
        if (field.type == TType.STOP) { 
1612
          break;
1613
        }
1614
        _Fields fieldId = _Fields.findByThriftId(field.id);
1615
        if (fieldId == null) {
1616
          TProtocolUtil.skip(iprot, field.type);
1617
        } else {
1618
          switch (fieldId) {
1619
          }
1620
          iprot.readFieldEnd();
1621
        }
1622
      }
1623
      iprot.readStructEnd();
1624
      validate();
1625
    }
1626
 
1627
    public void write(TProtocol oprot) throws TException {
1628
      validate();
1629
 
1630
      oprot.writeStructBegin(STRUCT_DESC);
1631
      oprot.writeFieldStop();
1632
      oprot.writeStructEnd();
1633
    }
1634
 
1635
    @Override
1636
    public String toString() {
1637
      StringBuilder sb = new StringBuilder("reloadProperties_args(");
1638
      boolean first = true;
1639
 
1640
      sb.append(")");
1641
      return sb.toString();
1642
    }
1643
 
1644
    public void validate() throws TException {
1645
      // check for required fields
1646
    }
1647
 
1648
  }
1649
 
1650
  public static class reloadProperties_result implements TBase<reloadProperties_result._Fields>, java.io.Serializable, Cloneable, Comparable<reloadProperties_result>   {
1651
    private static final TStruct STRUCT_DESC = new TStruct("reloadProperties_result");
1652
 
1653
 
1654
 
1655
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1656
    public enum _Fields implements TFieldIdEnum {
1657
;
1658
 
1659
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1660
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1661
 
1662
      static {
1663
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1664
          byId.put((int)field._thriftId, field);
1665
          byName.put(field.getFieldName(), field);
1666
        }
1667
      }
1668
 
1669
      /**
1670
       * Find the _Fields constant that matches fieldId, or null if its not found.
1671
       */
1672
      public static _Fields findByThriftId(int fieldId) {
1673
        return byId.get(fieldId);
1674
      }
1675
 
1676
      /**
1677
       * Find the _Fields constant that matches fieldId, throwing an exception
1678
       * if it is not found.
1679
       */
1680
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1681
        _Fields fields = findByThriftId(fieldId);
1682
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1683
        return fields;
1684
      }
1685
 
1686
      /**
1687
       * Find the _Fields constant that matches name, or null if its not found.
1688
       */
1689
      public static _Fields findByName(String name) {
1690
        return byName.get(name);
1691
      }
1692
 
1693
      private final short _thriftId;
1694
      private final String _fieldName;
1695
 
1696
      _Fields(short thriftId, String fieldName) {
1697
        _thriftId = thriftId;
1698
        _fieldName = fieldName;
1699
      }
1700
 
1701
      public short getThriftFieldId() {
1702
        return _thriftId;
1703
      }
1704
 
1705
      public String getFieldName() {
1706
        return _fieldName;
1707
      }
1708
    }
1709
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1710
    }});
1711
 
1712
    static {
1713
      FieldMetaData.addStructMetaDataMap(reloadProperties_result.class, metaDataMap);
1714
    }
1715
 
1716
    public reloadProperties_result() {
1717
    }
1718
 
1719
    /**
1720
     * Performs a deep copy on <i>other</i>.
1721
     */
1722
    public reloadProperties_result(reloadProperties_result other) {
1723
    }
1724
 
1725
    public reloadProperties_result deepCopy() {
1726
      return new reloadProperties_result(this);
1727
    }
1728
 
1729
    @Deprecated
1730
    public reloadProperties_result clone() {
1731
      return new reloadProperties_result(this);
1732
    }
1733
 
1734
    public void setFieldValue(_Fields field, Object value) {
1735
      switch (field) {
1736
      }
1737
    }
1738
 
1739
    public void setFieldValue(int fieldID, Object value) {
1740
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1741
    }
1742
 
1743
    public Object getFieldValue(_Fields field) {
1744
      switch (field) {
1745
      }
1746
      throw new IllegalStateException();
1747
    }
1748
 
1749
    public Object getFieldValue(int fieldId) {
1750
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1751
    }
1752
 
1753
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1754
    public boolean isSet(_Fields field) {
1755
      switch (field) {
1756
      }
1757
      throw new IllegalStateException();
1758
    }
1759
 
1760
    public boolean isSet(int fieldID) {
1761
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1762
    }
1763
 
1764
    @Override
1765
    public boolean equals(Object that) {
1766
      if (that == null)
1767
        return false;
1768
      if (that instanceof reloadProperties_result)
1769
        return this.equals((reloadProperties_result)that);
1770
      return false;
1771
    }
1772
 
1773
    public boolean equals(reloadProperties_result that) {
1774
      if (that == null)
1775
        return false;
1776
 
1777
      return true;
1778
    }
1779
 
1780
    @Override
1781
    public int hashCode() {
1782
      return 0;
1783
    }
1784
 
1785
    public int compareTo(reloadProperties_result other) {
1786
      if (!getClass().equals(other.getClass())) {
1787
        return getClass().getName().compareTo(other.getClass().getName());
1788
      }
1789
 
1790
      int lastComparison = 0;
1791
      reloadProperties_result typedOther = (reloadProperties_result)other;
1792
 
1793
      return 0;
1794
    }
1795
 
1796
    public void read(TProtocol iprot) throws TException {
1797
      TField field;
1798
      iprot.readStructBegin();
1799
      while (true)
1800
      {
1801
        field = iprot.readFieldBegin();
1802
        if (field.type == TType.STOP) { 
1803
          break;
1804
        }
1805
        _Fields fieldId = _Fields.findByThriftId(field.id);
1806
        if (fieldId == null) {
1807
          TProtocolUtil.skip(iprot, field.type);
1808
        } else {
1809
          switch (fieldId) {
1810
          }
1811
          iprot.readFieldEnd();
1812
        }
1813
      }
1814
      iprot.readStructEnd();
1815
      validate();
1816
    }
1817
 
1818
    public void write(TProtocol oprot) throws TException {
1819
      oprot.writeStructBegin(STRUCT_DESC);
1820
 
1821
      oprot.writeFieldStop();
1822
      oprot.writeStructEnd();
1823
    }
1824
 
1825
    @Override
1826
    public String toString() {
1827
      StringBuilder sb = new StringBuilder("reloadProperties_result(");
1828
      boolean first = true;
1829
 
1830
      sb.append(")");
1831
      return sb.toString();
1832
    }
1833
 
1834
    public void validate() throws TException {
1835
      // check for required fields
1836
    }
1837
 
1838
  }
1839
 
48 ashish 1840
}