Subversion Repositories SmartDukaan

Rev

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

Rev 15167 Rev 19247
Line 26... Line 26...
26
 
26
 
27
    public List<LivePricing> getLatestPricing(long skuBundleId, long source_id) throws org.apache.thrift.TException;
27
    public List<LivePricing> getLatestPricing(long skuBundleId, long source_id) throws org.apache.thrift.TException;
28
 
28
 
29
    public void updateLatestPriceForItem(long id) throws org.apache.thrift.TException;
29
    public void updateLatestPriceForItem(long id) throws org.apache.thrift.TException;
30
 
30
 
-
 
31
    public List<String> addItemsInBulk(List<BulkItems> bulkItemsList) throws org.apache.thrift.TException;
-
 
32
 
31
  }
33
  }
32
 
34
 
33
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
35
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
34
 
36
 
35
    public void getLatestPricing(long skuBundleId, long source_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLatestPricing_call> resultHandler) throws org.apache.thrift.TException;
37
    public void getLatestPricing(long skuBundleId, long source_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLatestPricing_call> resultHandler) throws org.apache.thrift.TException;
36
 
38
 
37
    public void updateLatestPriceForItem(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateLatestPriceForItem_call> resultHandler) throws org.apache.thrift.TException;
39
    public void updateLatestPriceForItem(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateLatestPriceForItem_call> resultHandler) throws org.apache.thrift.TException;
38
 
40
 
-
 
41
    public void addItemsInBulk(List<BulkItems> bulkItemsList, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addItemsInBulk_call> resultHandler) throws org.apache.thrift.TException;
-
 
42
 
39
  }
43
  }
40
 
44
 
41
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
45
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
42
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
46
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
43
      public Factory() {}
47
      public Factory() {}
Line 92... Line 96...
92
      updateLatestPriceForItem_args args = new updateLatestPriceForItem_args();
96
      updateLatestPriceForItem_args args = new updateLatestPriceForItem_args();
93
      args.setId(id);
97
      args.setId(id);
94
      sendBase("updateLatestPriceForItem", args);
98
      sendBase("updateLatestPriceForItem", args);
95
    }
99
    }
96
 
100
 
-
 
101
    public List<String> addItemsInBulk(List<BulkItems> bulkItemsList) throws org.apache.thrift.TException
-
 
102
    {
-
 
103
      send_addItemsInBulk(bulkItemsList);
-
 
104
      return recv_addItemsInBulk();
-
 
105
    }
-
 
106
 
-
 
107
    public void send_addItemsInBulk(List<BulkItems> bulkItemsList) throws org.apache.thrift.TException
-
 
108
    {
-
 
109
      addItemsInBulk_args args = new addItemsInBulk_args();
-
 
110
      args.setBulkItemsList(bulkItemsList);
-
 
111
      sendBase("addItemsInBulk", args);
-
 
112
    }
-
 
113
 
-
 
114
    public List<String> recv_addItemsInBulk() throws org.apache.thrift.TException
-
 
115
    {
-
 
116
      addItemsInBulk_result result = new addItemsInBulk_result();
-
 
117
      receiveBase(result, "addItemsInBulk");
-
 
118
      if (result.isSetSuccess()) {
-
 
119
        return result.success;
-
 
120
      }
-
 
121
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addItemsInBulk failed: unknown result");
-
 
122
    }
-
 
123
 
97
  }
124
  }
98
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
125
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
99
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
126
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
100
      private org.apache.thrift.async.TAsyncClientManager clientManager;
127
      private org.apache.thrift.async.TAsyncClientManager clientManager;
101
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
128
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 176... Line 203...
176
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
203
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
177
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
204
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
178
      }
205
      }
179
    }
206
    }
180
 
207
 
-
 
208
    public void addItemsInBulk(List<BulkItems> bulkItemsList, org.apache.thrift.async.AsyncMethodCallback<addItemsInBulk_call> resultHandler) throws org.apache.thrift.TException {
-
 
209
      checkReady();
-
 
210
      addItemsInBulk_call method_call = new addItemsInBulk_call(bulkItemsList, resultHandler, this, ___protocolFactory, ___transport);
-
 
211
      this.___currentMethod = method_call;
-
 
212
      ___manager.call(method_call);
-
 
213
    }
-
 
214
 
-
 
215
    public static class addItemsInBulk_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
216
      private List<BulkItems> bulkItemsList;
-
 
217
      public addItemsInBulk_call(List<BulkItems> bulkItemsList, org.apache.thrift.async.AsyncMethodCallback<addItemsInBulk_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
218
        super(client, protocolFactory, transport, resultHandler, false);
-
 
219
        this.bulkItemsList = bulkItemsList;
-
 
220
      }
-
 
221
 
-
 
222
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
223
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addItemsInBulk", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
224
        addItemsInBulk_args args = new addItemsInBulk_args();
-
 
225
        args.setBulkItemsList(bulkItemsList);
-
 
226
        args.write(prot);
-
 
227
        prot.writeMessageEnd();
-
 
228
      }
-
 
229
 
-
 
230
      public List<String> getResult() throws org.apache.thrift.TException {
-
 
231
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
232
          throw new IllegalStateException("Method call not finished!");
-
 
233
        }
-
 
234
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
235
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
236
        return (new Client(prot)).recv_addItemsInBulk();
-
 
237
      }
-
 
238
    }
-
 
239
 
181
  }
240
  }
182
 
241
 
183
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
242
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
184
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
243
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
185
    public Processor(I iface) {
244
    public Processor(I iface) {
Line 191... Line 250...
191
    }
250
    }
192
 
251
 
193
    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
252
    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
194
      processMap.put("getLatestPricing", new getLatestPricing());
253
      processMap.put("getLatestPricing", new getLatestPricing());
195
      processMap.put("updateLatestPriceForItem", new updateLatestPriceForItem());
254
      processMap.put("updateLatestPriceForItem", new updateLatestPriceForItem());
-
 
255
      processMap.put("addItemsInBulk", new addItemsInBulk());
196
      return processMap;
256
      return processMap;
197
    }
257
    }
198
 
258
 
199
    private static class getLatestPricing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLatestPricing_args> {
259
    private static class getLatestPricing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLatestPricing_args> {
200
      public getLatestPricing() {
260
      public getLatestPricing() {
Line 225... Line 285...
225
        iface.updateLatestPriceForItem(args.id);
285
        iface.updateLatestPriceForItem(args.id);
226
        return null;
286
        return null;
227
      }
287
      }
228
    }
288
    }
229
 
289
 
-
 
290
    private static class addItemsInBulk<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addItemsInBulk_args> {
-
 
291
      public addItemsInBulk() {
-
 
292
        super("addItemsInBulk");
-
 
293
      }
-
 
294
 
-
 
295
      protected addItemsInBulk_args getEmptyArgsInstance() {
-
 
296
        return new addItemsInBulk_args();
-
 
297
      }
-
 
298
 
-
 
299
      protected addItemsInBulk_result getResult(I iface, addItemsInBulk_args args) throws org.apache.thrift.TException {
-
 
300
        addItemsInBulk_result result = new addItemsInBulk_result();
-
 
301
        result.success = iface.addItemsInBulk(args.bulkItemsList);
-
 
302
        return result;
-
 
303
      }
-
 
304
    }
-
 
305
 
230
  }
306
  }
231
 
307
 
232
  public static class getLatestPricing_args implements org.apache.thrift.TBase<getLatestPricing_args, getLatestPricing_args._Fields>, java.io.Serializable, Cloneable   {
308
  public static class getLatestPricing_args implements org.apache.thrift.TBase<getLatestPricing_args, getLatestPricing_args._Fields>, java.io.Serializable, Cloneable   {
233
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLatestPricing_args");
309
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLatestPricing_args");
234
 
310
 
Line 1226... Line 1302...
1226
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1302
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1227
      } catch (org.apache.thrift.TException te) {
1303
      } catch (org.apache.thrift.TException te) {
1228
        throw new java.io.IOException(te);
1304
        throw new java.io.IOException(te);
1229
      }
1305
      }
1230
    }
1306
    }
-
 
1307
 
-
 
1308
  }
-
 
1309
 
-
 
1310
  public static class addItemsInBulk_args implements org.apache.thrift.TBase<addItemsInBulk_args, addItemsInBulk_args._Fields>, java.io.Serializable, Cloneable   {
-
 
1311
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItemsInBulk_args");
-
 
1312
 
-
 
1313
    private static final org.apache.thrift.protocol.TField BULK_ITEMS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkItemsList", org.apache.thrift.protocol.TType.LIST, (short)1);
-
 
1314
 
-
 
1315
    private List<BulkItems> bulkItemsList; // required
-
 
1316
 
-
 
1317
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1318
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
1319
      BULK_ITEMS_LIST((short)1, "bulkItemsList");
-
 
1320
 
-
 
1321
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1322
 
-
 
1323
      static {
-
 
1324
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1325
          byName.put(field.getFieldName(), field);
-
 
1326
        }
-
 
1327
      }
-
 
1328
 
-
 
1329
      /**
-
 
1330
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1331
       */
-
 
1332
      public static _Fields findByThriftId(int fieldId) {
-
 
1333
        switch(fieldId) {
-
 
1334
          case 1: // BULK_ITEMS_LIST
-
 
1335
            return BULK_ITEMS_LIST;
-
 
1336
          default:
-
 
1337
            return null;
-
 
1338
        }
-
 
1339
      }
-
 
1340
 
-
 
1341
      /**
-
 
1342
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1343
       * if it is not found.
-
 
1344
       */
-
 
1345
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1346
        _Fields fields = findByThriftId(fieldId);
-
 
1347
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1348
        return fields;
-
 
1349
      }
-
 
1350
 
-
 
1351
      /**
-
 
1352
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1353
       */
-
 
1354
      public static _Fields findByName(String name) {
-
 
1355
        return byName.get(name);
-
 
1356
      }
-
 
1357
 
-
 
1358
      private final short _thriftId;
-
 
1359
      private final String _fieldName;
-
 
1360
 
-
 
1361
      _Fields(short thriftId, String fieldName) {
-
 
1362
        _thriftId = thriftId;
-
 
1363
        _fieldName = fieldName;
-
 
1364
      }
-
 
1365
 
-
 
1366
      public short getThriftFieldId() {
-
 
1367
        return _thriftId;
-
 
1368
      }
-
 
1369
 
-
 
1370
      public String getFieldName() {
-
 
1371
        return _fieldName;
-
 
1372
      }
-
 
1373
    }
-
 
1374
 
-
 
1375
    // isset id assignments
-
 
1376
 
-
 
1377
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
1378
    static {
-
 
1379
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
1380
      tmpMap.put(_Fields.BULK_ITEMS_LIST, new org.apache.thrift.meta_data.FieldMetaData("bulkItemsList", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1381
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
1382
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkItems.class))));
-
 
1383
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
1384
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addItemsInBulk_args.class, metaDataMap);
-
 
1385
    }
-
 
1386
 
-
 
1387
    public addItemsInBulk_args() {
-
 
1388
    }
-
 
1389
 
-
 
1390
    public addItemsInBulk_args(
-
 
1391
      List<BulkItems> bulkItemsList)
-
 
1392
    {
-
 
1393
      this();
-
 
1394
      this.bulkItemsList = bulkItemsList;
-
 
1395
    }
-
 
1396
 
-
 
1397
    /**
-
 
1398
     * Performs a deep copy on <i>other</i>.
-
 
1399
     */
-
 
1400
    public addItemsInBulk_args(addItemsInBulk_args other) {
-
 
1401
      if (other.isSetBulkItemsList()) {
-
 
1402
        List<BulkItems> __this__bulkItemsList = new ArrayList<BulkItems>();
-
 
1403
        for (BulkItems other_element : other.bulkItemsList) {
-
 
1404
          __this__bulkItemsList.add(new BulkItems(other_element));
-
 
1405
        }
-
 
1406
        this.bulkItemsList = __this__bulkItemsList;
-
 
1407
      }
-
 
1408
    }
-
 
1409
 
-
 
1410
    public addItemsInBulk_args deepCopy() {
-
 
1411
      return new addItemsInBulk_args(this);
-
 
1412
    }
-
 
1413
 
-
 
1414
    @Override
-
 
1415
    public void clear() {
-
 
1416
      this.bulkItemsList = null;
-
 
1417
    }
-
 
1418
 
-
 
1419
    public int getBulkItemsListSize() {
-
 
1420
      return (this.bulkItemsList == null) ? 0 : this.bulkItemsList.size();
-
 
1421
    }
-
 
1422
 
-
 
1423
    public java.util.Iterator<BulkItems> getBulkItemsListIterator() {
-
 
1424
      return (this.bulkItemsList == null) ? null : this.bulkItemsList.iterator();
-
 
1425
    }
-
 
1426
 
-
 
1427
    public void addToBulkItemsList(BulkItems elem) {
-
 
1428
      if (this.bulkItemsList == null) {
-
 
1429
        this.bulkItemsList = new ArrayList<BulkItems>();
-
 
1430
      }
-
 
1431
      this.bulkItemsList.add(elem);
-
 
1432
    }
-
 
1433
 
-
 
1434
    public List<BulkItems> getBulkItemsList() {
-
 
1435
      return this.bulkItemsList;
-
 
1436
    }
-
 
1437
 
-
 
1438
    public void setBulkItemsList(List<BulkItems> bulkItemsList) {
-
 
1439
      this.bulkItemsList = bulkItemsList;
-
 
1440
    }
-
 
1441
 
-
 
1442
    public void unsetBulkItemsList() {
-
 
1443
      this.bulkItemsList = null;
-
 
1444
    }
-
 
1445
 
-
 
1446
    /** Returns true if field bulkItemsList is set (has been assigned a value) and false otherwise */
-
 
1447
    public boolean isSetBulkItemsList() {
-
 
1448
      return this.bulkItemsList != null;
-
 
1449
    }
-
 
1450
 
-
 
1451
    public void setBulkItemsListIsSet(boolean value) {
-
 
1452
      if (!value) {
-
 
1453
        this.bulkItemsList = null;
-
 
1454
      }
-
 
1455
    }
-
 
1456
 
-
 
1457
    public void setFieldValue(_Fields field, Object value) {
-
 
1458
      switch (field) {
-
 
1459
      case BULK_ITEMS_LIST:
-
 
1460
        if (value == null) {
-
 
1461
          unsetBulkItemsList();
-
 
1462
        } else {
-
 
1463
          setBulkItemsList((List<BulkItems>)value);
-
 
1464
        }
-
 
1465
        break;
-
 
1466
 
-
 
1467
      }
-
 
1468
    }
-
 
1469
 
-
 
1470
    public Object getFieldValue(_Fields field) {
-
 
1471
      switch (field) {
-
 
1472
      case BULK_ITEMS_LIST:
-
 
1473
        return getBulkItemsList();
-
 
1474
 
-
 
1475
      }
-
 
1476
      throw new IllegalStateException();
-
 
1477
    }
-
 
1478
 
-
 
1479
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
1480
    public boolean isSet(_Fields field) {
-
 
1481
      if (field == null) {
-
 
1482
        throw new IllegalArgumentException();
-
 
1483
      }
-
 
1484
 
-
 
1485
      switch (field) {
-
 
1486
      case BULK_ITEMS_LIST:
-
 
1487
        return isSetBulkItemsList();
-
 
1488
      }
-
 
1489
      throw new IllegalStateException();
-
 
1490
    }
-
 
1491
 
-
 
1492
    @Override
-
 
1493
    public boolean equals(Object that) {
-
 
1494
      if (that == null)
-
 
1495
        return false;
-
 
1496
      if (that instanceof addItemsInBulk_args)
-
 
1497
        return this.equals((addItemsInBulk_args)that);
-
 
1498
      return false;
-
 
1499
    }
-
 
1500
 
-
 
1501
    public boolean equals(addItemsInBulk_args that) {
-
 
1502
      if (that == null)
-
 
1503
        return false;
-
 
1504
 
-
 
1505
      boolean this_present_bulkItemsList = true && this.isSetBulkItemsList();
-
 
1506
      boolean that_present_bulkItemsList = true && that.isSetBulkItemsList();
-
 
1507
      if (this_present_bulkItemsList || that_present_bulkItemsList) {
-
 
1508
        if (!(this_present_bulkItemsList && that_present_bulkItemsList))
-
 
1509
          return false;
-
 
1510
        if (!this.bulkItemsList.equals(that.bulkItemsList))
-
 
1511
          return false;
-
 
1512
      }
-
 
1513
 
-
 
1514
      return true;
-
 
1515
    }
-
 
1516
 
-
 
1517
    @Override
-
 
1518
    public int hashCode() {
-
 
1519
      return 0;
-
 
1520
    }
-
 
1521
 
-
 
1522
    public int compareTo(addItemsInBulk_args other) {
-
 
1523
      if (!getClass().equals(other.getClass())) {
-
 
1524
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1525
      }
-
 
1526
 
-
 
1527
      int lastComparison = 0;
-
 
1528
      addItemsInBulk_args typedOther = (addItemsInBulk_args)other;
-
 
1529
 
-
 
1530
      lastComparison = Boolean.valueOf(isSetBulkItemsList()).compareTo(typedOther.isSetBulkItemsList());
-
 
1531
      if (lastComparison != 0) {
-
 
1532
        return lastComparison;
-
 
1533
      }
-
 
1534
      if (isSetBulkItemsList()) {
-
 
1535
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkItemsList, typedOther.bulkItemsList);
-
 
1536
        if (lastComparison != 0) {
-
 
1537
          return lastComparison;
-
 
1538
        }
-
 
1539
      }
-
 
1540
      return 0;
-
 
1541
    }
-
 
1542
 
-
 
1543
    public _Fields fieldForId(int fieldId) {
-
 
1544
      return _Fields.findByThriftId(fieldId);
-
 
1545
    }
-
 
1546
 
-
 
1547
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
1548
      org.apache.thrift.protocol.TField field;
-
 
1549
      iprot.readStructBegin();
-
 
1550
      while (true)
-
 
1551
      {
-
 
1552
        field = iprot.readFieldBegin();
-
 
1553
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
1554
          break;
-
 
1555
        }
-
 
1556
        switch (field.id) {
-
 
1557
          case 1: // BULK_ITEMS_LIST
-
 
1558
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
1559
              {
-
 
1560
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
-
 
1561
                this.bulkItemsList = new ArrayList<BulkItems>(_list4.size);
-
 
1562
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
-
 
1563
                {
-
 
1564
                  BulkItems _elem6; // required
-
 
1565
                  _elem6 = new BulkItems();
-
 
1566
                  _elem6.read(iprot);
-
 
1567
                  this.bulkItemsList.add(_elem6);
-
 
1568
                }
-
 
1569
                iprot.readListEnd();
-
 
1570
              }
-
 
1571
            } else { 
-
 
1572
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1573
            }
-
 
1574
            break;
-
 
1575
          default:
-
 
1576
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1577
        }
-
 
1578
        iprot.readFieldEnd();
-
 
1579
      }
-
 
1580
      iprot.readStructEnd();
-
 
1581
      validate();
-
 
1582
    }
-
 
1583
 
-
 
1584
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
1585
      validate();
-
 
1586
 
-
 
1587
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1588
      if (this.bulkItemsList != null) {
-
 
1589
        oprot.writeFieldBegin(BULK_ITEMS_LIST_FIELD_DESC);
-
 
1590
        {
-
 
1591
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.bulkItemsList.size()));
-
 
1592
          for (BulkItems _iter7 : this.bulkItemsList)
-
 
1593
          {
-
 
1594
            _iter7.write(oprot);
-
 
1595
          }
-
 
1596
          oprot.writeListEnd();
-
 
1597
        }
-
 
1598
        oprot.writeFieldEnd();
-
 
1599
      }
-
 
1600
      oprot.writeFieldStop();
-
 
1601
      oprot.writeStructEnd();
-
 
1602
    }
-
 
1603
 
-
 
1604
    @Override
-
 
1605
    public String toString() {
-
 
1606
      StringBuilder sb = new StringBuilder("addItemsInBulk_args(");
-
 
1607
      boolean first = true;
-
 
1608
 
-
 
1609
      sb.append("bulkItemsList:");
-
 
1610
      if (this.bulkItemsList == null) {
-
 
1611
        sb.append("null");
-
 
1612
      } else {
-
 
1613
        sb.append(this.bulkItemsList);
-
 
1614
      }
-
 
1615
      first = false;
-
 
1616
      sb.append(")");
-
 
1617
      return sb.toString();
-
 
1618
    }
-
 
1619
 
-
 
1620
    public void validate() throws org.apache.thrift.TException {
-
 
1621
      // check for required fields
-
 
1622
    }
-
 
1623
 
-
 
1624
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
1625
      try {
-
 
1626
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
1627
      } catch (org.apache.thrift.TException te) {
-
 
1628
        throw new java.io.IOException(te);
-
 
1629
      }
-
 
1630
    }
-
 
1631
 
-
 
1632
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
1633
      try {
-
 
1634
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
1635
      } catch (org.apache.thrift.TException te) {
-
 
1636
        throw new java.io.IOException(te);
-
 
1637
      }
-
 
1638
    }
-
 
1639
 
-
 
1640
  }
-
 
1641
 
-
 
1642
  public static class addItemsInBulk_result implements org.apache.thrift.TBase<addItemsInBulk_result, addItemsInBulk_result._Fields>, java.io.Serializable, Cloneable   {
-
 
1643
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItemsInBulk_result");
-
 
1644
 
-
 
1645
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
 
1646
 
-
 
1647
    private List<String> success; // required
-
 
1648
 
-
 
1649
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1650
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
1651
      SUCCESS((short)0, "success");
-
 
1652
 
-
 
1653
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1654
 
-
 
1655
      static {
-
 
1656
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1657
          byName.put(field.getFieldName(), field);
-
 
1658
        }
-
 
1659
      }
-
 
1660
 
-
 
1661
      /**
-
 
1662
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1663
       */
-
 
1664
      public static _Fields findByThriftId(int fieldId) {
-
 
1665
        switch(fieldId) {
-
 
1666
          case 0: // SUCCESS
-
 
1667
            return SUCCESS;
-
 
1668
          default:
-
 
1669
            return null;
-
 
1670
        }
-
 
1671
      }
-
 
1672
 
-
 
1673
      /**
-
 
1674
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1675
       * if it is not found.
-
 
1676
       */
-
 
1677
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1678
        _Fields fields = findByThriftId(fieldId);
-
 
1679
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1680
        return fields;
-
 
1681
      }
-
 
1682
 
-
 
1683
      /**
-
 
1684
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1685
       */
-
 
1686
      public static _Fields findByName(String name) {
-
 
1687
        return byName.get(name);
-
 
1688
      }
-
 
1689
 
-
 
1690
      private final short _thriftId;
-
 
1691
      private final String _fieldName;
-
 
1692
 
-
 
1693
      _Fields(short thriftId, String fieldName) {
-
 
1694
        _thriftId = thriftId;
-
 
1695
        _fieldName = fieldName;
-
 
1696
      }
-
 
1697
 
-
 
1698
      public short getThriftFieldId() {
-
 
1699
        return _thriftId;
-
 
1700
      }
-
 
1701
 
-
 
1702
      public String getFieldName() {
-
 
1703
        return _fieldName;
-
 
1704
      }
-
 
1705
    }
-
 
1706
 
-
 
1707
    // isset id assignments
-
 
1708
 
-
 
1709
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
1710
    static {
-
 
1711
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
1712
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1713
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
1714
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
-
 
1715
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
1716
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addItemsInBulk_result.class, metaDataMap);
-
 
1717
    }
-
 
1718
 
-
 
1719
    public addItemsInBulk_result() {
-
 
1720
    }
-
 
1721
 
-
 
1722
    public addItemsInBulk_result(
-
 
1723
      List<String> success)
-
 
1724
    {
-
 
1725
      this();
-
 
1726
      this.success = success;
-
 
1727
    }
-
 
1728
 
-
 
1729
    /**
-
 
1730
     * Performs a deep copy on <i>other</i>.
-
 
1731
     */
-
 
1732
    public addItemsInBulk_result(addItemsInBulk_result other) {
-
 
1733
      if (other.isSetSuccess()) {
-
 
1734
        List<String> __this__success = new ArrayList<String>();
-
 
1735
        for (String other_element : other.success) {
-
 
1736
          __this__success.add(other_element);
-
 
1737
        }
-
 
1738
        this.success = __this__success;
-
 
1739
      }
-
 
1740
    }
-
 
1741
 
-
 
1742
    public addItemsInBulk_result deepCopy() {
-
 
1743
      return new addItemsInBulk_result(this);
-
 
1744
    }
-
 
1745
 
-
 
1746
    @Override
-
 
1747
    public void clear() {
-
 
1748
      this.success = null;
-
 
1749
    }
-
 
1750
 
-
 
1751
    public int getSuccessSize() {
-
 
1752
      return (this.success == null) ? 0 : this.success.size();
-
 
1753
    }
-
 
1754
 
-
 
1755
    public java.util.Iterator<String> getSuccessIterator() {
-
 
1756
      return (this.success == null) ? null : this.success.iterator();
-
 
1757
    }
-
 
1758
 
-
 
1759
    public void addToSuccess(String elem) {
-
 
1760
      if (this.success == null) {
-
 
1761
        this.success = new ArrayList<String>();
-
 
1762
      }
-
 
1763
      this.success.add(elem);
-
 
1764
    }
-
 
1765
 
-
 
1766
    public List<String> getSuccess() {
-
 
1767
      return this.success;
-
 
1768
    }
-
 
1769
 
-
 
1770
    public void setSuccess(List<String> success) {
-
 
1771
      this.success = success;
-
 
1772
    }
-
 
1773
 
-
 
1774
    public void unsetSuccess() {
-
 
1775
      this.success = null;
-
 
1776
    }
-
 
1777
 
-
 
1778
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
1779
    public boolean isSetSuccess() {
-
 
1780
      return this.success != null;
-
 
1781
    }
-
 
1782
 
-
 
1783
    public void setSuccessIsSet(boolean value) {
-
 
1784
      if (!value) {
-
 
1785
        this.success = null;
-
 
1786
      }
-
 
1787
    }
-
 
1788
 
-
 
1789
    public void setFieldValue(_Fields field, Object value) {
-
 
1790
      switch (field) {
-
 
1791
      case SUCCESS:
-
 
1792
        if (value == null) {
-
 
1793
          unsetSuccess();
-
 
1794
        } else {
-
 
1795
          setSuccess((List<String>)value);
-
 
1796
        }
-
 
1797
        break;
-
 
1798
 
-
 
1799
      }
-
 
1800
    }
-
 
1801
 
-
 
1802
    public Object getFieldValue(_Fields field) {
-
 
1803
      switch (field) {
-
 
1804
      case SUCCESS:
-
 
1805
        return getSuccess();
-
 
1806
 
-
 
1807
      }
-
 
1808
      throw new IllegalStateException();
-
 
1809
    }
-
 
1810
 
-
 
1811
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
1812
    public boolean isSet(_Fields field) {
-
 
1813
      if (field == null) {
-
 
1814
        throw new IllegalArgumentException();
-
 
1815
      }
-
 
1816
 
-
 
1817
      switch (field) {
-
 
1818
      case SUCCESS:
-
 
1819
        return isSetSuccess();
-
 
1820
      }
-
 
1821
      throw new IllegalStateException();
-
 
1822
    }
-
 
1823
 
-
 
1824
    @Override
-
 
1825
    public boolean equals(Object that) {
-
 
1826
      if (that == null)
-
 
1827
        return false;
-
 
1828
      if (that instanceof addItemsInBulk_result)
-
 
1829
        return this.equals((addItemsInBulk_result)that);
-
 
1830
      return false;
-
 
1831
    }
-
 
1832
 
-
 
1833
    public boolean equals(addItemsInBulk_result that) {
-
 
1834
      if (that == null)
-
 
1835
        return false;
-
 
1836
 
-
 
1837
      boolean this_present_success = true && this.isSetSuccess();
-
 
1838
      boolean that_present_success = true && that.isSetSuccess();
-
 
1839
      if (this_present_success || that_present_success) {
-
 
1840
        if (!(this_present_success && that_present_success))
-
 
1841
          return false;
-
 
1842
        if (!this.success.equals(that.success))
-
 
1843
          return false;
-
 
1844
      }
-
 
1845
 
-
 
1846
      return true;
-
 
1847
    }
-
 
1848
 
-
 
1849
    @Override
-
 
1850
    public int hashCode() {
-
 
1851
      return 0;
-
 
1852
    }
-
 
1853
 
-
 
1854
    public int compareTo(addItemsInBulk_result other) {
-
 
1855
      if (!getClass().equals(other.getClass())) {
-
 
1856
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1857
      }
-
 
1858
 
-
 
1859
      int lastComparison = 0;
-
 
1860
      addItemsInBulk_result typedOther = (addItemsInBulk_result)other;
-
 
1861
 
-
 
1862
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
1863
      if (lastComparison != 0) {
-
 
1864
        return lastComparison;
-
 
1865
      }
-
 
1866
      if (isSetSuccess()) {
-
 
1867
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
1868
        if (lastComparison != 0) {
-
 
1869
          return lastComparison;
-
 
1870
        }
-
 
1871
      }
-
 
1872
      return 0;
-
 
1873
    }
-
 
1874
 
-
 
1875
    public _Fields fieldForId(int fieldId) {
-
 
1876
      return _Fields.findByThriftId(fieldId);
-
 
1877
    }
-
 
1878
 
-
 
1879
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
1880
      org.apache.thrift.protocol.TField field;
-
 
1881
      iprot.readStructBegin();
-
 
1882
      while (true)
-
 
1883
      {
-
 
1884
        field = iprot.readFieldBegin();
-
 
1885
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
1886
          break;
-
 
1887
        }
-
 
1888
        switch (field.id) {
-
 
1889
          case 0: // SUCCESS
-
 
1890
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
1891
              {
-
 
1892
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
-
 
1893
                this.success = new ArrayList<String>(_list8.size);
-
 
1894
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
-
 
1895
                {
-
 
1896
                  String _elem10; // required
-
 
1897
                  _elem10 = iprot.readString();
-
 
1898
                  this.success.add(_elem10);
-
 
1899
                }
-
 
1900
                iprot.readListEnd();
-
 
1901
              }
-
 
1902
            } else { 
-
 
1903
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1904
            }
-
 
1905
            break;
-
 
1906
          default:
-
 
1907
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1908
        }
-
 
1909
        iprot.readFieldEnd();
-
 
1910
      }
-
 
1911
      iprot.readStructEnd();
-
 
1912
      validate();
-
 
1913
    }
-
 
1914
 
-
 
1915
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
1916
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1917
 
-
 
1918
      if (this.isSetSuccess()) {
-
 
1919
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
1920
        {
-
 
1921
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
-
 
1922
          for (String _iter11 : this.success)
-
 
1923
          {
-
 
1924
            oprot.writeString(_iter11);
-
 
1925
          }
-
 
1926
          oprot.writeListEnd();
-
 
1927
        }
-
 
1928
        oprot.writeFieldEnd();
-
 
1929
      }
-
 
1930
      oprot.writeFieldStop();
-
 
1931
      oprot.writeStructEnd();
-
 
1932
    }
-
 
1933
 
-
 
1934
    @Override
-
 
1935
    public String toString() {
-
 
1936
      StringBuilder sb = new StringBuilder("addItemsInBulk_result(");
-
 
1937
      boolean first = true;
-
 
1938
 
-
 
1939
      sb.append("success:");
-
 
1940
      if (this.success == null) {
-
 
1941
        sb.append("null");
-
 
1942
      } else {
-
 
1943
        sb.append(this.success);
-
 
1944
      }
-
 
1945
      first = false;
-
 
1946
      sb.append(")");
-
 
1947
      return sb.toString();
-
 
1948
    }
-
 
1949
 
-
 
1950
    public void validate() throws org.apache.thrift.TException {
-
 
1951
      // check for required fields
-
 
1952
    }
-
 
1953
 
-
 
1954
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
1955
      try {
-
 
1956
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
1957
      } catch (org.apache.thrift.TException te) {
-
 
1958
        throw new java.io.IOException(te);
-
 
1959
      }
-
 
1960
    }
-
 
1961
 
-
 
1962
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
1963
      try {
-
 
1964
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
1965
      } catch (org.apache.thrift.TException te) {
-
 
1966
        throw new java.io.IOException(te);
-
 
1967
      }
-
 
1968
    }
1231
 
1969
 
1232
  }
1970
  }
1233
 
1971
 
1234
}
1972
}