Subversion Repositories SmartDukaan

Rev

Rev 779 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 779 Rev 896
Line 29... Line 29...
29
 
29
 
30
    public void sayHello(String message) throws TException;
30
    public void sayHello(String message) throws TException;
31
 
31
 
32
    public String getUser(long id) throws TException;
32
    public String getUser(long id) throws TException;
33
 
33
 
-
 
34
    public long getAddressId() throws TException;
-
 
35
 
-
 
36
    public Address getAddress() throws TException;
-
 
37
 
34
    public void createUser(String name) throws TException;
38
    public void createUser(String name) throws TException;
35
 
39
 
36
    public void closeSession() throws TException;
40
    public void closeSession() throws TException;
37
 
41
 
38
  }
42
  }
Line 125... Line 129...
125
        return result.success;
129
        return result.success;
126
      }
130
      }
127
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUser failed: unknown result");
131
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUser failed: unknown result");
128
    }
132
    }
129
 
133
 
-
 
134
    public long getAddressId() throws TException
-
 
135
    {
-
 
136
      send_getAddressId();
-
 
137
      return recv_getAddressId();
-
 
138
    }
-
 
139
 
-
 
140
    public void send_getAddressId() throws TException
-
 
141
    {
-
 
142
      oprot_.writeMessageBegin(new TMessage("getAddressId", TMessageType.CALL, seqid_));
-
 
143
      getAddressId_args args = new getAddressId_args();
-
 
144
      args.write(oprot_);
-
 
145
      oprot_.writeMessageEnd();
-
 
146
      oprot_.getTransport().flush();
-
 
147
    }
-
 
148
 
-
 
149
    public long recv_getAddressId() throws TException
-
 
150
    {
-
 
151
      TMessage msg = iprot_.readMessageBegin();
-
 
152
      if (msg.type == TMessageType.EXCEPTION) {
-
 
153
        TApplicationException x = TApplicationException.read(iprot_);
-
 
154
        iprot_.readMessageEnd();
-
 
155
        throw x;
-
 
156
      }
-
 
157
      getAddressId_result result = new getAddressId_result();
-
 
158
      result.read(iprot_);
-
 
159
      iprot_.readMessageEnd();
-
 
160
      if (result.isSetSuccess()) {
-
 
161
        return result.success;
-
 
162
      }
-
 
163
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAddressId failed: unknown result");
-
 
164
    }
-
 
165
 
-
 
166
    public Address getAddress() throws TException
-
 
167
    {
-
 
168
      send_getAddress();
-
 
169
      return recv_getAddress();
-
 
170
    }
-
 
171
 
-
 
172
    public void send_getAddress() throws TException
-
 
173
    {
-
 
174
      oprot_.writeMessageBegin(new TMessage("getAddress", TMessageType.CALL, seqid_));
-
 
175
      getAddress_args args = new getAddress_args();
-
 
176
      args.write(oprot_);
-
 
177
      oprot_.writeMessageEnd();
-
 
178
      oprot_.getTransport().flush();
-
 
179
    }
-
 
180
 
-
 
181
    public Address recv_getAddress() throws TException
-
 
182
    {
-
 
183
      TMessage msg = iprot_.readMessageBegin();
-
 
184
      if (msg.type == TMessageType.EXCEPTION) {
-
 
185
        TApplicationException x = TApplicationException.read(iprot_);
-
 
186
        iprot_.readMessageEnd();
-
 
187
        throw x;
-
 
188
      }
-
 
189
      getAddress_result result = new getAddress_result();
-
 
190
      result.read(iprot_);
-
 
191
      iprot_.readMessageEnd();
-
 
192
      if (result.isSetSuccess()) {
-
 
193
        return result.success;
-
 
194
      }
-
 
195
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAddress failed: unknown result");
-
 
196
    }
-
 
197
 
130
    public void createUser(String name) throws TException
198
    public void createUser(String name) throws TException
131
    {
199
    {
132
      send_createUser(name);
200
      send_createUser(name);
133
      recv_createUser();
201
      recv_createUser();
134
    }
202
    }
Line 192... Line 260...
192
    public Processor(Iface iface)
260
    public Processor(Iface iface)
193
    {
261
    {
194
      iface_ = iface;
262
      iface_ = iface;
195
      processMap_.put("sayHello", new sayHello());
263
      processMap_.put("sayHello", new sayHello());
196
      processMap_.put("getUser", new getUser());
264
      processMap_.put("getUser", new getUser());
-
 
265
      processMap_.put("getAddressId", new getAddressId());
-
 
266
      processMap_.put("getAddress", new getAddress());
197
      processMap_.put("createUser", new createUser());
267
      processMap_.put("createUser", new createUser());
198
      processMap_.put("closeSession", new closeSession());
268
      processMap_.put("closeSession", new closeSession());
199
    }
269
    }
200
 
270
 
201
    protected static interface ProcessFunction {
271
    protected static interface ProcessFunction {
Line 253... Line 323...
253
        oprot.getTransport().flush();
323
        oprot.getTransport().flush();
254
      }
324
      }
255
 
325
 
256
    }
326
    }
257
 
327
 
-
 
328
    private class getAddressId implements ProcessFunction {
-
 
329
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
330
      {
-
 
331
        getAddressId_args args = new getAddressId_args();
-
 
332
        args.read(iprot);
-
 
333
        iprot.readMessageEnd();
-
 
334
        getAddressId_result result = new getAddressId_result();
-
 
335
        result.success = iface_.getAddressId();
-
 
336
        result.setSuccessIsSet(true);
-
 
337
        oprot.writeMessageBegin(new TMessage("getAddressId", TMessageType.REPLY, seqid));
-
 
338
        result.write(oprot);
-
 
339
        oprot.writeMessageEnd();
-
 
340
        oprot.getTransport().flush();
-
 
341
      }
-
 
342
 
-
 
343
    }
-
 
344
 
-
 
345
    private class getAddress implements ProcessFunction {
-
 
346
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
347
      {
-
 
348
        getAddress_args args = new getAddress_args();
-
 
349
        args.read(iprot);
-
 
350
        iprot.readMessageEnd();
-
 
351
        getAddress_result result = new getAddress_result();
-
 
352
        result.success = iface_.getAddress();
-
 
353
        oprot.writeMessageBegin(new TMessage("getAddress", TMessageType.REPLY, seqid));
-
 
354
        result.write(oprot);
-
 
355
        oprot.writeMessageEnd();
-
 
356
        oprot.getTransport().flush();
-
 
357
      }
-
 
358
 
-
 
359
    }
-
 
360
 
258
    private class createUser implements ProcessFunction {
361
    private class createUser implements ProcessFunction {
259
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
362
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
260
      {
363
      {
261
        createUser_args args = new createUser_args();
364
        createUser_args args = new createUser_args();
262
        args.read(iprot);
365
        args.read(iprot);
Line 1302... Line 1405...
1302
      boolean first = true;
1405
      boolean first = true;
1303
 
1406
 
1304
      sb.append("success:");
1407
      sb.append("success:");
1305
      if (this.success == null) {
1408
      if (this.success == null) {
1306
        sb.append("null");
1409
        sb.append("null");
-
 
1410
      } else {
-
 
1411
        sb.append(this.success);
-
 
1412
      }
-
 
1413
      first = false;
-
 
1414
      sb.append(")");
-
 
1415
      return sb.toString();
-
 
1416
    }
-
 
1417
 
-
 
1418
    public void validate() throws TException {
-
 
1419
      // check for required fields
-
 
1420
    }
-
 
1421
 
-
 
1422
  }
-
 
1423
 
-
 
1424
  public static class getAddressId_args implements TBase<getAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAddressId_args>   {
-
 
1425
    private static final TStruct STRUCT_DESC = new TStruct("getAddressId_args");
-
 
1426
 
-
 
1427
 
-
 
1428
 
-
 
1429
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1430
    public enum _Fields implements TFieldIdEnum {
-
 
1431
;
-
 
1432
 
-
 
1433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1435
 
-
 
1436
      static {
-
 
1437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1438
          byId.put((int)field._thriftId, field);
-
 
1439
          byName.put(field.getFieldName(), field);
-
 
1440
        }
-
 
1441
      }
-
 
1442
 
-
 
1443
      /**
-
 
1444
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1445
       */
-
 
1446
      public static _Fields findByThriftId(int fieldId) {
-
 
1447
        return byId.get(fieldId);
-
 
1448
      }
-
 
1449
 
-
 
1450
      /**
-
 
1451
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1452
       * if it is not found.
-
 
1453
       */
-
 
1454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1455
        _Fields fields = findByThriftId(fieldId);
-
 
1456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1457
        return fields;
-
 
1458
      }
-
 
1459
 
-
 
1460
      /**
-
 
1461
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1462
       */
-
 
1463
      public static _Fields findByName(String name) {
-
 
1464
        return byName.get(name);
-
 
1465
      }
-
 
1466
 
-
 
1467
      private final short _thriftId;
-
 
1468
      private final String _fieldName;
-
 
1469
 
-
 
1470
      _Fields(short thriftId, String fieldName) {
-
 
1471
        _thriftId = thriftId;
-
 
1472
        _fieldName = fieldName;
-
 
1473
      }
-
 
1474
 
-
 
1475
      public short getThriftFieldId() {
-
 
1476
        return _thriftId;
-
 
1477
      }
-
 
1478
 
-
 
1479
      public String getFieldName() {
-
 
1480
        return _fieldName;
-
 
1481
      }
-
 
1482
    }
-
 
1483
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
1484
    }});
-
 
1485
 
-
 
1486
    static {
-
 
1487
      FieldMetaData.addStructMetaDataMap(getAddressId_args.class, metaDataMap);
-
 
1488
    }
-
 
1489
 
-
 
1490
    public getAddressId_args() {
-
 
1491
    }
-
 
1492
 
-
 
1493
    /**
-
 
1494
     * Performs a deep copy on <i>other</i>.
-
 
1495
     */
-
 
1496
    public getAddressId_args(getAddressId_args other) {
-
 
1497
    }
-
 
1498
 
-
 
1499
    public getAddressId_args deepCopy() {
-
 
1500
      return new getAddressId_args(this);
-
 
1501
    }
-
 
1502
 
-
 
1503
    @Deprecated
-
 
1504
    public getAddressId_args clone() {
-
 
1505
      return new getAddressId_args(this);
-
 
1506
    }
-
 
1507
 
-
 
1508
    public void setFieldValue(_Fields field, Object value) {
-
 
1509
      switch (field) {
-
 
1510
      }
-
 
1511
    }
-
 
1512
 
-
 
1513
    public void setFieldValue(int fieldID, Object value) {
-
 
1514
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1515
    }
-
 
1516
 
-
 
1517
    public Object getFieldValue(_Fields field) {
-
 
1518
      switch (field) {
-
 
1519
      }
-
 
1520
      throw new IllegalStateException();
-
 
1521
    }
-
 
1522
 
-
 
1523
    public Object getFieldValue(int fieldId) {
-
 
1524
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1525
    }
-
 
1526
 
-
 
1527
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
1528
    public boolean isSet(_Fields field) {
-
 
1529
      switch (field) {
-
 
1530
      }
-
 
1531
      throw new IllegalStateException();
-
 
1532
    }
-
 
1533
 
-
 
1534
    public boolean isSet(int fieldID) {
-
 
1535
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
1536
    }
-
 
1537
 
-
 
1538
    @Override
-
 
1539
    public boolean equals(Object that) {
-
 
1540
      if (that == null)
-
 
1541
        return false;
-
 
1542
      if (that instanceof getAddressId_args)
-
 
1543
        return this.equals((getAddressId_args)that);
-
 
1544
      return false;
-
 
1545
    }
-
 
1546
 
-
 
1547
    public boolean equals(getAddressId_args that) {
-
 
1548
      if (that == null)
-
 
1549
        return false;
-
 
1550
 
-
 
1551
      return true;
-
 
1552
    }
-
 
1553
 
-
 
1554
    @Override
-
 
1555
    public int hashCode() {
-
 
1556
      return 0;
-
 
1557
    }
-
 
1558
 
-
 
1559
    public int compareTo(getAddressId_args other) {
-
 
1560
      if (!getClass().equals(other.getClass())) {
-
 
1561
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1562
      }
-
 
1563
 
-
 
1564
      int lastComparison = 0;
-
 
1565
      getAddressId_args typedOther = (getAddressId_args)other;
-
 
1566
 
-
 
1567
      return 0;
-
 
1568
    }
-
 
1569
 
-
 
1570
    public void read(TProtocol iprot) throws TException {
-
 
1571
      TField field;
-
 
1572
      iprot.readStructBegin();
-
 
1573
      while (true)
-
 
1574
      {
-
 
1575
        field = iprot.readFieldBegin();
-
 
1576
        if (field.type == TType.STOP) { 
-
 
1577
          break;
-
 
1578
        }
-
 
1579
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1580
        if (fieldId == null) {
-
 
1581
          TProtocolUtil.skip(iprot, field.type);
-
 
1582
        } else {
-
 
1583
          switch (fieldId) {
-
 
1584
          }
-
 
1585
          iprot.readFieldEnd();
-
 
1586
        }
-
 
1587
      }
-
 
1588
      iprot.readStructEnd();
-
 
1589
      validate();
-
 
1590
    }
-
 
1591
 
-
 
1592
    public void write(TProtocol oprot) throws TException {
-
 
1593
      validate();
-
 
1594
 
-
 
1595
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1596
      oprot.writeFieldStop();
-
 
1597
      oprot.writeStructEnd();
-
 
1598
    }
-
 
1599
 
-
 
1600
    @Override
-
 
1601
    public String toString() {
-
 
1602
      StringBuilder sb = new StringBuilder("getAddressId_args(");
-
 
1603
      boolean first = true;
-
 
1604
 
-
 
1605
      sb.append(")");
-
 
1606
      return sb.toString();
-
 
1607
    }
-
 
1608
 
-
 
1609
    public void validate() throws TException {
-
 
1610
      // check for required fields
-
 
1611
    }
-
 
1612
 
-
 
1613
  }
-
 
1614
 
-
 
1615
  public static class getAddressId_result implements TBase<getAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAddressId_result>   {
-
 
1616
    private static final TStruct STRUCT_DESC = new TStruct("getAddressId_result");
-
 
1617
 
-
 
1618
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
-
 
1619
 
-
 
1620
    private long success;
-
 
1621
 
-
 
1622
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1623
    public enum _Fields implements TFieldIdEnum {
-
 
1624
      SUCCESS((short)0, "success");
-
 
1625
 
-
 
1626
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1628
 
-
 
1629
      static {
-
 
1630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1631
          byId.put((int)field._thriftId, field);
-
 
1632
          byName.put(field.getFieldName(), field);
-
 
1633
        }
-
 
1634
      }
-
 
1635
 
-
 
1636
      /**
-
 
1637
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1638
       */
-
 
1639
      public static _Fields findByThriftId(int fieldId) {
-
 
1640
        return byId.get(fieldId);
-
 
1641
      }
-
 
1642
 
-
 
1643
      /**
-
 
1644
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1645
       * if it is not found.
-
 
1646
       */
-
 
1647
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1648
        _Fields fields = findByThriftId(fieldId);
-
 
1649
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1650
        return fields;
-
 
1651
      }
-
 
1652
 
-
 
1653
      /**
-
 
1654
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1655
       */
-
 
1656
      public static _Fields findByName(String name) {
-
 
1657
        return byName.get(name);
-
 
1658
      }
-
 
1659
 
-
 
1660
      private final short _thriftId;
-
 
1661
      private final String _fieldName;
-
 
1662
 
-
 
1663
      _Fields(short thriftId, String fieldName) {
-
 
1664
        _thriftId = thriftId;
-
 
1665
        _fieldName = fieldName;
-
 
1666
      }
-
 
1667
 
-
 
1668
      public short getThriftFieldId() {
-
 
1669
        return _thriftId;
-
 
1670
      }
-
 
1671
 
-
 
1672
      public String getFieldName() {
-
 
1673
        return _fieldName;
-
 
1674
      }
-
 
1675
    }
-
 
1676
 
-
 
1677
    // isset id assignments
-
 
1678
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
1679
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
1680
 
-
 
1681
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
1682
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
1683
          new FieldValueMetaData(TType.I64)));
-
 
1684
    }});
-
 
1685
 
-
 
1686
    static {
-
 
1687
      FieldMetaData.addStructMetaDataMap(getAddressId_result.class, metaDataMap);
-
 
1688
    }
-
 
1689
 
-
 
1690
    public getAddressId_result() {
-
 
1691
    }
-
 
1692
 
-
 
1693
    public getAddressId_result(
-
 
1694
      long success)
-
 
1695
    {
-
 
1696
      this();
-
 
1697
      this.success = success;
-
 
1698
      setSuccessIsSet(true);
-
 
1699
    }
-
 
1700
 
-
 
1701
    /**
-
 
1702
     * Performs a deep copy on <i>other</i>.
-
 
1703
     */
-
 
1704
    public getAddressId_result(getAddressId_result other) {
-
 
1705
      __isset_bit_vector.clear();
-
 
1706
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
1707
      this.success = other.success;
-
 
1708
    }
-
 
1709
 
-
 
1710
    public getAddressId_result deepCopy() {
-
 
1711
      return new getAddressId_result(this);
-
 
1712
    }
-
 
1713
 
-
 
1714
    @Deprecated
-
 
1715
    public getAddressId_result clone() {
-
 
1716
      return new getAddressId_result(this);
-
 
1717
    }
-
 
1718
 
-
 
1719
    public long getSuccess() {
-
 
1720
      return this.success;
-
 
1721
    }
-
 
1722
 
-
 
1723
    public getAddressId_result setSuccess(long success) {
-
 
1724
      this.success = success;
-
 
1725
      setSuccessIsSet(true);
-
 
1726
      return this;
-
 
1727
    }
-
 
1728
 
-
 
1729
    public void unsetSuccess() {
-
 
1730
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
1731
    }
-
 
1732
 
-
 
1733
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
1734
    public boolean isSetSuccess() {
-
 
1735
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
1736
    }
-
 
1737
 
-
 
1738
    public void setSuccessIsSet(boolean value) {
-
 
1739
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
1740
    }
-
 
1741
 
-
 
1742
    public void setFieldValue(_Fields field, Object value) {
-
 
1743
      switch (field) {
-
 
1744
      case SUCCESS:
-
 
1745
        if (value == null) {
-
 
1746
          unsetSuccess();
-
 
1747
        } else {
-
 
1748
          setSuccess((Long)value);
-
 
1749
        }
-
 
1750
        break;
-
 
1751
 
-
 
1752
      }
-
 
1753
    }
-
 
1754
 
-
 
1755
    public void setFieldValue(int fieldID, Object value) {
-
 
1756
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1757
    }
-
 
1758
 
-
 
1759
    public Object getFieldValue(_Fields field) {
-
 
1760
      switch (field) {
-
 
1761
      case SUCCESS:
-
 
1762
        return new Long(getSuccess());
-
 
1763
 
-
 
1764
      }
-
 
1765
      throw new IllegalStateException();
-
 
1766
    }
-
 
1767
 
-
 
1768
    public Object getFieldValue(int fieldId) {
-
 
1769
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1770
    }
-
 
1771
 
-
 
1772
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
1773
    public boolean isSet(_Fields field) {
-
 
1774
      switch (field) {
-
 
1775
      case SUCCESS:
-
 
1776
        return isSetSuccess();
-
 
1777
      }
-
 
1778
      throw new IllegalStateException();
-
 
1779
    }
-
 
1780
 
-
 
1781
    public boolean isSet(int fieldID) {
-
 
1782
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
1783
    }
-
 
1784
 
-
 
1785
    @Override
-
 
1786
    public boolean equals(Object that) {
-
 
1787
      if (that == null)
-
 
1788
        return false;
-
 
1789
      if (that instanceof getAddressId_result)
-
 
1790
        return this.equals((getAddressId_result)that);
-
 
1791
      return false;
-
 
1792
    }
-
 
1793
 
-
 
1794
    public boolean equals(getAddressId_result that) {
-
 
1795
      if (that == null)
-
 
1796
        return false;
-
 
1797
 
-
 
1798
      boolean this_present_success = true;
-
 
1799
      boolean that_present_success = true;
-
 
1800
      if (this_present_success || that_present_success) {
-
 
1801
        if (!(this_present_success && that_present_success))
-
 
1802
          return false;
-
 
1803
        if (this.success != that.success)
-
 
1804
          return false;
-
 
1805
      }
-
 
1806
 
-
 
1807
      return true;
-
 
1808
    }
-
 
1809
 
-
 
1810
    @Override
-
 
1811
    public int hashCode() {
-
 
1812
      return 0;
-
 
1813
    }
-
 
1814
 
-
 
1815
    public int compareTo(getAddressId_result other) {
-
 
1816
      if (!getClass().equals(other.getClass())) {
-
 
1817
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1818
      }
-
 
1819
 
-
 
1820
      int lastComparison = 0;
-
 
1821
      getAddressId_result typedOther = (getAddressId_result)other;
-
 
1822
 
-
 
1823
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
1824
      if (lastComparison != 0) {
-
 
1825
        return lastComparison;
-
 
1826
      }
-
 
1827
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
1828
      if (lastComparison != 0) {
-
 
1829
        return lastComparison;
-
 
1830
      }
-
 
1831
      return 0;
-
 
1832
    }
-
 
1833
 
-
 
1834
    public void read(TProtocol iprot) throws TException {
-
 
1835
      TField field;
-
 
1836
      iprot.readStructBegin();
-
 
1837
      while (true)
-
 
1838
      {
-
 
1839
        field = iprot.readFieldBegin();
-
 
1840
        if (field.type == TType.STOP) { 
-
 
1841
          break;
-
 
1842
        }
-
 
1843
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1844
        if (fieldId == null) {
-
 
1845
          TProtocolUtil.skip(iprot, field.type);
-
 
1846
        } else {
-
 
1847
          switch (fieldId) {
-
 
1848
            case SUCCESS:
-
 
1849
              if (field.type == TType.I64) {
-
 
1850
                this.success = iprot.readI64();
-
 
1851
                setSuccessIsSet(true);
-
 
1852
              } else { 
-
 
1853
                TProtocolUtil.skip(iprot, field.type);
-
 
1854
              }
-
 
1855
              break;
-
 
1856
          }
-
 
1857
          iprot.readFieldEnd();
-
 
1858
        }
-
 
1859
      }
-
 
1860
      iprot.readStructEnd();
-
 
1861
      validate();
-
 
1862
    }
-
 
1863
 
-
 
1864
    public void write(TProtocol oprot) throws TException {
-
 
1865
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1866
 
-
 
1867
      if (this.isSetSuccess()) {
-
 
1868
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
1869
        oprot.writeI64(this.success);
-
 
1870
        oprot.writeFieldEnd();
-
 
1871
      }
-
 
1872
      oprot.writeFieldStop();
-
 
1873
      oprot.writeStructEnd();
-
 
1874
    }
-
 
1875
 
-
 
1876
    @Override
-
 
1877
    public String toString() {
-
 
1878
      StringBuilder sb = new StringBuilder("getAddressId_result(");
-
 
1879
      boolean first = true;
-
 
1880
 
-
 
1881
      sb.append("success:");
-
 
1882
      sb.append(this.success);
-
 
1883
      first = false;
-
 
1884
      sb.append(")");
-
 
1885
      return sb.toString();
-
 
1886
    }
-
 
1887
 
-
 
1888
    public void validate() throws TException {
-
 
1889
      // check for required fields
-
 
1890
    }
-
 
1891
 
-
 
1892
  }
-
 
1893
 
-
 
1894
  public static class getAddress_args implements TBase<getAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAddress_args>   {
-
 
1895
    private static final TStruct STRUCT_DESC = new TStruct("getAddress_args");
-
 
1896
 
-
 
1897
 
-
 
1898
 
-
 
1899
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1900
    public enum _Fields implements TFieldIdEnum {
-
 
1901
;
-
 
1902
 
-
 
1903
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1904
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1905
 
-
 
1906
      static {
-
 
1907
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1908
          byId.put((int)field._thriftId, field);
-
 
1909
          byName.put(field.getFieldName(), field);
-
 
1910
        }
-
 
1911
      }
-
 
1912
 
-
 
1913
      /**
-
 
1914
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1915
       */
-
 
1916
      public static _Fields findByThriftId(int fieldId) {
-
 
1917
        return byId.get(fieldId);
-
 
1918
      }
-
 
1919
 
-
 
1920
      /**
-
 
1921
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1922
       * if it is not found.
-
 
1923
       */
-
 
1924
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1925
        _Fields fields = findByThriftId(fieldId);
-
 
1926
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1927
        return fields;
-
 
1928
      }
-
 
1929
 
-
 
1930
      /**
-
 
1931
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1932
       */
-
 
1933
      public static _Fields findByName(String name) {
-
 
1934
        return byName.get(name);
-
 
1935
      }
-
 
1936
 
-
 
1937
      private final short _thriftId;
-
 
1938
      private final String _fieldName;
-
 
1939
 
-
 
1940
      _Fields(short thriftId, String fieldName) {
-
 
1941
        _thriftId = thriftId;
-
 
1942
        _fieldName = fieldName;
-
 
1943
      }
-
 
1944
 
-
 
1945
      public short getThriftFieldId() {
-
 
1946
        return _thriftId;
-
 
1947
      }
-
 
1948
 
-
 
1949
      public String getFieldName() {
-
 
1950
        return _fieldName;
-
 
1951
      }
-
 
1952
    }
-
 
1953
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
1954
    }});
-
 
1955
 
-
 
1956
    static {
-
 
1957
      FieldMetaData.addStructMetaDataMap(getAddress_args.class, metaDataMap);
-
 
1958
    }
-
 
1959
 
-
 
1960
    public getAddress_args() {
-
 
1961
    }
-
 
1962
 
-
 
1963
    /**
-
 
1964
     * Performs a deep copy on <i>other</i>.
-
 
1965
     */
-
 
1966
    public getAddress_args(getAddress_args other) {
-
 
1967
    }
-
 
1968
 
-
 
1969
    public getAddress_args deepCopy() {
-
 
1970
      return new getAddress_args(this);
-
 
1971
    }
-
 
1972
 
-
 
1973
    @Deprecated
-
 
1974
    public getAddress_args clone() {
-
 
1975
      return new getAddress_args(this);
-
 
1976
    }
-
 
1977
 
-
 
1978
    public void setFieldValue(_Fields field, Object value) {
-
 
1979
      switch (field) {
-
 
1980
      }
-
 
1981
    }
-
 
1982
 
-
 
1983
    public void setFieldValue(int fieldID, Object value) {
-
 
1984
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1985
    }
-
 
1986
 
-
 
1987
    public Object getFieldValue(_Fields field) {
-
 
1988
      switch (field) {
-
 
1989
      }
-
 
1990
      throw new IllegalStateException();
-
 
1991
    }
-
 
1992
 
-
 
1993
    public Object getFieldValue(int fieldId) {
-
 
1994
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1995
    }
-
 
1996
 
-
 
1997
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
1998
    public boolean isSet(_Fields field) {
-
 
1999
      switch (field) {
-
 
2000
      }
-
 
2001
      throw new IllegalStateException();
-
 
2002
    }
-
 
2003
 
-
 
2004
    public boolean isSet(int fieldID) {
-
 
2005
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2006
    }
-
 
2007
 
-
 
2008
    @Override
-
 
2009
    public boolean equals(Object that) {
-
 
2010
      if (that == null)
-
 
2011
        return false;
-
 
2012
      if (that instanceof getAddress_args)
-
 
2013
        return this.equals((getAddress_args)that);
-
 
2014
      return false;
-
 
2015
    }
-
 
2016
 
-
 
2017
    public boolean equals(getAddress_args that) {
-
 
2018
      if (that == null)
-
 
2019
        return false;
-
 
2020
 
-
 
2021
      return true;
-
 
2022
    }
-
 
2023
 
-
 
2024
    @Override
-
 
2025
    public int hashCode() {
-
 
2026
      return 0;
-
 
2027
    }
-
 
2028
 
-
 
2029
    public int compareTo(getAddress_args other) {
-
 
2030
      if (!getClass().equals(other.getClass())) {
-
 
2031
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2032
      }
-
 
2033
 
-
 
2034
      int lastComparison = 0;
-
 
2035
      getAddress_args typedOther = (getAddress_args)other;
-
 
2036
 
-
 
2037
      return 0;
-
 
2038
    }
-
 
2039
 
-
 
2040
    public void read(TProtocol iprot) throws TException {
-
 
2041
      TField field;
-
 
2042
      iprot.readStructBegin();
-
 
2043
      while (true)
-
 
2044
      {
-
 
2045
        field = iprot.readFieldBegin();
-
 
2046
        if (field.type == TType.STOP) { 
-
 
2047
          break;
-
 
2048
        }
-
 
2049
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
2050
        if (fieldId == null) {
-
 
2051
          TProtocolUtil.skip(iprot, field.type);
-
 
2052
        } else {
-
 
2053
          switch (fieldId) {
-
 
2054
          }
-
 
2055
          iprot.readFieldEnd();
-
 
2056
        }
-
 
2057
      }
-
 
2058
      iprot.readStructEnd();
-
 
2059
      validate();
-
 
2060
    }
-
 
2061
 
-
 
2062
    public void write(TProtocol oprot) throws TException {
-
 
2063
      validate();
-
 
2064
 
-
 
2065
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2066
      oprot.writeFieldStop();
-
 
2067
      oprot.writeStructEnd();
-
 
2068
    }
-
 
2069
 
-
 
2070
    @Override
-
 
2071
    public String toString() {
-
 
2072
      StringBuilder sb = new StringBuilder("getAddress_args(");
-
 
2073
      boolean first = true;
-
 
2074
 
-
 
2075
      sb.append(")");
-
 
2076
      return sb.toString();
-
 
2077
    }
-
 
2078
 
-
 
2079
    public void validate() throws TException {
-
 
2080
      // check for required fields
-
 
2081
    }
-
 
2082
 
-
 
2083
  }
-
 
2084
 
-
 
2085
  public static class getAddress_result implements TBase<getAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAddress_result>   {
-
 
2086
    private static final TStruct STRUCT_DESC = new TStruct("getAddress_result");
-
 
2087
 
-
 
2088
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
-
 
2089
 
-
 
2090
    private Address success;
-
 
2091
 
-
 
2092
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2093
    public enum _Fields implements TFieldIdEnum {
-
 
2094
      SUCCESS((short)0, "success");
-
 
2095
 
-
 
2096
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2097
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2098
 
-
 
2099
      static {
-
 
2100
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2101
          byId.put((int)field._thriftId, field);
-
 
2102
          byName.put(field.getFieldName(), field);
-
 
2103
        }
-
 
2104
      }
-
 
2105
 
-
 
2106
      /**
-
 
2107
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2108
       */
-
 
2109
      public static _Fields findByThriftId(int fieldId) {
-
 
2110
        return byId.get(fieldId);
-
 
2111
      }
-
 
2112
 
-
 
2113
      /**
-
 
2114
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2115
       * if it is not found.
-
 
2116
       */
-
 
2117
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2118
        _Fields fields = findByThriftId(fieldId);
-
 
2119
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2120
        return fields;
-
 
2121
      }
-
 
2122
 
-
 
2123
      /**
-
 
2124
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2125
       */
-
 
2126
      public static _Fields findByName(String name) {
-
 
2127
        return byName.get(name);
-
 
2128
      }
-
 
2129
 
-
 
2130
      private final short _thriftId;
-
 
2131
      private final String _fieldName;
-
 
2132
 
-
 
2133
      _Fields(short thriftId, String fieldName) {
-
 
2134
        _thriftId = thriftId;
-
 
2135
        _fieldName = fieldName;
-
 
2136
      }
-
 
2137
 
-
 
2138
      public short getThriftFieldId() {
-
 
2139
        return _thriftId;
-
 
2140
      }
-
 
2141
 
-
 
2142
      public String getFieldName() {
-
 
2143
        return _fieldName;
-
 
2144
      }
-
 
2145
    }
-
 
2146
 
-
 
2147
    // isset id assignments
-
 
2148
 
-
 
2149
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
2150
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
2151
          new StructMetaData(TType.STRUCT, Address.class)));
-
 
2152
    }});
-
 
2153
 
-
 
2154
    static {
-
 
2155
      FieldMetaData.addStructMetaDataMap(getAddress_result.class, metaDataMap);
-
 
2156
    }
-
 
2157
 
-
 
2158
    public getAddress_result() {
-
 
2159
    }
-
 
2160
 
-
 
2161
    public getAddress_result(
-
 
2162
      Address success)
-
 
2163
    {
-
 
2164
      this();
-
 
2165
      this.success = success;
-
 
2166
    }
-
 
2167
 
-
 
2168
    /**
-
 
2169
     * Performs a deep copy on <i>other</i>.
-
 
2170
     */
-
 
2171
    public getAddress_result(getAddress_result other) {
-
 
2172
      if (other.isSetSuccess()) {
-
 
2173
        this.success = new Address(other.success);
-
 
2174
      }
-
 
2175
    }
-
 
2176
 
-
 
2177
    public getAddress_result deepCopy() {
-
 
2178
      return new getAddress_result(this);
-
 
2179
    }
-
 
2180
 
-
 
2181
    @Deprecated
-
 
2182
    public getAddress_result clone() {
-
 
2183
      return new getAddress_result(this);
-
 
2184
    }
-
 
2185
 
-
 
2186
    public Address getSuccess() {
-
 
2187
      return this.success;
-
 
2188
    }
-
 
2189
 
-
 
2190
    public getAddress_result setSuccess(Address success) {
-
 
2191
      this.success = success;
-
 
2192
      return this;
-
 
2193
    }
-
 
2194
 
-
 
2195
    public void unsetSuccess() {
-
 
2196
      this.success = null;
-
 
2197
    }
-
 
2198
 
-
 
2199
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
2200
    public boolean isSetSuccess() {
-
 
2201
      return this.success != null;
-
 
2202
    }
-
 
2203
 
-
 
2204
    public void setSuccessIsSet(boolean value) {
-
 
2205
      if (!value) {
-
 
2206
        this.success = null;
-
 
2207
      }
-
 
2208
    }
-
 
2209
 
-
 
2210
    public void setFieldValue(_Fields field, Object value) {
-
 
2211
      switch (field) {
-
 
2212
      case SUCCESS:
-
 
2213
        if (value == null) {
-
 
2214
          unsetSuccess();
-
 
2215
        } else {
-
 
2216
          setSuccess((Address)value);
-
 
2217
        }
-
 
2218
        break;
-
 
2219
 
-
 
2220
      }
-
 
2221
    }
-
 
2222
 
-
 
2223
    public void setFieldValue(int fieldID, Object value) {
-
 
2224
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2225
    }
-
 
2226
 
-
 
2227
    public Object getFieldValue(_Fields field) {
-
 
2228
      switch (field) {
-
 
2229
      case SUCCESS:
-
 
2230
        return getSuccess();
-
 
2231
 
-
 
2232
      }
-
 
2233
      throw new IllegalStateException();
-
 
2234
    }
-
 
2235
 
-
 
2236
    public Object getFieldValue(int fieldId) {
-
 
2237
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2238
    }
-
 
2239
 
-
 
2240
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
2241
    public boolean isSet(_Fields field) {
-
 
2242
      switch (field) {
-
 
2243
      case SUCCESS:
-
 
2244
        return isSetSuccess();
-
 
2245
      }
-
 
2246
      throw new IllegalStateException();
-
 
2247
    }
-
 
2248
 
-
 
2249
    public boolean isSet(int fieldID) {
-
 
2250
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2251
    }
-
 
2252
 
-
 
2253
    @Override
-
 
2254
    public boolean equals(Object that) {
-
 
2255
      if (that == null)
-
 
2256
        return false;
-
 
2257
      if (that instanceof getAddress_result)
-
 
2258
        return this.equals((getAddress_result)that);
-
 
2259
      return false;
-
 
2260
    }
-
 
2261
 
-
 
2262
    public boolean equals(getAddress_result that) {
-
 
2263
      if (that == null)
-
 
2264
        return false;
-
 
2265
 
-
 
2266
      boolean this_present_success = true && this.isSetSuccess();
-
 
2267
      boolean that_present_success = true && that.isSetSuccess();
-
 
2268
      if (this_present_success || that_present_success) {
-
 
2269
        if (!(this_present_success && that_present_success))
-
 
2270
          return false;
-
 
2271
        if (!this.success.equals(that.success))
-
 
2272
          return false;
-
 
2273
      }
-
 
2274
 
-
 
2275
      return true;
-
 
2276
    }
-
 
2277
 
-
 
2278
    @Override
-
 
2279
    public int hashCode() {
-
 
2280
      return 0;
-
 
2281
    }
-
 
2282
 
-
 
2283
    public int compareTo(getAddress_result other) {
-
 
2284
      if (!getClass().equals(other.getClass())) {
-
 
2285
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2286
      }
-
 
2287
 
-
 
2288
      int lastComparison = 0;
-
 
2289
      getAddress_result typedOther = (getAddress_result)other;
-
 
2290
 
-
 
2291
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
2292
      if (lastComparison != 0) {
-
 
2293
        return lastComparison;
-
 
2294
      }
-
 
2295
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
2296
      if (lastComparison != 0) {
-
 
2297
        return lastComparison;
-
 
2298
      }
-
 
2299
      return 0;
-
 
2300
    }
-
 
2301
 
-
 
2302
    public void read(TProtocol iprot) throws TException {
-
 
2303
      TField field;
-
 
2304
      iprot.readStructBegin();
-
 
2305
      while (true)
-
 
2306
      {
-
 
2307
        field = iprot.readFieldBegin();
-
 
2308
        if (field.type == TType.STOP) { 
-
 
2309
          break;
-
 
2310
        }
-
 
2311
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
2312
        if (fieldId == null) {
-
 
2313
          TProtocolUtil.skip(iprot, field.type);
-
 
2314
        } else {
-
 
2315
          switch (fieldId) {
-
 
2316
            case SUCCESS:
-
 
2317
              if (field.type == TType.STRUCT) {
-
 
2318
                this.success = new Address();
-
 
2319
                this.success.read(iprot);
-
 
2320
              } else { 
-
 
2321
                TProtocolUtil.skip(iprot, field.type);
-
 
2322
              }
-
 
2323
              break;
-
 
2324
          }
-
 
2325
          iprot.readFieldEnd();
-
 
2326
        }
-
 
2327
      }
-
 
2328
      iprot.readStructEnd();
-
 
2329
      validate();
-
 
2330
    }
-
 
2331
 
-
 
2332
    public void write(TProtocol oprot) throws TException {
-
 
2333
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2334
 
-
 
2335
      if (this.isSetSuccess()) {
-
 
2336
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
2337
        this.success.write(oprot);
-
 
2338
        oprot.writeFieldEnd();
-
 
2339
      }
-
 
2340
      oprot.writeFieldStop();
-
 
2341
      oprot.writeStructEnd();
-
 
2342
    }
-
 
2343
 
-
 
2344
    @Override
-
 
2345
    public String toString() {
-
 
2346
      StringBuilder sb = new StringBuilder("getAddress_result(");
-
 
2347
      boolean first = true;
-
 
2348
 
-
 
2349
      sb.append("success:");
-
 
2350
      if (this.success == null) {
-
 
2351
        sb.append("null");
1307
      } else {
2352
      } else {
1308
        sb.append(this.success);
2353
        sb.append(this.success);
1309
      }
2354
      }
1310
      first = false;
2355
      first = false;
1311
      sb.append(")");
2356
      sb.append(")");