Subversion Repositories SmartDukaan

Rev

Rev 48 | Rev 2926 | 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
 
34
  }
35
 
36
  public static class Client implements Iface {
37
    public Client(TProtocol prot)
38
    {
39
      this(prot, prot);
40
    }
41
 
42
    public Client(TProtocol iprot, TProtocol oprot)
43
    {
44
      iprot_ = iprot;
45
      oprot_ = oprot;
46
    }
47
 
48
    protected TProtocol iprot_;
49
    protected TProtocol oprot_;
50
 
51
    protected int seqid_;
52
 
53
    public TProtocol getInputProtocol()
54
    {
55
      return this.iprot_;
56
    }
57
 
58
    public TProtocol getOutputProtocol()
59
    {
60
      return this.oprot_;
61
    }
62
 
63
    public String getPropetry(String propertyName) throws ConfigException, TException
64
    {
65
      send_getPropetry(propertyName);
66
      return recv_getPropetry();
67
    }
68
 
69
    public void send_getPropetry(String propertyName) throws TException
70
    {
71
      oprot_.writeMessageBegin(new TMessage("getPropetry", TMessageType.CALL, seqid_));
72
      getPropetry_args args = new getPropetry_args();
73
      args.propertyName = propertyName;
74
      args.write(oprot_);
75
      oprot_.writeMessageEnd();
76
      oprot_.getTransport().flush();
77
    }
78
 
79
    public String recv_getPropetry() throws ConfigException, TException
80
    {
81
      TMessage msg = iprot_.readMessageBegin();
82
      if (msg.type == TMessageType.EXCEPTION) {
83
        TApplicationException x = TApplicationException.read(iprot_);
84
        iprot_.readMessageEnd();
85
        throw x;
86
      }
87
      getPropetry_result result = new getPropetry_result();
88
      result.read(iprot_);
89
      iprot_.readMessageEnd();
90
      if (result.isSetSuccess()) {
91
        return result.success;
92
      }
93
      if (result.e != null) {
94
        throw result.e;
95
      }
96
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPropetry failed: unknown result");
97
    }
98
 
99
    public void loadProperty(String propertyName, String propertyValue) throws TException
100
    {
101
      send_loadProperty(propertyName, propertyValue);
102
      recv_loadProperty();
103
    }
104
 
105
    public void send_loadProperty(String propertyName, String propertyValue) throws TException
106
    {
107
      oprot_.writeMessageBegin(new TMessage("loadProperty", TMessageType.CALL, seqid_));
108
      loadProperty_args args = new loadProperty_args();
109
      args.propertyName = propertyName;
110
      args.propertyValue = propertyValue;
111
      args.write(oprot_);
112
      oprot_.writeMessageEnd();
113
      oprot_.getTransport().flush();
114
    }
115
 
116
    public void recv_loadProperty() throws TException
117
    {
118
      TMessage msg = iprot_.readMessageBegin();
119
      if (msg.type == TMessageType.EXCEPTION) {
120
        TApplicationException x = TApplicationException.read(iprot_);
121
        iprot_.readMessageEnd();
122
        throw x;
123
      }
124
      loadProperty_result result = new loadProperty_result();
125
      result.read(iprot_);
126
      iprot_.readMessageEnd();
127
      return;
128
    }
129
 
130
  }
131
  public static class Processor implements TProcessor {
132
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
133
    public Processor(Iface iface)
134
    {
135
      iface_ = iface;
136
      processMap_.put("getPropetry", new getPropetry());
137
      processMap_.put("loadProperty", new loadProperty());
138
    }
139
 
140
    protected static interface ProcessFunction {
141
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
142
    }
143
 
144
    private Iface iface_;
145
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
146
 
147
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
148
    {
149
      TMessage msg = iprot.readMessageBegin();
150
      ProcessFunction fn = processMap_.get(msg.name);
151
      if (fn == null) {
152
        TProtocolUtil.skip(iprot, TType.STRUCT);
153
        iprot.readMessageEnd();
154
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
155
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
156
        x.write(oprot);
157
        oprot.writeMessageEnd();
158
        oprot.getTransport().flush();
159
        return true;
160
      }
161
      fn.process(msg.seqid, iprot, oprot);
162
      return true;
163
    }
164
 
165
    private class getPropetry implements ProcessFunction {
166
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
167
      {
168
        getPropetry_args args = new getPropetry_args();
169
        args.read(iprot);
170
        iprot.readMessageEnd();
171
        getPropetry_result result = new getPropetry_result();
172
        try {
173
          result.success = iface_.getPropetry(args.propertyName);
174
        } catch (ConfigException e) {
175
          result.e = e;
176
        } catch (Throwable th) {
177
          LOGGER.error("Internal error processing getPropetry", th);
178
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPropetry");
179
          oprot.writeMessageBegin(new TMessage("getPropetry", TMessageType.EXCEPTION, seqid));
180
          x.write(oprot);
181
          oprot.writeMessageEnd();
182
          oprot.getTransport().flush();
183
          return;
184
        }
185
        oprot.writeMessageBegin(new TMessage("getPropetry", TMessageType.REPLY, seqid));
186
        result.write(oprot);
187
        oprot.writeMessageEnd();
188
        oprot.getTransport().flush();
189
      }
190
 
191
    }
192
 
193
    private class loadProperty implements ProcessFunction {
194
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
195
      {
196
        loadProperty_args args = new loadProperty_args();
197
        args.read(iprot);
198
        iprot.readMessageEnd();
199
        loadProperty_result result = new loadProperty_result();
200
        iface_.loadProperty(args.propertyName, args.propertyValue);
201
        oprot.writeMessageBegin(new TMessage("loadProperty", TMessageType.REPLY, seqid));
202
        result.write(oprot);
203
        oprot.writeMessageEnd();
204
        oprot.getTransport().flush();
205
      }
206
 
207
    }
208
 
209
  }
210
 
211
  public static class getPropetry_args implements TBase<getPropetry_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPropetry_args>   {
212
    private static final TStruct STRUCT_DESC = new TStruct("getPropetry_args");
213
 
214
    private static final TField PROPERTY_NAME_FIELD_DESC = new TField("propertyName", TType.STRING, (short)1);
215
 
216
    private String propertyName;
217
 
218
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
219
    public enum _Fields implements TFieldIdEnum {
220
      PROPERTY_NAME((short)1, "propertyName");
221
 
222
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
223
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
224
 
225
      static {
226
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
227
          byId.put((int)field._thriftId, field);
228
          byName.put(field.getFieldName(), field);
229
        }
230
      }
231
 
232
      /**
233
       * Find the _Fields constant that matches fieldId, or null if its not found.
234
       */
235
      public static _Fields findByThriftId(int fieldId) {
236
        return byId.get(fieldId);
237
      }
238
 
239
      /**
240
       * Find the _Fields constant that matches fieldId, throwing an exception
241
       * if it is not found.
242
       */
243
      public static _Fields findByThriftIdOrThrow(int fieldId) {
244
        _Fields fields = findByThriftId(fieldId);
245
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
246
        return fields;
247
      }
248
 
249
      /**
250
       * Find the _Fields constant that matches name, or null if its not found.
251
       */
252
      public static _Fields findByName(String name) {
253
        return byName.get(name);
254
      }
255
 
256
      private final short _thriftId;
257
      private final String _fieldName;
258
 
259
      _Fields(short thriftId, String fieldName) {
260
        _thriftId = thriftId;
261
        _fieldName = fieldName;
262
      }
263
 
264
      public short getThriftFieldId() {
265
        return _thriftId;
266
      }
267
 
268
      public String getFieldName() {
269
        return _fieldName;
270
      }
271
    }
272
 
273
    // isset id assignments
274
 
275
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
276
      put(_Fields.PROPERTY_NAME, new FieldMetaData("propertyName", TFieldRequirementType.DEFAULT, 
277
          new FieldValueMetaData(TType.STRING)));
278
    }});
279
 
280
    static {
281
      FieldMetaData.addStructMetaDataMap(getPropetry_args.class, metaDataMap);
282
    }
283
 
284
    public getPropetry_args() {
285
    }
286
 
287
    public getPropetry_args(
288
      String propertyName)
289
    {
290
      this();
291
      this.propertyName = propertyName;
292
    }
293
 
294
    /**
295
     * Performs a deep copy on <i>other</i>.
296
     */
297
    public getPropetry_args(getPropetry_args other) {
298
      if (other.isSetPropertyName()) {
299
        this.propertyName = other.propertyName;
300
      }
301
    }
302
 
303
    public getPropetry_args deepCopy() {
304
      return new getPropetry_args(this);
305
    }
306
 
307
    @Deprecated
308
    public getPropetry_args clone() {
309
      return new getPropetry_args(this);
310
    }
311
 
312
    public String getPropertyName() {
313
      return this.propertyName;
314
    }
315
 
316
    public getPropetry_args setPropertyName(String propertyName) {
317
      this.propertyName = propertyName;
318
      return this;
319
    }
320
 
321
    public void unsetPropertyName() {
322
      this.propertyName = null;
323
    }
324
 
325
    /** Returns true if field propertyName is set (has been asigned a value) and false otherwise */
326
    public boolean isSetPropertyName() {
327
      return this.propertyName != null;
328
    }
329
 
330
    public void setPropertyNameIsSet(boolean value) {
331
      if (!value) {
332
        this.propertyName = null;
333
      }
334
    }
335
 
336
    public void setFieldValue(_Fields field, Object value) {
337
      switch (field) {
338
      case PROPERTY_NAME:
339
        if (value == null) {
340
          unsetPropertyName();
341
        } else {
342
          setPropertyName((String)value);
343
        }
344
        break;
345
 
346
      }
347
    }
348
 
349
    public void setFieldValue(int fieldID, Object value) {
350
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
351
    }
352
 
353
    public Object getFieldValue(_Fields field) {
354
      switch (field) {
355
      case PROPERTY_NAME:
356
        return getPropertyName();
357
 
358
      }
359
      throw new IllegalStateException();
360
    }
361
 
362
    public Object getFieldValue(int fieldId) {
363
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
364
    }
365
 
366
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
367
    public boolean isSet(_Fields field) {
368
      switch (field) {
369
      case PROPERTY_NAME:
370
        return isSetPropertyName();
371
      }
372
      throw new IllegalStateException();
373
    }
374
 
375
    public boolean isSet(int fieldID) {
376
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
377
    }
378
 
379
    @Override
380
    public boolean equals(Object that) {
381
      if (that == null)
382
        return false;
383
      if (that instanceof getPropetry_args)
384
        return this.equals((getPropetry_args)that);
385
      return false;
386
    }
387
 
388
    public boolean equals(getPropetry_args that) {
389
      if (that == null)
390
        return false;
391
 
392
      boolean this_present_propertyName = true && this.isSetPropertyName();
393
      boolean that_present_propertyName = true && that.isSetPropertyName();
394
      if (this_present_propertyName || that_present_propertyName) {
395
        if (!(this_present_propertyName && that_present_propertyName))
396
          return false;
397
        if (!this.propertyName.equals(that.propertyName))
398
          return false;
399
      }
400
 
401
      return true;
402
    }
403
 
404
    @Override
405
    public int hashCode() {
406
      return 0;
407
    }
408
 
409
    public int compareTo(getPropetry_args other) {
410
      if (!getClass().equals(other.getClass())) {
411
        return getClass().getName().compareTo(other.getClass().getName());
412
      }
413
 
414
      int lastComparison = 0;
415
      getPropetry_args typedOther = (getPropetry_args)other;
416
 
417
      lastComparison = Boolean.valueOf(isSetPropertyName()).compareTo(isSetPropertyName());
418
      if (lastComparison != 0) {
419
        return lastComparison;
420
      }
421
      lastComparison = TBaseHelper.compareTo(propertyName, typedOther.propertyName);
422
      if (lastComparison != 0) {
423
        return lastComparison;
424
      }
425
      return 0;
426
    }
427
 
428
    public void read(TProtocol iprot) throws TException {
429
      TField field;
430
      iprot.readStructBegin();
431
      while (true)
432
      {
433
        field = iprot.readFieldBegin();
434
        if (field.type == TType.STOP) { 
435
          break;
436
        }
437
        _Fields fieldId = _Fields.findByThriftId(field.id);
438
        if (fieldId == null) {
439
          TProtocolUtil.skip(iprot, field.type);
440
        } else {
441
          switch (fieldId) {
442
            case PROPERTY_NAME:
443
              if (field.type == TType.STRING) {
444
                this.propertyName = iprot.readString();
445
              } else { 
446
                TProtocolUtil.skip(iprot, field.type);
447
              }
448
              break;
449
          }
450
          iprot.readFieldEnd();
451
        }
452
      }
453
      iprot.readStructEnd();
454
      validate();
455
    }
456
 
457
    public void write(TProtocol oprot) throws TException {
458
      validate();
459
 
460
      oprot.writeStructBegin(STRUCT_DESC);
461
      if (this.propertyName != null) {
462
        oprot.writeFieldBegin(PROPERTY_NAME_FIELD_DESC);
463
        oprot.writeString(this.propertyName);
464
        oprot.writeFieldEnd();
465
      }
466
      oprot.writeFieldStop();
467
      oprot.writeStructEnd();
468
    }
469
 
470
    @Override
471
    public String toString() {
472
      StringBuilder sb = new StringBuilder("getPropetry_args(");
473
      boolean first = true;
474
 
475
      sb.append("propertyName:");
476
      if (this.propertyName == null) {
477
        sb.append("null");
478
      } else {
479
        sb.append(this.propertyName);
480
      }
481
      first = false;
482
      sb.append(")");
483
      return sb.toString();
484
    }
485
 
486
    public void validate() throws TException {
487
      // check for required fields
488
    }
489
 
490
  }
491
 
492
  public static class getPropetry_result implements TBase<getPropetry_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPropetry_result>   {
493
    private static final TStruct STRUCT_DESC = new TStruct("getPropetry_result");
494
 
495
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
496
    private static final TField E_FIELD_DESC = new TField("e", TType.STRUCT, (short)1);
497
 
498
    private String success;
499
    private ConfigException e;
500
 
501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
502
    public enum _Fields implements TFieldIdEnum {
503
      SUCCESS((short)0, "success"),
504
      E((short)1, "e");
505
 
506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
508
 
509
      static {
510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
511
          byId.put((int)field._thriftId, field);
512
          byName.put(field.getFieldName(), field);
513
        }
514
      }
515
 
516
      /**
517
       * Find the _Fields constant that matches fieldId, or null if its not found.
518
       */
519
      public static _Fields findByThriftId(int fieldId) {
520
        return byId.get(fieldId);
521
      }
522
 
523
      /**
524
       * Find the _Fields constant that matches fieldId, throwing an exception
525
       * if it is not found.
526
       */
527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
528
        _Fields fields = findByThriftId(fieldId);
529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
530
        return fields;
531
      }
532
 
533
      /**
534
       * Find the _Fields constant that matches name, or null if its not found.
535
       */
536
      public static _Fields findByName(String name) {
537
        return byName.get(name);
538
      }
539
 
540
      private final short _thriftId;
541
      private final String _fieldName;
542
 
543
      _Fields(short thriftId, String fieldName) {
544
        _thriftId = thriftId;
545
        _fieldName = fieldName;
546
      }
547
 
548
      public short getThriftFieldId() {
549
        return _thriftId;
550
      }
551
 
552
      public String getFieldName() {
553
        return _fieldName;
554
      }
555
    }
556
 
557
    // isset id assignments
558
 
559
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
560
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
561
          new FieldValueMetaData(TType.STRING)));
562
      put(_Fields.E, new FieldMetaData("e", TFieldRequirementType.DEFAULT, 
563
          new FieldValueMetaData(TType.STRUCT)));
564
    }});
565
 
566
    static {
567
      FieldMetaData.addStructMetaDataMap(getPropetry_result.class, metaDataMap);
568
    }
569
 
570
    public getPropetry_result() {
571
    }
572
 
573
    public getPropetry_result(
574
      String success,
575
      ConfigException e)
576
    {
577
      this();
578
      this.success = success;
579
      this.e = e;
580
    }
581
 
582
    /**
583
     * Performs a deep copy on <i>other</i>.
584
     */
585
    public getPropetry_result(getPropetry_result other) {
586
      if (other.isSetSuccess()) {
587
        this.success = other.success;
588
      }
589
      if (other.isSetE()) {
590
        this.e = new ConfigException(other.e);
591
      }
592
    }
593
 
594
    public getPropetry_result deepCopy() {
595
      return new getPropetry_result(this);
596
    }
597
 
598
    @Deprecated
599
    public getPropetry_result clone() {
600
      return new getPropetry_result(this);
601
    }
602
 
603
    public String getSuccess() {
604
      return this.success;
605
    }
606
 
607
    public getPropetry_result setSuccess(String success) {
608
      this.success = success;
609
      return this;
610
    }
611
 
612
    public void unsetSuccess() {
613
      this.success = null;
614
    }
615
 
616
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
617
    public boolean isSetSuccess() {
618
      return this.success != null;
619
    }
620
 
621
    public void setSuccessIsSet(boolean value) {
622
      if (!value) {
623
        this.success = null;
624
      }
625
    }
626
 
627
    public ConfigException getE() {
628
      return this.e;
629
    }
630
 
631
    public getPropetry_result setE(ConfigException e) {
632
      this.e = e;
633
      return this;
634
    }
635
 
636
    public void unsetE() {
637
      this.e = null;
638
    }
639
 
640
    /** Returns true if field e is set (has been asigned a value) and false otherwise */
641
    public boolean isSetE() {
642
      return this.e != null;
643
    }
644
 
645
    public void setEIsSet(boolean value) {
646
      if (!value) {
647
        this.e = null;
648
      }
649
    }
650
 
651
    public void setFieldValue(_Fields field, Object value) {
652
      switch (field) {
653
      case SUCCESS:
654
        if (value == null) {
655
          unsetSuccess();
656
        } else {
657
          setSuccess((String)value);
658
        }
659
        break;
660
 
661
      case E:
662
        if (value == null) {
663
          unsetE();
664
        } else {
665
          setE((ConfigException)value);
666
        }
667
        break;
668
 
669
      }
670
    }
671
 
672
    public void setFieldValue(int fieldID, Object value) {
673
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
674
    }
675
 
676
    public Object getFieldValue(_Fields field) {
677
      switch (field) {
678
      case SUCCESS:
679
        return getSuccess();
680
 
681
      case E:
682
        return getE();
683
 
684
      }
685
      throw new IllegalStateException();
686
    }
687
 
688
    public Object getFieldValue(int fieldId) {
689
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
690
    }
691
 
692
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
693
    public boolean isSet(_Fields field) {
694
      switch (field) {
695
      case SUCCESS:
696
        return isSetSuccess();
697
      case E:
698
        return isSetE();
699
      }
700
      throw new IllegalStateException();
701
    }
702
 
703
    public boolean isSet(int fieldID) {
704
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
705
    }
706
 
707
    @Override
708
    public boolean equals(Object that) {
709
      if (that == null)
710
        return false;
711
      if (that instanceof getPropetry_result)
712
        return this.equals((getPropetry_result)that);
713
      return false;
714
    }
715
 
716
    public boolean equals(getPropetry_result that) {
717
      if (that == null)
718
        return false;
719
 
720
      boolean this_present_success = true && this.isSetSuccess();
721
      boolean that_present_success = true && that.isSetSuccess();
722
      if (this_present_success || that_present_success) {
723
        if (!(this_present_success && that_present_success))
724
          return false;
725
        if (!this.success.equals(that.success))
726
          return false;
727
      }
728
 
729
      boolean this_present_e = true && this.isSetE();
730
      boolean that_present_e = true && that.isSetE();
731
      if (this_present_e || that_present_e) {
732
        if (!(this_present_e && that_present_e))
733
          return false;
734
        if (!this.e.equals(that.e))
735
          return false;
736
      }
737
 
738
      return true;
739
    }
740
 
741
    @Override
742
    public int hashCode() {
743
      return 0;
744
    }
745
 
746
    public int compareTo(getPropetry_result other) {
747
      if (!getClass().equals(other.getClass())) {
748
        return getClass().getName().compareTo(other.getClass().getName());
749
      }
750
 
751
      int lastComparison = 0;
752
      getPropetry_result typedOther = (getPropetry_result)other;
753
 
754
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
755
      if (lastComparison != 0) {
756
        return lastComparison;
757
      }
758
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
759
      if (lastComparison != 0) {
760
        return lastComparison;
761
      }
762
      lastComparison = Boolean.valueOf(isSetE()).compareTo(isSetE());
763
      if (lastComparison != 0) {
764
        return lastComparison;
765
      }
766
      lastComparison = TBaseHelper.compareTo(e, typedOther.e);
767
      if (lastComparison != 0) {
768
        return lastComparison;
769
      }
770
      return 0;
771
    }
772
 
773
    public void read(TProtocol iprot) throws TException {
774
      TField field;
775
      iprot.readStructBegin();
776
      while (true)
777
      {
778
        field = iprot.readFieldBegin();
779
        if (field.type == TType.STOP) { 
780
          break;
781
        }
782
        _Fields fieldId = _Fields.findByThriftId(field.id);
783
        if (fieldId == null) {
784
          TProtocolUtil.skip(iprot, field.type);
785
        } else {
786
          switch (fieldId) {
787
            case SUCCESS:
788
              if (field.type == TType.STRING) {
789
                this.success = iprot.readString();
790
              } else { 
791
                TProtocolUtil.skip(iprot, field.type);
792
              }
793
              break;
794
            case E:
795
              if (field.type == TType.STRUCT) {
796
                this.e = new ConfigException();
797
                this.e.read(iprot);
798
              } else { 
799
                TProtocolUtil.skip(iprot, field.type);
800
              }
801
              break;
802
          }
803
          iprot.readFieldEnd();
804
        }
805
      }
806
      iprot.readStructEnd();
807
      validate();
808
    }
809
 
810
    public void write(TProtocol oprot) throws TException {
811
      oprot.writeStructBegin(STRUCT_DESC);
812
 
813
      if (this.isSetSuccess()) {
814
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
815
        oprot.writeString(this.success);
816
        oprot.writeFieldEnd();
817
      } else if (this.isSetE()) {
818
        oprot.writeFieldBegin(E_FIELD_DESC);
819
        this.e.write(oprot);
820
        oprot.writeFieldEnd();
821
      }
822
      oprot.writeFieldStop();
823
      oprot.writeStructEnd();
824
    }
825
 
826
    @Override
827
    public String toString() {
828
      StringBuilder sb = new StringBuilder("getPropetry_result(");
829
      boolean first = true;
830
 
831
      sb.append("success:");
832
      if (this.success == null) {
833
        sb.append("null");
834
      } else {
835
        sb.append(this.success);
836
      }
837
      first = false;
838
      if (!first) sb.append(", ");
839
      sb.append("e:");
840
      if (this.e == null) {
841
        sb.append("null");
842
      } else {
843
        sb.append(this.e);
844
      }
845
      first = false;
846
      sb.append(")");
847
      return sb.toString();
848
    }
849
 
850
    public void validate() throws TException {
851
      // check for required fields
852
    }
853
 
854
  }
855
 
856
  public static class loadProperty_args implements TBase<loadProperty_args._Fields>, java.io.Serializable, Cloneable, Comparable<loadProperty_args>   {
857
    private static final TStruct STRUCT_DESC = new TStruct("loadProperty_args");
858
 
859
    private static final TField PROPERTY_NAME_FIELD_DESC = new TField("propertyName", TType.STRING, (short)1);
860
    private static final TField PROPERTY_VALUE_FIELD_DESC = new TField("propertyValue", TType.STRING, (short)2);
861
 
862
    private String propertyName;
863
    private String propertyValue;
864
 
865
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
866
    public enum _Fields implements TFieldIdEnum {
867
      PROPERTY_NAME((short)1, "propertyName"),
868
      PROPERTY_VALUE((short)2, "propertyValue");
869
 
870
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
871
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
872
 
873
      static {
874
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
875
          byId.put((int)field._thriftId, field);
876
          byName.put(field.getFieldName(), field);
877
        }
878
      }
879
 
880
      /**
881
       * Find the _Fields constant that matches fieldId, or null if its not found.
882
       */
883
      public static _Fields findByThriftId(int fieldId) {
884
        return byId.get(fieldId);
885
      }
886
 
887
      /**
888
       * Find the _Fields constant that matches fieldId, throwing an exception
889
       * if it is not found.
890
       */
891
      public static _Fields findByThriftIdOrThrow(int fieldId) {
892
        _Fields fields = findByThriftId(fieldId);
893
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
894
        return fields;
895
      }
896
 
897
      /**
898
       * Find the _Fields constant that matches name, or null if its not found.
899
       */
900
      public static _Fields findByName(String name) {
901
        return byName.get(name);
902
      }
903
 
904
      private final short _thriftId;
905
      private final String _fieldName;
906
 
907
      _Fields(short thriftId, String fieldName) {
908
        _thriftId = thriftId;
909
        _fieldName = fieldName;
910
      }
911
 
912
      public short getThriftFieldId() {
913
        return _thriftId;
914
      }
915
 
916
      public String getFieldName() {
917
        return _fieldName;
918
      }
919
    }
920
 
921
    // isset id assignments
922
 
923
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
924
      put(_Fields.PROPERTY_NAME, new FieldMetaData("propertyName", TFieldRequirementType.DEFAULT, 
925
          new FieldValueMetaData(TType.STRING)));
926
      put(_Fields.PROPERTY_VALUE, new FieldMetaData("propertyValue", TFieldRequirementType.DEFAULT, 
927
          new FieldValueMetaData(TType.STRING)));
928
    }});
929
 
930
    static {
931
      FieldMetaData.addStructMetaDataMap(loadProperty_args.class, metaDataMap);
932
    }
933
 
934
    public loadProperty_args() {
935
    }
936
 
937
    public loadProperty_args(
938
      String propertyName,
939
      String propertyValue)
940
    {
941
      this();
942
      this.propertyName = propertyName;
943
      this.propertyValue = propertyValue;
944
    }
945
 
946
    /**
947
     * Performs a deep copy on <i>other</i>.
948
     */
949
    public loadProperty_args(loadProperty_args other) {
950
      if (other.isSetPropertyName()) {
951
        this.propertyName = other.propertyName;
952
      }
953
      if (other.isSetPropertyValue()) {
954
        this.propertyValue = other.propertyValue;
955
      }
956
    }
957
 
958
    public loadProperty_args deepCopy() {
959
      return new loadProperty_args(this);
960
    }
961
 
962
    @Deprecated
963
    public loadProperty_args clone() {
964
      return new loadProperty_args(this);
965
    }
966
 
967
    public String getPropertyName() {
968
      return this.propertyName;
969
    }
970
 
971
    public loadProperty_args setPropertyName(String propertyName) {
972
      this.propertyName = propertyName;
973
      return this;
974
    }
975
 
976
    public void unsetPropertyName() {
977
      this.propertyName = null;
978
    }
979
 
980
    /** Returns true if field propertyName is set (has been asigned a value) and false otherwise */
981
    public boolean isSetPropertyName() {
982
      return this.propertyName != null;
983
    }
984
 
985
    public void setPropertyNameIsSet(boolean value) {
986
      if (!value) {
987
        this.propertyName = null;
988
      }
989
    }
990
 
991
    public String getPropertyValue() {
992
      return this.propertyValue;
993
    }
994
 
995
    public loadProperty_args setPropertyValue(String propertyValue) {
996
      this.propertyValue = propertyValue;
997
      return this;
998
    }
999
 
1000
    public void unsetPropertyValue() {
1001
      this.propertyValue = null;
1002
    }
1003
 
1004
    /** Returns true if field propertyValue is set (has been asigned a value) and false otherwise */
1005
    public boolean isSetPropertyValue() {
1006
      return this.propertyValue != null;
1007
    }
1008
 
1009
    public void setPropertyValueIsSet(boolean value) {
1010
      if (!value) {
1011
        this.propertyValue = null;
1012
      }
1013
    }
1014
 
1015
    public void setFieldValue(_Fields field, Object value) {
1016
      switch (field) {
1017
      case PROPERTY_NAME:
1018
        if (value == null) {
1019
          unsetPropertyName();
1020
        } else {
1021
          setPropertyName((String)value);
1022
        }
1023
        break;
1024
 
1025
      case PROPERTY_VALUE:
1026
        if (value == null) {
1027
          unsetPropertyValue();
1028
        } else {
1029
          setPropertyValue((String)value);
1030
        }
1031
        break;
1032
 
1033
      }
1034
    }
1035
 
1036
    public void setFieldValue(int fieldID, Object value) {
1037
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1038
    }
1039
 
1040
    public Object getFieldValue(_Fields field) {
1041
      switch (field) {
1042
      case PROPERTY_NAME:
1043
        return getPropertyName();
1044
 
1045
      case PROPERTY_VALUE:
1046
        return getPropertyValue();
1047
 
1048
      }
1049
      throw new IllegalStateException();
1050
    }
1051
 
1052
    public Object getFieldValue(int fieldId) {
1053
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1054
    }
1055
 
1056
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1057
    public boolean isSet(_Fields field) {
1058
      switch (field) {
1059
      case PROPERTY_NAME:
1060
        return isSetPropertyName();
1061
      case PROPERTY_VALUE:
1062
        return isSetPropertyValue();
1063
      }
1064
      throw new IllegalStateException();
1065
    }
1066
 
1067
    public boolean isSet(int fieldID) {
1068
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1069
    }
1070
 
1071
    @Override
1072
    public boolean equals(Object that) {
1073
      if (that == null)
1074
        return false;
1075
      if (that instanceof loadProperty_args)
1076
        return this.equals((loadProperty_args)that);
1077
      return false;
1078
    }
1079
 
1080
    public boolean equals(loadProperty_args that) {
1081
      if (that == null)
1082
        return false;
1083
 
1084
      boolean this_present_propertyName = true && this.isSetPropertyName();
1085
      boolean that_present_propertyName = true && that.isSetPropertyName();
1086
      if (this_present_propertyName || that_present_propertyName) {
1087
        if (!(this_present_propertyName && that_present_propertyName))
1088
          return false;
1089
        if (!this.propertyName.equals(that.propertyName))
1090
          return false;
1091
      }
1092
 
1093
      boolean this_present_propertyValue = true && this.isSetPropertyValue();
1094
      boolean that_present_propertyValue = true && that.isSetPropertyValue();
1095
      if (this_present_propertyValue || that_present_propertyValue) {
1096
        if (!(this_present_propertyValue && that_present_propertyValue))
1097
          return false;
1098
        if (!this.propertyValue.equals(that.propertyValue))
1099
          return false;
1100
      }
1101
 
1102
      return true;
1103
    }
1104
 
1105
    @Override
1106
    public int hashCode() {
1107
      return 0;
1108
    }
1109
 
1110
    public int compareTo(loadProperty_args other) {
1111
      if (!getClass().equals(other.getClass())) {
1112
        return getClass().getName().compareTo(other.getClass().getName());
1113
      }
1114
 
1115
      int lastComparison = 0;
1116
      loadProperty_args typedOther = (loadProperty_args)other;
1117
 
1118
      lastComparison = Boolean.valueOf(isSetPropertyName()).compareTo(isSetPropertyName());
1119
      if (lastComparison != 0) {
1120
        return lastComparison;
1121
      }
1122
      lastComparison = TBaseHelper.compareTo(propertyName, typedOther.propertyName);
1123
      if (lastComparison != 0) {
1124
        return lastComparison;
1125
      }
1126
      lastComparison = Boolean.valueOf(isSetPropertyValue()).compareTo(isSetPropertyValue());
1127
      if (lastComparison != 0) {
1128
        return lastComparison;
1129
      }
1130
      lastComparison = TBaseHelper.compareTo(propertyValue, typedOther.propertyValue);
1131
      if (lastComparison != 0) {
1132
        return lastComparison;
1133
      }
1134
      return 0;
1135
    }
1136
 
1137
    public void read(TProtocol iprot) throws TException {
1138
      TField field;
1139
      iprot.readStructBegin();
1140
      while (true)
1141
      {
1142
        field = iprot.readFieldBegin();
1143
        if (field.type == TType.STOP) { 
1144
          break;
1145
        }
1146
        _Fields fieldId = _Fields.findByThriftId(field.id);
1147
        if (fieldId == null) {
1148
          TProtocolUtil.skip(iprot, field.type);
1149
        } else {
1150
          switch (fieldId) {
1151
            case PROPERTY_NAME:
1152
              if (field.type == TType.STRING) {
1153
                this.propertyName = iprot.readString();
1154
              } else { 
1155
                TProtocolUtil.skip(iprot, field.type);
1156
              }
1157
              break;
1158
            case PROPERTY_VALUE:
1159
              if (field.type == TType.STRING) {
1160
                this.propertyValue = iprot.readString();
1161
              } else { 
1162
                TProtocolUtil.skip(iprot, field.type);
1163
              }
1164
              break;
1165
          }
1166
          iprot.readFieldEnd();
1167
        }
1168
      }
1169
      iprot.readStructEnd();
1170
      validate();
1171
    }
1172
 
1173
    public void write(TProtocol oprot) throws TException {
1174
      validate();
1175
 
1176
      oprot.writeStructBegin(STRUCT_DESC);
1177
      if (this.propertyName != null) {
1178
        oprot.writeFieldBegin(PROPERTY_NAME_FIELD_DESC);
1179
        oprot.writeString(this.propertyName);
1180
        oprot.writeFieldEnd();
1181
      }
1182
      if (this.propertyValue != null) {
1183
        oprot.writeFieldBegin(PROPERTY_VALUE_FIELD_DESC);
1184
        oprot.writeString(this.propertyValue);
1185
        oprot.writeFieldEnd();
1186
      }
1187
      oprot.writeFieldStop();
1188
      oprot.writeStructEnd();
1189
    }
1190
 
1191
    @Override
1192
    public String toString() {
1193
      StringBuilder sb = new StringBuilder("loadProperty_args(");
1194
      boolean first = true;
1195
 
1196
      sb.append("propertyName:");
1197
      if (this.propertyName == null) {
1198
        sb.append("null");
1199
      } else {
1200
        sb.append(this.propertyName);
1201
      }
1202
      first = false;
1203
      if (!first) sb.append(", ");
1204
      sb.append("propertyValue:");
1205
      if (this.propertyValue == null) {
1206
        sb.append("null");
1207
      } else {
1208
        sb.append(this.propertyValue);
1209
      }
1210
      first = false;
1211
      sb.append(")");
1212
      return sb.toString();
1213
    }
1214
 
1215
    public void validate() throws TException {
1216
      // check for required fields
1217
    }
1218
 
1219
  }
1220
 
1221
  public static class loadProperty_result implements TBase<loadProperty_result._Fields>, java.io.Serializable, Cloneable, Comparable<loadProperty_result>   {
1222
    private static final TStruct STRUCT_DESC = new TStruct("loadProperty_result");
1223
 
1224
 
1225
 
1226
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1227
    public enum _Fields implements TFieldIdEnum {
1228
;
1229
 
1230
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1231
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1232
 
1233
      static {
1234
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1235
          byId.put((int)field._thriftId, field);
1236
          byName.put(field.getFieldName(), field);
1237
        }
1238
      }
1239
 
1240
      /**
1241
       * Find the _Fields constant that matches fieldId, or null if its not found.
1242
       */
1243
      public static _Fields findByThriftId(int fieldId) {
1244
        return byId.get(fieldId);
1245
      }
1246
 
1247
      /**
1248
       * Find the _Fields constant that matches fieldId, throwing an exception
1249
       * if it is not found.
1250
       */
1251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1252
        _Fields fields = findByThriftId(fieldId);
1253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1254
        return fields;
1255
      }
1256
 
1257
      /**
1258
       * Find the _Fields constant that matches name, or null if its not found.
1259
       */
1260
      public static _Fields findByName(String name) {
1261
        return byName.get(name);
1262
      }
1263
 
1264
      private final short _thriftId;
1265
      private final String _fieldName;
1266
 
1267
      _Fields(short thriftId, String fieldName) {
1268
        _thriftId = thriftId;
1269
        _fieldName = fieldName;
1270
      }
1271
 
1272
      public short getThriftFieldId() {
1273
        return _thriftId;
1274
      }
1275
 
1276
      public String getFieldName() {
1277
        return _fieldName;
1278
      }
1279
    }
1280
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1281
    }});
1282
 
1283
    static {
1284
      FieldMetaData.addStructMetaDataMap(loadProperty_result.class, metaDataMap);
1285
    }
1286
 
1287
    public loadProperty_result() {
1288
    }
1289
 
1290
    /**
1291
     * Performs a deep copy on <i>other</i>.
1292
     */
1293
    public loadProperty_result(loadProperty_result other) {
1294
    }
1295
 
1296
    public loadProperty_result deepCopy() {
1297
      return new loadProperty_result(this);
1298
    }
1299
 
1300
    @Deprecated
1301
    public loadProperty_result clone() {
1302
      return new loadProperty_result(this);
1303
    }
1304
 
1305
    public void setFieldValue(_Fields field, Object value) {
1306
      switch (field) {
1307
      }
1308
    }
1309
 
1310
    public void setFieldValue(int fieldID, Object value) {
1311
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1312
    }
1313
 
1314
    public Object getFieldValue(_Fields field) {
1315
      switch (field) {
1316
      }
1317
      throw new IllegalStateException();
1318
    }
1319
 
1320
    public Object getFieldValue(int fieldId) {
1321
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1322
    }
1323
 
1324
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1325
    public boolean isSet(_Fields field) {
1326
      switch (field) {
1327
      }
1328
      throw new IllegalStateException();
1329
    }
1330
 
1331
    public boolean isSet(int fieldID) {
1332
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1333
    }
1334
 
1335
    @Override
1336
    public boolean equals(Object that) {
1337
      if (that == null)
1338
        return false;
1339
      if (that instanceof loadProperty_result)
1340
        return this.equals((loadProperty_result)that);
1341
      return false;
1342
    }
1343
 
1344
    public boolean equals(loadProperty_result that) {
1345
      if (that == null)
1346
        return false;
1347
 
1348
      return true;
1349
    }
1350
 
1351
    @Override
1352
    public int hashCode() {
1353
      return 0;
1354
    }
1355
 
1356
    public int compareTo(loadProperty_result other) {
1357
      if (!getClass().equals(other.getClass())) {
1358
        return getClass().getName().compareTo(other.getClass().getName());
1359
      }
1360
 
1361
      int lastComparison = 0;
1362
      loadProperty_result typedOther = (loadProperty_result)other;
1363
 
1364
      return 0;
1365
    }
1366
 
1367
    public void read(TProtocol iprot) throws TException {
1368
      TField field;
1369
      iprot.readStructBegin();
1370
      while (true)
1371
      {
1372
        field = iprot.readFieldBegin();
1373
        if (field.type == TType.STOP) { 
1374
          break;
1375
        }
1376
        _Fields fieldId = _Fields.findByThriftId(field.id);
1377
        if (fieldId == null) {
1378
          TProtocolUtil.skip(iprot, field.type);
1379
        } else {
1380
          switch (fieldId) {
1381
          }
1382
          iprot.readFieldEnd();
1383
        }
1384
      }
1385
      iprot.readStructEnd();
1386
      validate();
1387
    }
1388
 
1389
    public void write(TProtocol oprot) throws TException {
1390
      oprot.writeStructBegin(STRUCT_DESC);
1391
 
1392
      oprot.writeFieldStop();
1393
      oprot.writeStructEnd();
1394
    }
1395
 
1396
    @Override
1397
    public String toString() {
1398
      StringBuilder sb = new StringBuilder("loadProperty_result(");
1399
      boolean first = true;
1400
 
1401
      sb.append(")");
1402
      return sb.toString();
1403
    }
1404
 
1405
    public void validate() throws TException {
1406
      // check for required fields
1407
    }
1408
 
1409
  }
1410
 
1411
}