Subversion Repositories SmartDukaan

Rev

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

Rev 6880 Rev 7190
Line 216... Line 216...
216
 
216
 
217
    public List<InventoryMovement> getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
217
    public List<InventoryMovement> getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
218
 
218
 
219
    public List<InventoryMovement> getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
219
    public List<InventoryMovement> getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
220
 
220
 
-
 
221
    public InventoryItem scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException;
-
 
222
 
221
  }
223
  }
222
 
224
 
223
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
225
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
224
 
226
 
225
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
227
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
Line 272... Line 274...
272
 
274
 
273
    public void getMovementNonSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
275
    public void getMovementNonSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
274
 
276
 
275
    public void getMovementSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
277
    public void getMovementSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
276
 
278
 
-
 
279
    public void scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanfreebie_call> resultHandler) throws org.apache.thrift.TException;
-
 
280
 
277
  }
281
  }
278
 
282
 
279
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
283
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
280
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
284
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
281
      public Factory() {}
285
      public Factory() {}
Line 937... Line 941...
937
        return result.success;
941
        return result.success;
938
      }
942
      }
939
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMovementSerializedInventoryByScans failed: unknown result");
943
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMovementSerializedInventoryByScans failed: unknown result");
940
    }
944
    }
941
 
945
 
-
 
946
    public InventoryItem scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException
-
 
947
    {
-
 
948
      send_scanfreebie(orderId, freebieItemId, freebieWarehouseId, scanType);
-
 
949
      return recv_scanfreebie();
-
 
950
    }
-
 
951
 
-
 
952
    public void send_scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws org.apache.thrift.TException
-
 
953
    {
-
 
954
      scanfreebie_args args = new scanfreebie_args();
-
 
955
      args.setOrderId(orderId);
-
 
956
      args.setFreebieItemId(freebieItemId);
-
 
957
      args.setFreebieWarehouseId(freebieWarehouseId);
-
 
958
      args.setScanType(scanType);
-
 
959
      sendBase("scanfreebie", args);
-
 
960
    }
-
 
961
 
-
 
962
    public InventoryItem recv_scanfreebie() throws WarehouseServiceException, org.apache.thrift.TException
-
 
963
    {
-
 
964
      scanfreebie_result result = new scanfreebie_result();
-
 
965
      receiveBase(result, "scanfreebie");
-
 
966
      if (result.isSetSuccess()) {
-
 
967
        return result.success;
-
 
968
      }
-
 
969
      if (result.wex != null) {
-
 
970
        throw result.wex;
-
 
971
      }
-
 
972
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanfreebie failed: unknown result");
-
 
973
    }
-
 
974
 
942
  }
975
  }
943
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
976
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
944
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
977
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
945
      private org.apache.thrift.async.TAsyncClientManager clientManager;
978
      private org.apache.thrift.async.TAsyncClientManager clientManager;
946
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
979
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 1868... Line 1901...
1868
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1901
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1869
        return (new Client(prot)).recv_getMovementSerializedInventoryByScans();
1902
        return (new Client(prot)).recv_getMovementSerializedInventoryByScans();
1870
      }
1903
      }
1871
    }
1904
    }
1872
 
1905
 
-
 
1906
    public void scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<scanfreebie_call> resultHandler) throws org.apache.thrift.TException {
-
 
1907
      checkReady();
-
 
1908
      scanfreebie_call method_call = new scanfreebie_call(orderId, freebieItemId, freebieWarehouseId, scanType, resultHandler, this, ___protocolFactory, ___transport);
-
 
1909
      this.___currentMethod = method_call;
-
 
1910
      ___manager.call(method_call);
-
 
1911
    }
-
 
1912
 
-
 
1913
    public static class scanfreebie_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1914
      private long orderId;
-
 
1915
      private long freebieItemId;
-
 
1916
      private long freebieWarehouseId;
-
 
1917
      private ScanType scanType;
-
 
1918
      public scanfreebie_call(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<scanfreebie_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 {
-
 
1919
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1920
        this.orderId = orderId;
-
 
1921
        this.freebieItemId = freebieItemId;
-
 
1922
        this.freebieWarehouseId = freebieWarehouseId;
-
 
1923
        this.scanType = scanType;
-
 
1924
      }
-
 
1925
 
-
 
1926
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1927
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanfreebie", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1928
        scanfreebie_args args = new scanfreebie_args();
-
 
1929
        args.setOrderId(orderId);
-
 
1930
        args.setFreebieItemId(freebieItemId);
-
 
1931
        args.setFreebieWarehouseId(freebieWarehouseId);
-
 
1932
        args.setScanType(scanType);
-
 
1933
        args.write(prot);
-
 
1934
        prot.writeMessageEnd();
-
 
1935
      }
-
 
1936
 
-
 
1937
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
-
 
1938
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1939
          throw new IllegalStateException("Method call not finished!");
-
 
1940
        }
-
 
1941
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1942
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1943
        return (new Client(prot)).recv_scanfreebie();
-
 
1944
      }
-
 
1945
    }
-
 
1946
 
1873
  }
1947
  }
1874
 
1948
 
1875
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1949
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1876
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1950
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1877
    public Processor(I iface) {
1951
    public Processor(I iface) {
Line 1907... Line 1981...
1907
      processMap.put("getHistoricNonSerializedInventoryByScans", new getHistoricNonSerializedInventoryByScans());
1981
      processMap.put("getHistoricNonSerializedInventoryByScans", new getHistoricNonSerializedInventoryByScans());
1908
      processMap.put("scanForOursExternalSale", new scanForOursExternalSale());
1982
      processMap.put("scanForOursExternalSale", new scanForOursExternalSale());
1909
      processMap.put("scanForOursExternalSaleReturn", new scanForOursExternalSaleReturn());
1983
      processMap.put("scanForOursExternalSaleReturn", new scanForOursExternalSaleReturn());
1910
      processMap.put("getMovementNonSerializedInventoryByScans", new getMovementNonSerializedInventoryByScans());
1984
      processMap.put("getMovementNonSerializedInventoryByScans", new getMovementNonSerializedInventoryByScans());
1911
      processMap.put("getMovementSerializedInventoryByScans", new getMovementSerializedInventoryByScans());
1985
      processMap.put("getMovementSerializedInventoryByScans", new getMovementSerializedInventoryByScans());
-
 
1986
      processMap.put("scanfreebie", new scanfreebie());
1912
      return processMap;
1987
      return processMap;
1913
    }
1988
    }
1914
 
1989
 
1915
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1990
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1916
      public getInventoryItem() {
1991
      public getInventoryItem() {
Line 2370... Line 2445...
2370
        result.success = iface.getMovementSerializedInventoryByScans(args.startDate, args.endDate);
2445
        result.success = iface.getMovementSerializedInventoryByScans(args.startDate, args.endDate);
2371
        return result;
2446
        return result;
2372
      }
2447
      }
2373
    }
2448
    }
2374
 
2449
 
-
 
2450
    private static class scanfreebie<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanfreebie_args> {
-
 
2451
      public scanfreebie() {
-
 
2452
        super("scanfreebie");
-
 
2453
      }
-
 
2454
 
-
 
2455
      protected scanfreebie_args getEmptyArgsInstance() {
-
 
2456
        return new scanfreebie_args();
-
 
2457
      }
-
 
2458
 
-
 
2459
      protected scanfreebie_result getResult(I iface, scanfreebie_args args) throws org.apache.thrift.TException {
-
 
2460
        scanfreebie_result result = new scanfreebie_result();
-
 
2461
        try {
-
 
2462
          result.success = iface.scanfreebie(args.orderId, args.freebieItemId, args.freebieWarehouseId, args.scanType);
-
 
2463
        } catch (WarehouseServiceException wex) {
-
 
2464
          result.wex = wex;
-
 
2465
        }
-
 
2466
        return result;
-
 
2467
      }
-
 
2468
    }
-
 
2469
 
2375
  }
2470
  }
2376
 
2471
 
2377
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
2472
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
2378
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2473
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2379
 
2474
 
Line 21054... Line 21149...
21054
      }
21149
      }
21055
      first = false;
21150
      first = false;
21056
      sb.append(")");
21151
      sb.append(")");
21057
      return sb.toString();
21152
      return sb.toString();
21058
    }
21153
    }
-
 
21154
 
-
 
21155
    public void validate() throws org.apache.thrift.TException {
-
 
21156
      // check for required fields
-
 
21157
    }
-
 
21158
 
-
 
21159
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
21160
      try {
-
 
21161
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
21162
      } catch (org.apache.thrift.TException te) {
-
 
21163
        throw new java.io.IOException(te);
-
 
21164
      }
-
 
21165
    }
-
 
21166
 
-
 
21167
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
21168
      try {
-
 
21169
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
21170
      } catch (org.apache.thrift.TException te) {
-
 
21171
        throw new java.io.IOException(te);
-
 
21172
      }
-
 
21173
    }
-
 
21174
 
-
 
21175
  }
-
 
21176
 
-
 
21177
  public static class scanfreebie_args implements org.apache.thrift.TBase<scanfreebie_args, scanfreebie_args._Fields>, java.io.Serializable, Cloneable   {
-
 
21178
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanfreebie_args");
-
 
21179
 
-
 
21180
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
21181
    private static final org.apache.thrift.protocol.TField FREEBIE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieItemId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
21182
    private static final org.apache.thrift.protocol.TField FREEBIE_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieWarehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
-
 
21183
    private static final org.apache.thrift.protocol.TField SCAN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("scanType", org.apache.thrift.protocol.TType.I32, (short)4);
-
 
21184
 
-
 
21185
    private long orderId; // required
-
 
21186
    private long freebieItemId; // required
-
 
21187
    private long freebieWarehouseId; // required
-
 
21188
    private ScanType scanType; // required
-
 
21189
 
-
 
21190
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
21191
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
21192
      ORDER_ID((short)1, "orderId"),
-
 
21193
      FREEBIE_ITEM_ID((short)2, "freebieItemId"),
-
 
21194
      FREEBIE_WAREHOUSE_ID((short)3, "freebieWarehouseId"),
-
 
21195
      /**
-
 
21196
       * 
-
 
21197
       * @see ScanType
-
 
21198
       */
-
 
21199
      SCAN_TYPE((short)4, "scanType");
-
 
21200
 
-
 
21201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
21202
 
-
 
21203
      static {
-
 
21204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
21205
          byName.put(field.getFieldName(), field);
-
 
21206
        }
-
 
21207
      }
-
 
21208
 
-
 
21209
      /**
-
 
21210
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
21211
       */
-
 
21212
      public static _Fields findByThriftId(int fieldId) {
-
 
21213
        switch(fieldId) {
-
 
21214
          case 1: // ORDER_ID
-
 
21215
            return ORDER_ID;
-
 
21216
          case 2: // FREEBIE_ITEM_ID
-
 
21217
            return FREEBIE_ITEM_ID;
-
 
21218
          case 3: // FREEBIE_WAREHOUSE_ID
-
 
21219
            return FREEBIE_WAREHOUSE_ID;
-
 
21220
          case 4: // SCAN_TYPE
-
 
21221
            return SCAN_TYPE;
-
 
21222
          default:
-
 
21223
            return null;
-
 
21224
        }
-
 
21225
      }
-
 
21226
 
-
 
21227
      /**
-
 
21228
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
21229
       * if it is not found.
-
 
21230
       */
-
 
21231
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
21232
        _Fields fields = findByThriftId(fieldId);
-
 
21233
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
21234
        return fields;
-
 
21235
      }
-
 
21236
 
-
 
21237
      /**
-
 
21238
       * Find the _Fields constant that matches name, or null if its not found.
-
 
21239
       */
-
 
21240
      public static _Fields findByName(String name) {
-
 
21241
        return byName.get(name);
-
 
21242
      }
-
 
21243
 
-
 
21244
      private final short _thriftId;
-
 
21245
      private final String _fieldName;
-
 
21246
 
-
 
21247
      _Fields(short thriftId, String fieldName) {
-
 
21248
        _thriftId = thriftId;
-
 
21249
        _fieldName = fieldName;
-
 
21250
      }
-
 
21251
 
-
 
21252
      public short getThriftFieldId() {
-
 
21253
        return _thriftId;
-
 
21254
      }
-
 
21255
 
-
 
21256
      public String getFieldName() {
-
 
21257
        return _fieldName;
-
 
21258
      }
-
 
21259
    }
-
 
21260
 
-
 
21261
    // isset id assignments
-
 
21262
    private static final int __ORDERID_ISSET_ID = 0;
-
 
21263
    private static final int __FREEBIEITEMID_ISSET_ID = 1;
-
 
21264
    private static final int __FREEBIEWAREHOUSEID_ISSET_ID = 2;
-
 
21265
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
21266
 
-
 
21267
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
21268
    static {
-
 
21269
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
21270
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
21271
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
21272
      tmpMap.put(_Fields.FREEBIE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
21273
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
21274
      tmpMap.put(_Fields.FREEBIE_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
21275
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
21276
      tmpMap.put(_Fields.SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("scanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
21277
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
-
 
21278
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
21279
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanfreebie_args.class, metaDataMap);
-
 
21280
    }
-
 
21281
 
-
 
21282
    public scanfreebie_args() {
-
 
21283
    }
-
 
21284
 
-
 
21285
    public scanfreebie_args(
-
 
21286
      long orderId,
-
 
21287
      long freebieItemId,
-
 
21288
      long freebieWarehouseId,
-
 
21289
      ScanType scanType)
-
 
21290
    {
-
 
21291
      this();
-
 
21292
      this.orderId = orderId;
-
 
21293
      setOrderIdIsSet(true);
-
 
21294
      this.freebieItemId = freebieItemId;
-
 
21295
      setFreebieItemIdIsSet(true);
-
 
21296
      this.freebieWarehouseId = freebieWarehouseId;
-
 
21297
      setFreebieWarehouseIdIsSet(true);
-
 
21298
      this.scanType = scanType;
-
 
21299
    }
-
 
21300
 
-
 
21301
    /**
-
 
21302
     * Performs a deep copy on <i>other</i>.
-
 
21303
     */
-
 
21304
    public scanfreebie_args(scanfreebie_args other) {
-
 
21305
      __isset_bit_vector.clear();
-
 
21306
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
21307
      this.orderId = other.orderId;
-
 
21308
      this.freebieItemId = other.freebieItemId;
-
 
21309
      this.freebieWarehouseId = other.freebieWarehouseId;
-
 
21310
      if (other.isSetScanType()) {
-
 
21311
        this.scanType = other.scanType;
-
 
21312
      }
-
 
21313
    }
-
 
21314
 
-
 
21315
    public scanfreebie_args deepCopy() {
-
 
21316
      return new scanfreebie_args(this);
-
 
21317
    }
-
 
21318
 
-
 
21319
    @Override
-
 
21320
    public void clear() {
-
 
21321
      setOrderIdIsSet(false);
-
 
21322
      this.orderId = 0;
-
 
21323
      setFreebieItemIdIsSet(false);
-
 
21324
      this.freebieItemId = 0;
-
 
21325
      setFreebieWarehouseIdIsSet(false);
-
 
21326
      this.freebieWarehouseId = 0;
-
 
21327
      this.scanType = null;
-
 
21328
    }
-
 
21329
 
-
 
21330
    public long getOrderId() {
-
 
21331
      return this.orderId;
-
 
21332
    }
-
 
21333
 
-
 
21334
    public void setOrderId(long orderId) {
-
 
21335
      this.orderId = orderId;
-
 
21336
      setOrderIdIsSet(true);
-
 
21337
    }
-
 
21338
 
-
 
21339
    public void unsetOrderId() {
-
 
21340
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
-
 
21341
    }
-
 
21342
 
-
 
21343
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
-
 
21344
    public boolean isSetOrderId() {
-
 
21345
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
-
 
21346
    }
-
 
21347
 
-
 
21348
    public void setOrderIdIsSet(boolean value) {
-
 
21349
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
-
 
21350
    }
-
 
21351
 
-
 
21352
    public long getFreebieItemId() {
-
 
21353
      return this.freebieItemId;
-
 
21354
    }
-
 
21355
 
-
 
21356
    public void setFreebieItemId(long freebieItemId) {
-
 
21357
      this.freebieItemId = freebieItemId;
-
 
21358
      setFreebieItemIdIsSet(true);
-
 
21359
    }
-
 
21360
 
-
 
21361
    public void unsetFreebieItemId() {
-
 
21362
      __isset_bit_vector.clear(__FREEBIEITEMID_ISSET_ID);
-
 
21363
    }
-
 
21364
 
-
 
21365
    /** Returns true if field freebieItemId is set (has been assigned a value) and false otherwise */
-
 
21366
    public boolean isSetFreebieItemId() {
-
 
21367
      return __isset_bit_vector.get(__FREEBIEITEMID_ISSET_ID);
-
 
21368
    }
-
 
21369
 
-
 
21370
    public void setFreebieItemIdIsSet(boolean value) {
-
 
21371
      __isset_bit_vector.set(__FREEBIEITEMID_ISSET_ID, value);
-
 
21372
    }
-
 
21373
 
-
 
21374
    public long getFreebieWarehouseId() {
-
 
21375
      return this.freebieWarehouseId;
-
 
21376
    }
-
 
21377
 
-
 
21378
    public void setFreebieWarehouseId(long freebieWarehouseId) {
-
 
21379
      this.freebieWarehouseId = freebieWarehouseId;
-
 
21380
      setFreebieWarehouseIdIsSet(true);
-
 
21381
    }
-
 
21382
 
-
 
21383
    public void unsetFreebieWarehouseId() {
-
 
21384
      __isset_bit_vector.clear(__FREEBIEWAREHOUSEID_ISSET_ID);
-
 
21385
    }
-
 
21386
 
-
 
21387
    /** Returns true if field freebieWarehouseId is set (has been assigned a value) and false otherwise */
-
 
21388
    public boolean isSetFreebieWarehouseId() {
-
 
21389
      return __isset_bit_vector.get(__FREEBIEWAREHOUSEID_ISSET_ID);
-
 
21390
    }
-
 
21391
 
-
 
21392
    public void setFreebieWarehouseIdIsSet(boolean value) {
-
 
21393
      __isset_bit_vector.set(__FREEBIEWAREHOUSEID_ISSET_ID, value);
-
 
21394
    }
-
 
21395
 
-
 
21396
    /**
-
 
21397
     * 
-
 
21398
     * @see ScanType
-
 
21399
     */
-
 
21400
    public ScanType getScanType() {
-
 
21401
      return this.scanType;
-
 
21402
    }
-
 
21403
 
-
 
21404
    /**
-
 
21405
     * 
-
 
21406
     * @see ScanType
-
 
21407
     */
-
 
21408
    public void setScanType(ScanType scanType) {
-
 
21409
      this.scanType = scanType;
-
 
21410
    }
-
 
21411
 
-
 
21412
    public void unsetScanType() {
-
 
21413
      this.scanType = null;
-
 
21414
    }
-
 
21415
 
-
 
21416
    /** Returns true if field scanType is set (has been assigned a value) and false otherwise */
-
 
21417
    public boolean isSetScanType() {
-
 
21418
      return this.scanType != null;
-
 
21419
    }
-
 
21420
 
-
 
21421
    public void setScanTypeIsSet(boolean value) {
-
 
21422
      if (!value) {
-
 
21423
        this.scanType = null;
-
 
21424
      }
-
 
21425
    }
-
 
21426
 
-
 
21427
    public void setFieldValue(_Fields field, Object value) {
-
 
21428
      switch (field) {
-
 
21429
      case ORDER_ID:
-
 
21430
        if (value == null) {
-
 
21431
          unsetOrderId();
-
 
21432
        } else {
-
 
21433
          setOrderId((Long)value);
-
 
21434
        }
-
 
21435
        break;
-
 
21436
 
-
 
21437
      case FREEBIE_ITEM_ID:
-
 
21438
        if (value == null) {
-
 
21439
          unsetFreebieItemId();
-
 
21440
        } else {
-
 
21441
          setFreebieItemId((Long)value);
-
 
21442
        }
-
 
21443
        break;
-
 
21444
 
-
 
21445
      case FREEBIE_WAREHOUSE_ID:
-
 
21446
        if (value == null) {
-
 
21447
          unsetFreebieWarehouseId();
-
 
21448
        } else {
-
 
21449
          setFreebieWarehouseId((Long)value);
-
 
21450
        }
-
 
21451
        break;
-
 
21452
 
-
 
21453
      case SCAN_TYPE:
-
 
21454
        if (value == null) {
-
 
21455
          unsetScanType();
-
 
21456
        } else {
-
 
21457
          setScanType((ScanType)value);
-
 
21458
        }
-
 
21459
        break;
-
 
21460
 
-
 
21461
      }
-
 
21462
    }
-
 
21463
 
-
 
21464
    public Object getFieldValue(_Fields field) {
-
 
21465
      switch (field) {
-
 
21466
      case ORDER_ID:
-
 
21467
        return Long.valueOf(getOrderId());
-
 
21468
 
-
 
21469
      case FREEBIE_ITEM_ID:
-
 
21470
        return Long.valueOf(getFreebieItemId());
-
 
21471
 
-
 
21472
      case FREEBIE_WAREHOUSE_ID:
-
 
21473
        return Long.valueOf(getFreebieWarehouseId());
-
 
21474
 
-
 
21475
      case SCAN_TYPE:
-
 
21476
        return getScanType();
-
 
21477
 
-
 
21478
      }
-
 
21479
      throw new IllegalStateException();
-
 
21480
    }
-
 
21481
 
-
 
21482
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
21483
    public boolean isSet(_Fields field) {
-
 
21484
      if (field == null) {
-
 
21485
        throw new IllegalArgumentException();
-
 
21486
      }
-
 
21487
 
-
 
21488
      switch (field) {
-
 
21489
      case ORDER_ID:
-
 
21490
        return isSetOrderId();
-
 
21491
      case FREEBIE_ITEM_ID:
-
 
21492
        return isSetFreebieItemId();
-
 
21493
      case FREEBIE_WAREHOUSE_ID:
-
 
21494
        return isSetFreebieWarehouseId();
-
 
21495
      case SCAN_TYPE:
-
 
21496
        return isSetScanType();
-
 
21497
      }
-
 
21498
      throw new IllegalStateException();
-
 
21499
    }
-
 
21500
 
-
 
21501
    @Override
-
 
21502
    public boolean equals(Object that) {
-
 
21503
      if (that == null)
-
 
21504
        return false;
-
 
21505
      if (that instanceof scanfreebie_args)
-
 
21506
        return this.equals((scanfreebie_args)that);
-
 
21507
      return false;
-
 
21508
    }
-
 
21509
 
-
 
21510
    public boolean equals(scanfreebie_args that) {
-
 
21511
      if (that == null)
-
 
21512
        return false;
-
 
21513
 
-
 
21514
      boolean this_present_orderId = true;
-
 
21515
      boolean that_present_orderId = true;
-
 
21516
      if (this_present_orderId || that_present_orderId) {
-
 
21517
        if (!(this_present_orderId && that_present_orderId))
-
 
21518
          return false;
-
 
21519
        if (this.orderId != that.orderId)
-
 
21520
          return false;
-
 
21521
      }
-
 
21522
 
-
 
21523
      boolean this_present_freebieItemId = true;
-
 
21524
      boolean that_present_freebieItemId = true;
-
 
21525
      if (this_present_freebieItemId || that_present_freebieItemId) {
-
 
21526
        if (!(this_present_freebieItemId && that_present_freebieItemId))
-
 
21527
          return false;
-
 
21528
        if (this.freebieItemId != that.freebieItemId)
-
 
21529
          return false;
-
 
21530
      }
-
 
21531
 
-
 
21532
      boolean this_present_freebieWarehouseId = true;
-
 
21533
      boolean that_present_freebieWarehouseId = true;
-
 
21534
      if (this_present_freebieWarehouseId || that_present_freebieWarehouseId) {
-
 
21535
        if (!(this_present_freebieWarehouseId && that_present_freebieWarehouseId))
-
 
21536
          return false;
-
 
21537
        if (this.freebieWarehouseId != that.freebieWarehouseId)
-
 
21538
          return false;
-
 
21539
      }
-
 
21540
 
-
 
21541
      boolean this_present_scanType = true && this.isSetScanType();
-
 
21542
      boolean that_present_scanType = true && that.isSetScanType();
-
 
21543
      if (this_present_scanType || that_present_scanType) {
-
 
21544
        if (!(this_present_scanType && that_present_scanType))
-
 
21545
          return false;
-
 
21546
        if (!this.scanType.equals(that.scanType))
-
 
21547
          return false;
-
 
21548
      }
-
 
21549
 
-
 
21550
      return true;
-
 
21551
    }
-
 
21552
 
-
 
21553
    @Override
-
 
21554
    public int hashCode() {
-
 
21555
      return 0;
-
 
21556
    }
-
 
21557
 
-
 
21558
    public int compareTo(scanfreebie_args other) {
-
 
21559
      if (!getClass().equals(other.getClass())) {
-
 
21560
        return getClass().getName().compareTo(other.getClass().getName());
-
 
21561
      }
-
 
21562
 
-
 
21563
      int lastComparison = 0;
-
 
21564
      scanfreebie_args typedOther = (scanfreebie_args)other;
-
 
21565
 
-
 
21566
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
-
 
21567
      if (lastComparison != 0) {
-
 
21568
        return lastComparison;
-
 
21569
      }
-
 
21570
      if (isSetOrderId()) {
-
 
21571
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
-
 
21572
        if (lastComparison != 0) {
-
 
21573
          return lastComparison;
-
 
21574
        }
-
 
21575
      }
-
 
21576
      lastComparison = Boolean.valueOf(isSetFreebieItemId()).compareTo(typedOther.isSetFreebieItemId());
-
 
21577
      if (lastComparison != 0) {
-
 
21578
        return lastComparison;
-
 
21579
      }
-
 
21580
      if (isSetFreebieItemId()) {
-
 
21581
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieItemId, typedOther.freebieItemId);
-
 
21582
        if (lastComparison != 0) {
-
 
21583
          return lastComparison;
-
 
21584
        }
-
 
21585
      }
-
 
21586
      lastComparison = Boolean.valueOf(isSetFreebieWarehouseId()).compareTo(typedOther.isSetFreebieWarehouseId());
-
 
21587
      if (lastComparison != 0) {
-
 
21588
        return lastComparison;
-
 
21589
      }
-
 
21590
      if (isSetFreebieWarehouseId()) {
-
 
21591
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieWarehouseId, typedOther.freebieWarehouseId);
-
 
21592
        if (lastComparison != 0) {
-
 
21593
          return lastComparison;
-
 
21594
        }
-
 
21595
      }
-
 
21596
      lastComparison = Boolean.valueOf(isSetScanType()).compareTo(typedOther.isSetScanType());
-
 
21597
      if (lastComparison != 0) {
-
 
21598
        return lastComparison;
-
 
21599
      }
-
 
21600
      if (isSetScanType()) {
-
 
21601
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scanType, typedOther.scanType);
-
 
21602
        if (lastComparison != 0) {
-
 
21603
          return lastComparison;
-
 
21604
        }
-
 
21605
      }
-
 
21606
      return 0;
-
 
21607
    }
-
 
21608
 
-
 
21609
    public _Fields fieldForId(int fieldId) {
-
 
21610
      return _Fields.findByThriftId(fieldId);
-
 
21611
    }
-
 
21612
 
-
 
21613
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
21614
      org.apache.thrift.protocol.TField field;
-
 
21615
      iprot.readStructBegin();
-
 
21616
      while (true)
-
 
21617
      {
-
 
21618
        field = iprot.readFieldBegin();
-
 
21619
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
21620
          break;
-
 
21621
        }
-
 
21622
        switch (field.id) {
-
 
21623
          case 1: // ORDER_ID
-
 
21624
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
21625
              this.orderId = iprot.readI64();
-
 
21626
              setOrderIdIsSet(true);
-
 
21627
            } else { 
-
 
21628
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
21629
            }
-
 
21630
            break;
-
 
21631
          case 2: // FREEBIE_ITEM_ID
-
 
21632
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
21633
              this.freebieItemId = iprot.readI64();
-
 
21634
              setFreebieItemIdIsSet(true);
-
 
21635
            } else { 
-
 
21636
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
21637
            }
-
 
21638
            break;
-
 
21639
          case 3: // FREEBIE_WAREHOUSE_ID
-
 
21640
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
21641
              this.freebieWarehouseId = iprot.readI64();
-
 
21642
              setFreebieWarehouseIdIsSet(true);
-
 
21643
            } else { 
-
 
21644
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
21645
            }
-
 
21646
            break;
-
 
21647
          case 4: // SCAN_TYPE
-
 
21648
            if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
21649
              this.scanType = ScanType.findByValue(iprot.readI32());
-
 
21650
            } else { 
-
 
21651
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
21652
            }
-
 
21653
            break;
-
 
21654
          default:
-
 
21655
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
21656
        }
-
 
21657
        iprot.readFieldEnd();
-
 
21658
      }
-
 
21659
      iprot.readStructEnd();
-
 
21660
      validate();
-
 
21661
    }
-
 
21662
 
-
 
21663
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
21664
      validate();
-
 
21665
 
-
 
21666
      oprot.writeStructBegin(STRUCT_DESC);
-
 
21667
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
21668
      oprot.writeI64(this.orderId);
-
 
21669
      oprot.writeFieldEnd();
-
 
21670
      oprot.writeFieldBegin(FREEBIE_ITEM_ID_FIELD_DESC);
-
 
21671
      oprot.writeI64(this.freebieItemId);
-
 
21672
      oprot.writeFieldEnd();
-
 
21673
      oprot.writeFieldBegin(FREEBIE_WAREHOUSE_ID_FIELD_DESC);
-
 
21674
      oprot.writeI64(this.freebieWarehouseId);
-
 
21675
      oprot.writeFieldEnd();
-
 
21676
      if (this.scanType != null) {
-
 
21677
        oprot.writeFieldBegin(SCAN_TYPE_FIELD_DESC);
-
 
21678
        oprot.writeI32(this.scanType.getValue());
-
 
21679
        oprot.writeFieldEnd();
-
 
21680
      }
-
 
21681
      oprot.writeFieldStop();
-
 
21682
      oprot.writeStructEnd();
-
 
21683
    }
-
 
21684
 
-
 
21685
    @Override
-
 
21686
    public String toString() {
-
 
21687
      StringBuilder sb = new StringBuilder("scanfreebie_args(");
-
 
21688
      boolean first = true;
-
 
21689
 
-
 
21690
      sb.append("orderId:");
-
 
21691
      sb.append(this.orderId);
-
 
21692
      first = false;
-
 
21693
      if (!first) sb.append(", ");
-
 
21694
      sb.append("freebieItemId:");
-
 
21695
      sb.append(this.freebieItemId);
-
 
21696
      first = false;
-
 
21697
      if (!first) sb.append(", ");
-
 
21698
      sb.append("freebieWarehouseId:");
-
 
21699
      sb.append(this.freebieWarehouseId);
-
 
21700
      first = false;
-
 
21701
      if (!first) sb.append(", ");
-
 
21702
      sb.append("scanType:");
-
 
21703
      if (this.scanType == null) {
-
 
21704
        sb.append("null");
-
 
21705
      } else {
-
 
21706
        sb.append(this.scanType);
-
 
21707
      }
-
 
21708
      first = false;
-
 
21709
      sb.append(")");
-
 
21710
      return sb.toString();
-
 
21711
    }
-
 
21712
 
-
 
21713
    public void validate() throws org.apache.thrift.TException {
-
 
21714
      // check for required fields
-
 
21715
    }
-
 
21716
 
-
 
21717
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
21718
      try {
-
 
21719
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
21720
      } catch (org.apache.thrift.TException te) {
-
 
21721
        throw new java.io.IOException(te);
-
 
21722
      }
-
 
21723
    }
-
 
21724
 
-
 
21725
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
21726
      try {
-
 
21727
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
21728
        __isset_bit_vector = new BitSet(1);
-
 
21729
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
21730
      } catch (org.apache.thrift.TException te) {
-
 
21731
        throw new java.io.IOException(te);
-
 
21732
      }
-
 
21733
    }
-
 
21734
 
-
 
21735
  }
-
 
21736
 
-
 
21737
  public static class scanfreebie_result implements org.apache.thrift.TBase<scanfreebie_result, scanfreebie_result._Fields>, java.io.Serializable, Cloneable   {
-
 
21738
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanfreebie_result");
-
 
21739
 
-
 
21740
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
 
21741
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
21742
 
-
 
21743
    private InventoryItem success; // required
-
 
21744
    private WarehouseServiceException wex; // required
-
 
21745
 
-
 
21746
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
21747
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
21748
      SUCCESS((short)0, "success"),
-
 
21749
      WEX((short)1, "wex");
-
 
21750
 
-
 
21751
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
21752
 
-
 
21753
      static {
-
 
21754
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
21755
          byName.put(field.getFieldName(), field);
-
 
21756
        }
-
 
21757
      }
-
 
21758
 
-
 
21759
      /**
-
 
21760
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
21761
       */
-
 
21762
      public static _Fields findByThriftId(int fieldId) {
-
 
21763
        switch(fieldId) {
-
 
21764
          case 0: // SUCCESS
-
 
21765
            return SUCCESS;
-
 
21766
          case 1: // WEX
-
 
21767
            return WEX;
-
 
21768
          default:
-
 
21769
            return null;
-
 
21770
        }
-
 
21771
      }
-
 
21772
 
-
 
21773
      /**
-
 
21774
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
21775
       * if it is not found.
-
 
21776
       */
-
 
21777
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
21778
        _Fields fields = findByThriftId(fieldId);
-
 
21779
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
21780
        return fields;
-
 
21781
      }
-
 
21782
 
-
 
21783
      /**
-
 
21784
       * Find the _Fields constant that matches name, or null if its not found.
-
 
21785
       */
-
 
21786
      public static _Fields findByName(String name) {
-
 
21787
        return byName.get(name);
-
 
21788
      }
-
 
21789
 
-
 
21790
      private final short _thriftId;
-
 
21791
      private final String _fieldName;
-
 
21792
 
-
 
21793
      _Fields(short thriftId, String fieldName) {
-
 
21794
        _thriftId = thriftId;
-
 
21795
        _fieldName = fieldName;
-
 
21796
      }
-
 
21797
 
-
 
21798
      public short getThriftFieldId() {
-
 
21799
        return _thriftId;
-
 
21800
      }
-
 
21801
 
-
 
21802
      public String getFieldName() {
-
 
21803
        return _fieldName;
-
 
21804
      }
-
 
21805
    }
-
 
21806
 
-
 
21807
    // isset id assignments
-
 
21808
 
-
 
21809
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
21810
    static {
-
 
21811
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
21812
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
21813
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
-
 
21814
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
21815
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
21816
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
21817
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanfreebie_result.class, metaDataMap);
-
 
21818
    }
-
 
21819
 
-
 
21820
    public scanfreebie_result() {
-
 
21821
    }
-
 
21822
 
-
 
21823
    public scanfreebie_result(
-
 
21824
      InventoryItem success,
-
 
21825
      WarehouseServiceException wex)
-
 
21826
    {
-
 
21827
      this();
-
 
21828
      this.success = success;
-
 
21829
      this.wex = wex;
-
 
21830
    }
-
 
21831
 
-
 
21832
    /**
-
 
21833
     * Performs a deep copy on <i>other</i>.
-
 
21834
     */
-
 
21835
    public scanfreebie_result(scanfreebie_result other) {
-
 
21836
      if (other.isSetSuccess()) {
-
 
21837
        this.success = new InventoryItem(other.success);
-
 
21838
      }
-
 
21839
      if (other.isSetWex()) {
-
 
21840
        this.wex = new WarehouseServiceException(other.wex);
-
 
21841
      }
-
 
21842
    }
-
 
21843
 
-
 
21844
    public scanfreebie_result deepCopy() {
-
 
21845
      return new scanfreebie_result(this);
-
 
21846
    }
-
 
21847
 
-
 
21848
    @Override
-
 
21849
    public void clear() {
-
 
21850
      this.success = null;
-
 
21851
      this.wex = null;
-
 
21852
    }
-
 
21853
 
-
 
21854
    public InventoryItem getSuccess() {
-
 
21855
      return this.success;
-
 
21856
    }
-
 
21857
 
-
 
21858
    public void setSuccess(InventoryItem success) {
-
 
21859
      this.success = success;
-
 
21860
    }
-
 
21861
 
-
 
21862
    public void unsetSuccess() {
-
 
21863
      this.success = null;
-
 
21864
    }
-
 
21865
 
-
 
21866
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
21867
    public boolean isSetSuccess() {
-
 
21868
      return this.success != null;
-
 
21869
    }
-
 
21870
 
-
 
21871
    public void setSuccessIsSet(boolean value) {
-
 
21872
      if (!value) {
-
 
21873
        this.success = null;
-
 
21874
      }
-
 
21875
    }
-
 
21876
 
-
 
21877
    public WarehouseServiceException getWex() {
-
 
21878
      return this.wex;
-
 
21879
    }
-
 
21880
 
-
 
21881
    public void setWex(WarehouseServiceException wex) {
-
 
21882
      this.wex = wex;
-
 
21883
    }
-
 
21884
 
-
 
21885
    public void unsetWex() {
-
 
21886
      this.wex = null;
-
 
21887
    }
-
 
21888
 
-
 
21889
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
-
 
21890
    public boolean isSetWex() {
-
 
21891
      return this.wex != null;
-
 
21892
    }
-
 
21893
 
-
 
21894
    public void setWexIsSet(boolean value) {
-
 
21895
      if (!value) {
-
 
21896
        this.wex = null;
-
 
21897
      }
-
 
21898
    }
-
 
21899
 
-
 
21900
    public void setFieldValue(_Fields field, Object value) {
-
 
21901
      switch (field) {
-
 
21902
      case SUCCESS:
-
 
21903
        if (value == null) {
-
 
21904
          unsetSuccess();
-
 
21905
        } else {
-
 
21906
          setSuccess((InventoryItem)value);
-
 
21907
        }
-
 
21908
        break;
-
 
21909
 
-
 
21910
      case WEX:
-
 
21911
        if (value == null) {
-
 
21912
          unsetWex();
-
 
21913
        } else {
-
 
21914
          setWex((WarehouseServiceException)value);
-
 
21915
        }
-
 
21916
        break;
-
 
21917
 
-
 
21918
      }
-
 
21919
    }
-
 
21920
 
-
 
21921
    public Object getFieldValue(_Fields field) {
-
 
21922
      switch (field) {
-
 
21923
      case SUCCESS:
-
 
21924
        return getSuccess();
-
 
21925
 
-
 
21926
      case WEX:
-
 
21927
        return getWex();
-
 
21928
 
-
 
21929
      }
-
 
21930
      throw new IllegalStateException();
-
 
21931
    }
-
 
21932
 
-
 
21933
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
21934
    public boolean isSet(_Fields field) {
-
 
21935
      if (field == null) {
-
 
21936
        throw new IllegalArgumentException();
-
 
21937
      }
-
 
21938
 
-
 
21939
      switch (field) {
-
 
21940
      case SUCCESS:
-
 
21941
        return isSetSuccess();
-
 
21942
      case WEX:
-
 
21943
        return isSetWex();
-
 
21944
      }
-
 
21945
      throw new IllegalStateException();
-
 
21946
    }
-
 
21947
 
-
 
21948
    @Override
-
 
21949
    public boolean equals(Object that) {
-
 
21950
      if (that == null)
-
 
21951
        return false;
-
 
21952
      if (that instanceof scanfreebie_result)
-
 
21953
        return this.equals((scanfreebie_result)that);
-
 
21954
      return false;
-
 
21955
    }
-
 
21956
 
-
 
21957
    public boolean equals(scanfreebie_result that) {
-
 
21958
      if (that == null)
-
 
21959
        return false;
-
 
21960
 
-
 
21961
      boolean this_present_success = true && this.isSetSuccess();
-
 
21962
      boolean that_present_success = true && that.isSetSuccess();
-
 
21963
      if (this_present_success || that_present_success) {
-
 
21964
        if (!(this_present_success && that_present_success))
-
 
21965
          return false;
-
 
21966
        if (!this.success.equals(that.success))
-
 
21967
          return false;
-
 
21968
      }
-
 
21969
 
-
 
21970
      boolean this_present_wex = true && this.isSetWex();
-
 
21971
      boolean that_present_wex = true && that.isSetWex();
-
 
21972
      if (this_present_wex || that_present_wex) {
-
 
21973
        if (!(this_present_wex && that_present_wex))
-
 
21974
          return false;
-
 
21975
        if (!this.wex.equals(that.wex))
-
 
21976
          return false;
-
 
21977
      }
-
 
21978
 
-
 
21979
      return true;
-
 
21980
    }
-
 
21981
 
-
 
21982
    @Override
-
 
21983
    public int hashCode() {
-
 
21984
      return 0;
-
 
21985
    }
-
 
21986
 
-
 
21987
    public int compareTo(scanfreebie_result other) {
-
 
21988
      if (!getClass().equals(other.getClass())) {
-
 
21989
        return getClass().getName().compareTo(other.getClass().getName());
-
 
21990
      }
-
 
21991
 
-
 
21992
      int lastComparison = 0;
-
 
21993
      scanfreebie_result typedOther = (scanfreebie_result)other;
-
 
21994
 
-
 
21995
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
21996
      if (lastComparison != 0) {
-
 
21997
        return lastComparison;
-
 
21998
      }
-
 
21999
      if (isSetSuccess()) {
-
 
22000
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
22001
        if (lastComparison != 0) {
-
 
22002
          return lastComparison;
-
 
22003
        }
-
 
22004
      }
-
 
22005
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
-
 
22006
      if (lastComparison != 0) {
-
 
22007
        return lastComparison;
-
 
22008
      }
-
 
22009
      if (isSetWex()) {
-
 
22010
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
-
 
22011
        if (lastComparison != 0) {
-
 
22012
          return lastComparison;
-
 
22013
        }
-
 
22014
      }
-
 
22015
      return 0;
-
 
22016
    }
-
 
22017
 
-
 
22018
    public _Fields fieldForId(int fieldId) {
-
 
22019
      return _Fields.findByThriftId(fieldId);
-
 
22020
    }
-
 
22021
 
-
 
22022
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
22023
      org.apache.thrift.protocol.TField field;
-
 
22024
      iprot.readStructBegin();
-
 
22025
      while (true)
-
 
22026
      {
-
 
22027
        field = iprot.readFieldBegin();
-
 
22028
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
22029
          break;
-
 
22030
        }
-
 
22031
        switch (field.id) {
-
 
22032
          case 0: // SUCCESS
-
 
22033
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
22034
              this.success = new InventoryItem();
-
 
22035
              this.success.read(iprot);
-
 
22036
            } else { 
-
 
22037
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
22038
            }
-
 
22039
            break;
-
 
22040
          case 1: // WEX
-
 
22041
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
22042
              this.wex = new WarehouseServiceException();
-
 
22043
              this.wex.read(iprot);
-
 
22044
            } else { 
-
 
22045
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
22046
            }
-
 
22047
            break;
-
 
22048
          default:
-
 
22049
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
22050
        }
-
 
22051
        iprot.readFieldEnd();
-
 
22052
      }
-
 
22053
      iprot.readStructEnd();
-
 
22054
      validate();
-
 
22055
    }
-
 
22056
 
-
 
22057
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
22058
      oprot.writeStructBegin(STRUCT_DESC);
-
 
22059
 
-
 
22060
      if (this.isSetSuccess()) {
-
 
22061
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
22062
        this.success.write(oprot);
-
 
22063
        oprot.writeFieldEnd();
-
 
22064
      } else if (this.isSetWex()) {
-
 
22065
        oprot.writeFieldBegin(WEX_FIELD_DESC);
-
 
22066
        this.wex.write(oprot);
-
 
22067
        oprot.writeFieldEnd();
-
 
22068
      }
-
 
22069
      oprot.writeFieldStop();
-
 
22070
      oprot.writeStructEnd();
-
 
22071
    }
-
 
22072
 
-
 
22073
    @Override
-
 
22074
    public String toString() {
-
 
22075
      StringBuilder sb = new StringBuilder("scanfreebie_result(");
-
 
22076
      boolean first = true;
-
 
22077
 
-
 
22078
      sb.append("success:");
-
 
22079
      if (this.success == null) {
-
 
22080
        sb.append("null");
-
 
22081
      } else {
-
 
22082
        sb.append(this.success);
-
 
22083
      }
-
 
22084
      first = false;
-
 
22085
      if (!first) sb.append(", ");
-
 
22086
      sb.append("wex:");
-
 
22087
      if (this.wex == null) {
-
 
22088
        sb.append("null");
-
 
22089
      } else {
-
 
22090
        sb.append(this.wex);
-
 
22091
      }
-
 
22092
      first = false;
-
 
22093
      sb.append(")");
-
 
22094
      return sb.toString();
-
 
22095
    }
21059
 
22096
 
21060
    public void validate() throws org.apache.thrift.TException {
22097
    public void validate() throws org.apache.thrift.TException {
21061
      // check for required fields
22098
      // check for required fields
21062
    }
22099
    }
21063
 
22100