Subversion Repositories SmartDukaan

Rev

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

Rev 5620 Rev 5711
Line 130... Line 130...
130
     * 
130
     * 
131
     * @param orderId
131
     * @param orderId
132
     */
132
     */
133
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
133
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
134
 
134
 
-
 
135
    /**
-
 
136
     * Fetches the stock inventory age week-wise
-
 
137
     */
-
 
138
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException;
-
 
139
 
135
  }
140
  }
136
 
141
 
137
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
142
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
138
 
143
 
139
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
144
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
Line 160... Line 165...
160
 
165
 
161
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
166
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
162
 
167
 
163
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException;
168
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException;
164
 
169
 
-
 
170
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryAge_call> resultHandler) throws org.apache.thrift.TException;
-
 
171
 
165
  }
172
  }
166
 
173
 
167
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
174
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
168
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
175
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
169
      public Factory() {}
176
      public Factory() {}
Line 516... Line 523...
516
        throw result.we;
523
        throw result.we;
517
      }
524
      }
518
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");
525
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");
519
    }
526
    }
520
 
527
 
-
 
528
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException
-
 
529
    {
-
 
530
      send_getInventoryAge();
-
 
531
      return recv_getInventoryAge();
-
 
532
    }
-
 
533
 
-
 
534
    public void send_getInventoryAge() throws org.apache.thrift.TException
-
 
535
    {
-
 
536
      getInventoryAge_args args = new getInventoryAge_args();
-
 
537
      sendBase("getInventoryAge", args);
-
 
538
    }
-
 
539
 
-
 
540
    public List<InventoryAge> recv_getInventoryAge() throws org.apache.thrift.TException
-
 
541
    {
-
 
542
      getInventoryAge_result result = new getInventoryAge_result();
-
 
543
      receiveBase(result, "getInventoryAge");
-
 
544
      if (result.isSetSuccess()) {
-
 
545
        return result.success;
-
 
546
      }
-
 
547
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryAge failed: unknown result");
-
 
548
    }
-
 
549
 
521
  }
550
  }
522
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
551
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
523
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
552
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
524
      private org.apache.thrift.async.TAsyncClientManager clientManager;
553
      private org.apache.thrift.async.TAsyncClientManager clientManager;
525
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
554
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 1001... Line 1030...
1001
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1030
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1002
        return (new Client(prot)).recv_getInventoryItemFromOrder();
1031
        return (new Client(prot)).recv_getInventoryItemFromOrder();
1003
      }
1032
      }
1004
    }
1033
    }
1005
 
1034
 
-
 
1035
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_call> resultHandler) throws org.apache.thrift.TException {
-
 
1036
      checkReady();
-
 
1037
      getInventoryAge_call method_call = new getInventoryAge_call(resultHandler, this, ___protocolFactory, ___transport);
-
 
1038
      this.___currentMethod = method_call;
-
 
1039
      ___manager.call(method_call);
-
 
1040
    }
-
 
1041
 
-
 
1042
    public static class getInventoryAge_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1043
      public getInventoryAge_call(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_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 {
-
 
1044
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1045
      }
-
 
1046
 
-
 
1047
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1048
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryAge", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1049
        getInventoryAge_args args = new getInventoryAge_args();
-
 
1050
        args.write(prot);
-
 
1051
        prot.writeMessageEnd();
-
 
1052
      }
-
 
1053
 
-
 
1054
      public List<InventoryAge> getResult() throws org.apache.thrift.TException {
-
 
1055
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1056
          throw new IllegalStateException("Method call not finished!");
-
 
1057
        }
-
 
1058
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1059
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1060
        return (new Client(prot)).recv_getInventoryAge();
-
 
1061
      }
-
 
1062
    }
-
 
1063
 
1006
  }
1064
  }
1007
 
1065
 
1008
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1066
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1009
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1067
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1010
    public Processor(I iface) {
1068
    public Processor(I iface) {
Line 1027... Line 1085...
1027
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1085
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1028
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
1086
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
1029
      processMap.put("getPurchaseScans", new getPurchaseScans());
1087
      processMap.put("getPurchaseScans", new getPurchaseScans());
1030
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
1088
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
1031
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
1089
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
-
 
1090
      processMap.put("getInventoryAge", new getInventoryAge());
1032
      return processMap;
1091
      return processMap;
1033
    }
1092
    }
1034
 
1093
 
1035
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1094
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1036
      public getInventoryItem() {
1095
      public getInventoryItem() {
Line 1270... Line 1329...
1270
        }
1329
        }
1271
        return result;
1330
        return result;
1272
      }
1331
      }
1273
    }
1332
    }
1274
 
1333
 
-
 
1334
    private static class getInventoryAge<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryAge_args> {
-
 
1335
      public getInventoryAge() {
-
 
1336
        super("getInventoryAge");
-
 
1337
      }
-
 
1338
 
-
 
1339
      protected getInventoryAge_args getEmptyArgsInstance() {
-
 
1340
        return new getInventoryAge_args();
-
 
1341
      }
-
 
1342
 
-
 
1343
      protected getInventoryAge_result getResult(I iface, getInventoryAge_args args) throws org.apache.thrift.TException {
-
 
1344
        getInventoryAge_result result = new getInventoryAge_result();
-
 
1345
        result.success = iface.getInventoryAge();
-
 
1346
        return result;
-
 
1347
      }
-
 
1348
    }
-
 
1349
 
1275
  }
1350
  }
1276
 
1351
 
1277
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1352
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1278
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
1353
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
1279
 
1354
 
Line 10102... Line 10177...
10102
      }
10177
      }
10103
    }
10178
    }
10104
 
10179
 
10105
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10180
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10106
      try {
10181
      try {
-
 
10182
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
10183
        __isset_bit_vector = new BitSet(1);
10107
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10184
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10108
      } catch (org.apache.thrift.TException te) {
10185
      } catch (org.apache.thrift.TException te) {
10109
        throw new java.io.IOException(te);
10186
        throw new java.io.IOException(te);
10110
      }
10187
      }
10111
    }
10188
    }
Line 11094... Line 11171...
11094
      }
11171
      }
11095
      first = false;
11172
      first = false;
11096
      sb.append(")");
11173
      sb.append(")");
11097
      return sb.toString();
11174
      return sb.toString();
11098
    }
11175
    }
-
 
11176
 
-
 
11177
    public void validate() throws org.apache.thrift.TException {
-
 
11178
      // check for required fields
-
 
11179
    }
-
 
11180
 
-
 
11181
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
11182
      try {
-
 
11183
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
11184
      } catch (org.apache.thrift.TException te) {
-
 
11185
        throw new java.io.IOException(te);
-
 
11186
      }
-
 
11187
    }
-
 
11188
 
-
 
11189
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
11190
      try {
-
 
11191
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
11192
      } catch (org.apache.thrift.TException te) {
-
 
11193
        throw new java.io.IOException(te);
-
 
11194
      }
-
 
11195
    }
-
 
11196
 
-
 
11197
  }
-
 
11198
 
-
 
11199
  public static class getInventoryAge_args implements org.apache.thrift.TBase<getInventoryAge_args, getInventoryAge_args._Fields>, java.io.Serializable, Cloneable   {
-
 
11200
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_args");
-
 
11201
 
-
 
11202
 
-
 
11203
 
-
 
11204
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11205
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
11206
;
-
 
11207
 
-
 
11208
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11209
 
-
 
11210
      static {
-
 
11211
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11212
          byName.put(field.getFieldName(), field);
-
 
11213
        }
-
 
11214
      }
-
 
11215
 
-
 
11216
      /**
-
 
11217
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11218
       */
-
 
11219
      public static _Fields findByThriftId(int fieldId) {
-
 
11220
        switch(fieldId) {
-
 
11221
          default:
-
 
11222
            return null;
-
 
11223
        }
-
 
11224
      }
-
 
11225
 
-
 
11226
      /**
-
 
11227
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11228
       * if it is not found.
-
 
11229
       */
-
 
11230
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11231
        _Fields fields = findByThriftId(fieldId);
-
 
11232
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11233
        return fields;
-
 
11234
      }
-
 
11235
 
-
 
11236
      /**
-
 
11237
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11238
       */
-
 
11239
      public static _Fields findByName(String name) {
-
 
11240
        return byName.get(name);
-
 
11241
      }
-
 
11242
 
-
 
11243
      private final short _thriftId;
-
 
11244
      private final String _fieldName;
-
 
11245
 
-
 
11246
      _Fields(short thriftId, String fieldName) {
-
 
11247
        _thriftId = thriftId;
-
 
11248
        _fieldName = fieldName;
-
 
11249
      }
-
 
11250
 
-
 
11251
      public short getThriftFieldId() {
-
 
11252
        return _thriftId;
-
 
11253
      }
-
 
11254
 
-
 
11255
      public String getFieldName() {
-
 
11256
        return _fieldName;
-
 
11257
      }
-
 
11258
    }
-
 
11259
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
11260
    static {
-
 
11261
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
11262
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
11263
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_args.class, metaDataMap);
-
 
11264
    }
-
 
11265
 
-
 
11266
    public getInventoryAge_args() {
-
 
11267
    }
-
 
11268
 
-
 
11269
    /**
-
 
11270
     * Performs a deep copy on <i>other</i>.
-
 
11271
     */
-
 
11272
    public getInventoryAge_args(getInventoryAge_args other) {
-
 
11273
    }
-
 
11274
 
-
 
11275
    public getInventoryAge_args deepCopy() {
-
 
11276
      return new getInventoryAge_args(this);
-
 
11277
    }
-
 
11278
 
-
 
11279
    @Override
-
 
11280
    public void clear() {
-
 
11281
    }
-
 
11282
 
-
 
11283
    public void setFieldValue(_Fields field, Object value) {
-
 
11284
      switch (field) {
-
 
11285
      }
-
 
11286
    }
-
 
11287
 
-
 
11288
    public Object getFieldValue(_Fields field) {
-
 
11289
      switch (field) {
-
 
11290
      }
-
 
11291
      throw new IllegalStateException();
-
 
11292
    }
-
 
11293
 
-
 
11294
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
11295
    public boolean isSet(_Fields field) {
-
 
11296
      if (field == null) {
-
 
11297
        throw new IllegalArgumentException();
-
 
11298
      }
-
 
11299
 
-
 
11300
      switch (field) {
-
 
11301
      }
-
 
11302
      throw new IllegalStateException();
-
 
11303
    }
-
 
11304
 
-
 
11305
    @Override
-
 
11306
    public boolean equals(Object that) {
-
 
11307
      if (that == null)
-
 
11308
        return false;
-
 
11309
      if (that instanceof getInventoryAge_args)
-
 
11310
        return this.equals((getInventoryAge_args)that);
-
 
11311
      return false;
-
 
11312
    }
-
 
11313
 
-
 
11314
    public boolean equals(getInventoryAge_args that) {
-
 
11315
      if (that == null)
-
 
11316
        return false;
-
 
11317
 
-
 
11318
      return true;
-
 
11319
    }
-
 
11320
 
-
 
11321
    @Override
-
 
11322
    public int hashCode() {
-
 
11323
      return 0;
-
 
11324
    }
-
 
11325
 
-
 
11326
    public int compareTo(getInventoryAge_args other) {
-
 
11327
      if (!getClass().equals(other.getClass())) {
-
 
11328
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11329
      }
-
 
11330
 
-
 
11331
      int lastComparison = 0;
-
 
11332
      getInventoryAge_args typedOther = (getInventoryAge_args)other;
-
 
11333
 
-
 
11334
      return 0;
-
 
11335
    }
-
 
11336
 
-
 
11337
    public _Fields fieldForId(int fieldId) {
-
 
11338
      return _Fields.findByThriftId(fieldId);
-
 
11339
    }
-
 
11340
 
-
 
11341
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11342
      org.apache.thrift.protocol.TField field;
-
 
11343
      iprot.readStructBegin();
-
 
11344
      while (true)
-
 
11345
      {
-
 
11346
        field = iprot.readFieldBegin();
-
 
11347
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11348
          break;
-
 
11349
        }
-
 
11350
        switch (field.id) {
-
 
11351
          default:
-
 
11352
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11353
        }
-
 
11354
        iprot.readFieldEnd();
-
 
11355
      }
-
 
11356
      iprot.readStructEnd();
-
 
11357
      validate();
-
 
11358
    }
-
 
11359
 
-
 
11360
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11361
      validate();
-
 
11362
 
-
 
11363
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11364
      oprot.writeFieldStop();
-
 
11365
      oprot.writeStructEnd();
-
 
11366
    }
-
 
11367
 
-
 
11368
    @Override
-
 
11369
    public String toString() {
-
 
11370
      StringBuilder sb = new StringBuilder("getInventoryAge_args(");
-
 
11371
      boolean first = true;
-
 
11372
 
-
 
11373
      sb.append(")");
-
 
11374
      return sb.toString();
-
 
11375
    }
-
 
11376
 
-
 
11377
    public void validate() throws org.apache.thrift.TException {
-
 
11378
      // check for required fields
-
 
11379
    }
-
 
11380
 
-
 
11381
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
11382
      try {
-
 
11383
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
11384
      } catch (org.apache.thrift.TException te) {
-
 
11385
        throw new java.io.IOException(te);
-
 
11386
      }
-
 
11387
    }
-
 
11388
 
-
 
11389
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
11390
      try {
-
 
11391
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
11392
      } catch (org.apache.thrift.TException te) {
-
 
11393
        throw new java.io.IOException(te);
-
 
11394
      }
-
 
11395
    }
-
 
11396
 
-
 
11397
  }
-
 
11398
 
-
 
11399
  public static class getInventoryAge_result implements org.apache.thrift.TBase<getInventoryAge_result, getInventoryAge_result._Fields>, java.io.Serializable, Cloneable   {
-
 
11400
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_result");
-
 
11401
 
-
 
11402
    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);
-
 
11403
 
-
 
11404
    private List<InventoryAge> success; // required
-
 
11405
 
-
 
11406
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11407
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
11408
      SUCCESS((short)0, "success");
-
 
11409
 
-
 
11410
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11411
 
-
 
11412
      static {
-
 
11413
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11414
          byName.put(field.getFieldName(), field);
-
 
11415
        }
-
 
11416
      }
-
 
11417
 
-
 
11418
      /**
-
 
11419
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11420
       */
-
 
11421
      public static _Fields findByThriftId(int fieldId) {
-
 
11422
        switch(fieldId) {
-
 
11423
          case 0: // SUCCESS
-
 
11424
            return SUCCESS;
-
 
11425
          default:
-
 
11426
            return null;
-
 
11427
        }
-
 
11428
      }
-
 
11429
 
-
 
11430
      /**
-
 
11431
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11432
       * if it is not found.
-
 
11433
       */
-
 
11434
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11435
        _Fields fields = findByThriftId(fieldId);
-
 
11436
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11437
        return fields;
-
 
11438
      }
-
 
11439
 
-
 
11440
      /**
-
 
11441
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11442
       */
-
 
11443
      public static _Fields findByName(String name) {
-
 
11444
        return byName.get(name);
-
 
11445
      }
-
 
11446
 
-
 
11447
      private final short _thriftId;
-
 
11448
      private final String _fieldName;
-
 
11449
 
-
 
11450
      _Fields(short thriftId, String fieldName) {
-
 
11451
        _thriftId = thriftId;
-
 
11452
        _fieldName = fieldName;
-
 
11453
      }
-
 
11454
 
-
 
11455
      public short getThriftFieldId() {
-
 
11456
        return _thriftId;
-
 
11457
      }
-
 
11458
 
-
 
11459
      public String getFieldName() {
-
 
11460
        return _fieldName;
-
 
11461
      }
-
 
11462
    }
-
 
11463
 
-
 
11464
    // isset id assignments
-
 
11465
 
-
 
11466
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
11467
    static {
-
 
11468
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
11469
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11470
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
11471
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAge.class))));
-
 
11472
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
11473
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_result.class, metaDataMap);
-
 
11474
    }
-
 
11475
 
-
 
11476
    public getInventoryAge_result() {
-
 
11477
    }
-
 
11478
 
-
 
11479
    public getInventoryAge_result(
-
 
11480
      List<InventoryAge> success)
-
 
11481
    {
-
 
11482
      this();
-
 
11483
      this.success = success;
-
 
11484
    }
-
 
11485
 
-
 
11486
    /**
-
 
11487
     * Performs a deep copy on <i>other</i>.
-
 
11488
     */
-
 
11489
    public getInventoryAge_result(getInventoryAge_result other) {
-
 
11490
      if (other.isSetSuccess()) {
-
 
11491
        List<InventoryAge> __this__success = new ArrayList<InventoryAge>();
-
 
11492
        for (InventoryAge other_element : other.success) {
-
 
11493
          __this__success.add(new InventoryAge(other_element));
-
 
11494
        }
-
 
11495
        this.success = __this__success;
-
 
11496
      }
-
 
11497
    }
-
 
11498
 
-
 
11499
    public getInventoryAge_result deepCopy() {
-
 
11500
      return new getInventoryAge_result(this);
-
 
11501
    }
-
 
11502
 
-
 
11503
    @Override
-
 
11504
    public void clear() {
-
 
11505
      this.success = null;
-
 
11506
    }
-
 
11507
 
-
 
11508
    public int getSuccessSize() {
-
 
11509
      return (this.success == null) ? 0 : this.success.size();
-
 
11510
    }
-
 
11511
 
-
 
11512
    public java.util.Iterator<InventoryAge> getSuccessIterator() {
-
 
11513
      return (this.success == null) ? null : this.success.iterator();
-
 
11514
    }
-
 
11515
 
-
 
11516
    public void addToSuccess(InventoryAge elem) {
-
 
11517
      if (this.success == null) {
-
 
11518
        this.success = new ArrayList<InventoryAge>();
-
 
11519
      }
-
 
11520
      this.success.add(elem);
-
 
11521
    }
-
 
11522
 
-
 
11523
    public List<InventoryAge> getSuccess() {
-
 
11524
      return this.success;
-
 
11525
    }
-
 
11526
 
-
 
11527
    public void setSuccess(List<InventoryAge> success) {
-
 
11528
      this.success = success;
-
 
11529
    }
-
 
11530
 
-
 
11531
    public void unsetSuccess() {
-
 
11532
      this.success = null;
-
 
11533
    }
-
 
11534
 
-
 
11535
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
11536
    public boolean isSetSuccess() {
-
 
11537
      return this.success != null;
-
 
11538
    }
-
 
11539
 
-
 
11540
    public void setSuccessIsSet(boolean value) {
-
 
11541
      if (!value) {
-
 
11542
        this.success = null;
-
 
11543
      }
-
 
11544
    }
-
 
11545
 
-
 
11546
    public void setFieldValue(_Fields field, Object value) {
-
 
11547
      switch (field) {
-
 
11548
      case SUCCESS:
-
 
11549
        if (value == null) {
-
 
11550
          unsetSuccess();
-
 
11551
        } else {
-
 
11552
          setSuccess((List<InventoryAge>)value);
-
 
11553
        }
-
 
11554
        break;
-
 
11555
 
-
 
11556
      }
-
 
11557
    }
-
 
11558
 
-
 
11559
    public Object getFieldValue(_Fields field) {
-
 
11560
      switch (field) {
-
 
11561
      case SUCCESS:
-
 
11562
        return getSuccess();
-
 
11563
 
-
 
11564
      }
-
 
11565
      throw new IllegalStateException();
-
 
11566
    }
-
 
11567
 
-
 
11568
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
11569
    public boolean isSet(_Fields field) {
-
 
11570
      if (field == null) {
-
 
11571
        throw new IllegalArgumentException();
-
 
11572
      }
-
 
11573
 
-
 
11574
      switch (field) {
-
 
11575
      case SUCCESS:
-
 
11576
        return isSetSuccess();
-
 
11577
      }
-
 
11578
      throw new IllegalStateException();
-
 
11579
    }
-
 
11580
 
-
 
11581
    @Override
-
 
11582
    public boolean equals(Object that) {
-
 
11583
      if (that == null)
-
 
11584
        return false;
-
 
11585
      if (that instanceof getInventoryAge_result)
-
 
11586
        return this.equals((getInventoryAge_result)that);
-
 
11587
      return false;
-
 
11588
    }
-
 
11589
 
-
 
11590
    public boolean equals(getInventoryAge_result that) {
-
 
11591
      if (that == null)
-
 
11592
        return false;
-
 
11593
 
-
 
11594
      boolean this_present_success = true && this.isSetSuccess();
-
 
11595
      boolean that_present_success = true && that.isSetSuccess();
-
 
11596
      if (this_present_success || that_present_success) {
-
 
11597
        if (!(this_present_success && that_present_success))
-
 
11598
          return false;
-
 
11599
        if (!this.success.equals(that.success))
-
 
11600
          return false;
-
 
11601
      }
-
 
11602
 
-
 
11603
      return true;
-
 
11604
    }
-
 
11605
 
-
 
11606
    @Override
-
 
11607
    public int hashCode() {
-
 
11608
      return 0;
-
 
11609
    }
-
 
11610
 
-
 
11611
    public int compareTo(getInventoryAge_result other) {
-
 
11612
      if (!getClass().equals(other.getClass())) {
-
 
11613
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11614
      }
-
 
11615
 
-
 
11616
      int lastComparison = 0;
-
 
11617
      getInventoryAge_result typedOther = (getInventoryAge_result)other;
-
 
11618
 
-
 
11619
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
11620
      if (lastComparison != 0) {
-
 
11621
        return lastComparison;
-
 
11622
      }
-
 
11623
      if (isSetSuccess()) {
-
 
11624
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
11625
        if (lastComparison != 0) {
-
 
11626
          return lastComparison;
-
 
11627
        }
-
 
11628
      }
-
 
11629
      return 0;
-
 
11630
    }
-
 
11631
 
-
 
11632
    public _Fields fieldForId(int fieldId) {
-
 
11633
      return _Fields.findByThriftId(fieldId);
-
 
11634
    }
-
 
11635
 
-
 
11636
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11637
      org.apache.thrift.protocol.TField field;
-
 
11638
      iprot.readStructBegin();
-
 
11639
      while (true)
-
 
11640
      {
-
 
11641
        field = iprot.readFieldBegin();
-
 
11642
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11643
          break;
-
 
11644
        }
-
 
11645
        switch (field.id) {
-
 
11646
          case 0: // SUCCESS
-
 
11647
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
11648
              {
-
 
11649
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
-
 
11650
                this.success = new ArrayList<InventoryAge>(_list20.size);
-
 
11651
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
-
 
11652
                {
-
 
11653
                  InventoryAge _elem22; // required
-
 
11654
                  _elem22 = new InventoryAge();
-
 
11655
                  _elem22.read(iprot);
-
 
11656
                  this.success.add(_elem22);
-
 
11657
                }
-
 
11658
                iprot.readListEnd();
-
 
11659
              }
-
 
11660
            } else { 
-
 
11661
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11662
            }
-
 
11663
            break;
-
 
11664
          default:
-
 
11665
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11666
        }
-
 
11667
        iprot.readFieldEnd();
-
 
11668
      }
-
 
11669
      iprot.readStructEnd();
-
 
11670
      validate();
-
 
11671
    }
-
 
11672
 
-
 
11673
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11674
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11675
 
-
 
11676
      if (this.isSetSuccess()) {
-
 
11677
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
11678
        {
-
 
11679
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
11680
          for (InventoryAge _iter23 : this.success)
-
 
11681
          {
-
 
11682
            _iter23.write(oprot);
-
 
11683
          }
-
 
11684
          oprot.writeListEnd();
-
 
11685
        }
-
 
11686
        oprot.writeFieldEnd();
-
 
11687
      }
-
 
11688
      oprot.writeFieldStop();
-
 
11689
      oprot.writeStructEnd();
-
 
11690
    }
-
 
11691
 
-
 
11692
    @Override
-
 
11693
    public String toString() {
-
 
11694
      StringBuilder sb = new StringBuilder("getInventoryAge_result(");
-
 
11695
      boolean first = true;
-
 
11696
 
-
 
11697
      sb.append("success:");
-
 
11698
      if (this.success == null) {
-
 
11699
        sb.append("null");
-
 
11700
      } else {
-
 
11701
        sb.append(this.success);
-
 
11702
      }
-
 
11703
      first = false;
-
 
11704
      sb.append(")");
-
 
11705
      return sb.toString();
-
 
11706
    }
11099
 
11707
 
11100
    public void validate() throws org.apache.thrift.TException {
11708
    public void validate() throws org.apache.thrift.TException {
11101
      // check for required fields
11709
      // check for required fields
11102
    }
11710
    }
11103
 
11711