Subversion Repositories SmartDukaan

Rev

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

Rev 7672 Rev 9829
Line 220... Line 220...
220
     * @param invoiceNumber
220
     * @param invoiceNumber
221
     * @param supplierId
221
     * @param supplierId
222
     */
222
     */
223
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
223
    public boolean isInvoiceReceived(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
224
 
224
 
-
 
225
    /**
-
 
226
     * Change warehouseId of PO if no items have been received yet for the PO
-
 
227
     * 
-
 
228
     * @param id
-
 
229
     * @param warehouseId
-
 
230
     */
-
 
231
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException;
-
 
232
 
225
  }
233
  }
226
 
234
 
227
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
235
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
228
 
236
 
229
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
237
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
Line 278... Line 286...
278
 
286
 
279
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
287
    public void closePO(long poId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePO_call> resultHandler) throws org.apache.thrift.TException;
280
 
288
 
281
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
289
    public void isInvoiceReceived(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isInvoiceReceived_call> resultHandler) throws org.apache.thrift.TException;
282
 
290
 
-
 
291
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException;
-
 
292
 
283
  }
293
  }
284
 
294
 
285
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
295
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
286
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
296
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
287
      public Factory() {}
297
      public Factory() {}
Line 955... Line 965...
955
        return result.success;
965
        return result.success;
956
      }
966
      }
957
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
967
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
958
    }
968
    }
959
 
969
 
-
 
970
    public void changeWarehouseForPO(long id, long warehouseId) throws PurchaseServiceException, org.apache.thrift.TException
-
 
971
    {
-
 
972
      send_changeWarehouseForPO(id, warehouseId);
-
 
973
      recv_changeWarehouseForPO();
-
 
974
    }
-
 
975
 
-
 
976
    public void send_changeWarehouseForPO(long id, long warehouseId) throws org.apache.thrift.TException
-
 
977
    {
-
 
978
      changeWarehouseForPO_args args = new changeWarehouseForPO_args();
-
 
979
      args.setId(id);
-
 
980
      args.setWarehouseId(warehouseId);
-
 
981
      sendBase("changeWarehouseForPO", args);
-
 
982
    }
-
 
983
 
-
 
984
    public void recv_changeWarehouseForPO() throws PurchaseServiceException, org.apache.thrift.TException
-
 
985
    {
-
 
986
      changeWarehouseForPO_result result = new changeWarehouseForPO_result();
-
 
987
      receiveBase(result, "changeWarehouseForPO");
-
 
988
      if (result.e != null) {
-
 
989
        throw result.e;
-
 
990
      }
-
 
991
      return;
-
 
992
    }
-
 
993
 
960
  }
994
  }
961
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
995
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
962
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
996
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
963
      private org.apache.thrift.async.TAsyncClientManager clientManager;
997
      private org.apache.thrift.async.TAsyncClientManager clientManager;
964
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
998
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 1876... Line 1910...
1876
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1910
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1877
        return (new Client(prot)).recv_isInvoiceReceived();
1911
        return (new Client(prot)).recv_isInvoiceReceived();
1878
      }
1912
      }
1879
    }
1913
    }
1880
 
1914
 
-
 
1915
    public void changeWarehouseForPO(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_call> resultHandler) throws org.apache.thrift.TException {
-
 
1916
      checkReady();
-
 
1917
      changeWarehouseForPO_call method_call = new changeWarehouseForPO_call(id, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
-
 
1918
      this.___currentMethod = method_call;
-
 
1919
      ___manager.call(method_call);
-
 
1920
    }
-
 
1921
 
-
 
1922
    public static class changeWarehouseForPO_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1923
      private long id;
-
 
1924
      private long warehouseId;
-
 
1925
      public changeWarehouseForPO_call(long id, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<changeWarehouseForPO_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 {
-
 
1926
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1927
        this.id = id;
-
 
1928
        this.warehouseId = warehouseId;
-
 
1929
      }
-
 
1930
 
-
 
1931
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1932
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeWarehouseForPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1933
        changeWarehouseForPO_args args = new changeWarehouseForPO_args();
-
 
1934
        args.setId(id);
-
 
1935
        args.setWarehouseId(warehouseId);
-
 
1936
        args.write(prot);
-
 
1937
        prot.writeMessageEnd();
-
 
1938
      }
-
 
1939
 
-
 
1940
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
-
 
1941
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1942
          throw new IllegalStateException("Method call not finished!");
-
 
1943
        }
-
 
1944
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1945
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1946
        (new Client(prot)).recv_changeWarehouseForPO();
-
 
1947
      }
-
 
1948
    }
-
 
1949
 
1881
  }
1950
  }
1882
 
1951
 
1883
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1952
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1884
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1953
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1885
    public Processor(I iface) {
1954
    public Processor(I iface) {
Line 1916... Line 1985...
1916
      processMap.put("getInvoice", new getInvoice());
1985
      processMap.put("getInvoice", new getInvoice());
1917
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
1986
      processMap.put("createPurchaseForOurExtBilling", new createPurchaseForOurExtBilling());
1918
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
1987
      processMap.put("fulfillPOForExtBilling", new fulfillPOForExtBilling());
1919
      processMap.put("closePO", new closePO());
1988
      processMap.put("closePO", new closePO());
1920
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
1989
      processMap.put("isInvoiceReceived", new isInvoiceReceived());
-
 
1990
      processMap.put("changeWarehouseForPO", new changeWarehouseForPO());
1921
      return processMap;
1991
      return processMap;
1922
    }
1992
    }
1923
 
1993
 
1924
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1994
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1925
      public createPurchaseOrder() {
1995
      public createPurchaseOrder() {
Line 2417... Line 2487...
2417
        result.setSuccessIsSet(true);
2487
        result.setSuccessIsSet(true);
2418
        return result;
2488
        return result;
2419
      }
2489
      }
2420
    }
2490
    }
2421
 
2491
 
-
 
2492
    private static class changeWarehouseForPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, changeWarehouseForPO_args> {
-
 
2493
      public changeWarehouseForPO() {
-
 
2494
        super("changeWarehouseForPO");
-
 
2495
      }
-
 
2496
 
-
 
2497
      protected changeWarehouseForPO_args getEmptyArgsInstance() {
-
 
2498
        return new changeWarehouseForPO_args();
-
 
2499
      }
-
 
2500
 
-
 
2501
      protected changeWarehouseForPO_result getResult(I iface, changeWarehouseForPO_args args) throws org.apache.thrift.TException {
-
 
2502
        changeWarehouseForPO_result result = new changeWarehouseForPO_result();
-
 
2503
        try {
-
 
2504
          iface.changeWarehouseForPO(args.id, args.warehouseId);
-
 
2505
        } catch (PurchaseServiceException e) {
-
 
2506
          result.e = e;
-
 
2507
        }
-
 
2508
        return result;
-
 
2509
      }
-
 
2510
    }
-
 
2511
 
2422
  }
2512
  }
2423
 
2513
 
2424
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2514
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
2425
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2515
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
2426
 
2516
 
Line 20276... Line 20366...
20276
      first = false;
20366
      first = false;
20277
      sb.append(")");
20367
      sb.append(")");
20278
      return sb.toString();
20368
      return sb.toString();
20279
    }
20369
    }
20280
 
20370
 
-
 
20371
    public void validate() throws org.apache.thrift.TException {
-
 
20372
      // check for required fields
-
 
20373
    }
-
 
20374
 
-
 
20375
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
20376
      try {
-
 
20377
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
20378
      } catch (org.apache.thrift.TException te) {
-
 
20379
        throw new java.io.IOException(te);
-
 
20380
      }
-
 
20381
    }
-
 
20382
 
-
 
20383
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
20384
      try {
-
 
20385
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
20386
      } catch (org.apache.thrift.TException te) {
-
 
20387
        throw new java.io.IOException(te);
-
 
20388
      }
-
 
20389
    }
-
 
20390
 
-
 
20391
  }
-
 
20392
 
-
 
20393
  public static class changeWarehouseForPO_args implements org.apache.thrift.TBase<changeWarehouseForPO_args, changeWarehouseForPO_args._Fields>, java.io.Serializable, Cloneable   {
-
 
20394
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_args");
-
 
20395
 
-
 
20396
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
20397
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
20398
 
-
 
20399
    private long id; // required
-
 
20400
    private long warehouseId; // required
-
 
20401
 
-
 
20402
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
20403
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
20404
      ID((short)1, "id"),
-
 
20405
      WAREHOUSE_ID((short)2, "warehouseId");
-
 
20406
 
-
 
20407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
20408
 
-
 
20409
      static {
-
 
20410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
20411
          byName.put(field.getFieldName(), field);
-
 
20412
        }
-
 
20413
      }
-
 
20414
 
-
 
20415
      /**
-
 
20416
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
20417
       */
-
 
20418
      public static _Fields findByThriftId(int fieldId) {
-
 
20419
        switch(fieldId) {
-
 
20420
          case 1: // ID
-
 
20421
            return ID;
-
 
20422
          case 2: // WAREHOUSE_ID
-
 
20423
            return WAREHOUSE_ID;
-
 
20424
          default:
-
 
20425
            return null;
-
 
20426
        }
-
 
20427
      }
-
 
20428
 
-
 
20429
      /**
-
 
20430
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
20431
       * if it is not found.
-
 
20432
       */
-
 
20433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
20434
        _Fields fields = findByThriftId(fieldId);
-
 
20435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
20436
        return fields;
-
 
20437
      }
-
 
20438
 
-
 
20439
      /**
-
 
20440
       * Find the _Fields constant that matches name, or null if its not found.
-
 
20441
       */
-
 
20442
      public static _Fields findByName(String name) {
-
 
20443
        return byName.get(name);
-
 
20444
      }
-
 
20445
 
-
 
20446
      private final short _thriftId;
-
 
20447
      private final String _fieldName;
-
 
20448
 
-
 
20449
      _Fields(short thriftId, String fieldName) {
-
 
20450
        _thriftId = thriftId;
-
 
20451
        _fieldName = fieldName;
-
 
20452
      }
-
 
20453
 
-
 
20454
      public short getThriftFieldId() {
-
 
20455
        return _thriftId;
-
 
20456
      }
-
 
20457
 
-
 
20458
      public String getFieldName() {
-
 
20459
        return _fieldName;
-
 
20460
      }
-
 
20461
    }
-
 
20462
 
-
 
20463
    // isset id assignments
-
 
20464
    private static final int __ID_ISSET_ID = 0;
-
 
20465
    private static final int __WAREHOUSEID_ISSET_ID = 1;
-
 
20466
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
20467
 
-
 
20468
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
20469
    static {
-
 
20470
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
20471
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
20472
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
20473
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
20474
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
20475
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
20476
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_args.class, metaDataMap);
-
 
20477
    }
-
 
20478
 
-
 
20479
    public changeWarehouseForPO_args() {
-
 
20480
    }
-
 
20481
 
-
 
20482
    public changeWarehouseForPO_args(
-
 
20483
      long id,
-
 
20484
      long warehouseId)
-
 
20485
    {
-
 
20486
      this();
-
 
20487
      this.id = id;
-
 
20488
      setIdIsSet(true);
-
 
20489
      this.warehouseId = warehouseId;
-
 
20490
      setWarehouseIdIsSet(true);
-
 
20491
    }
-
 
20492
 
-
 
20493
    /**
-
 
20494
     * Performs a deep copy on <i>other</i>.
-
 
20495
     */
-
 
20496
    public changeWarehouseForPO_args(changeWarehouseForPO_args other) {
-
 
20497
      __isset_bit_vector.clear();
-
 
20498
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
20499
      this.id = other.id;
-
 
20500
      this.warehouseId = other.warehouseId;
-
 
20501
    }
-
 
20502
 
-
 
20503
    public changeWarehouseForPO_args deepCopy() {
-
 
20504
      return new changeWarehouseForPO_args(this);
-
 
20505
    }
-
 
20506
 
-
 
20507
    @Override
-
 
20508
    public void clear() {
-
 
20509
      setIdIsSet(false);
-
 
20510
      this.id = 0;
-
 
20511
      setWarehouseIdIsSet(false);
-
 
20512
      this.warehouseId = 0;
-
 
20513
    }
-
 
20514
 
-
 
20515
    public long getId() {
-
 
20516
      return this.id;
-
 
20517
    }
-
 
20518
 
-
 
20519
    public void setId(long id) {
-
 
20520
      this.id = id;
-
 
20521
      setIdIsSet(true);
-
 
20522
    }
-
 
20523
 
-
 
20524
    public void unsetId() {
-
 
20525
      __isset_bit_vector.clear(__ID_ISSET_ID);
-
 
20526
    }
-
 
20527
 
-
 
20528
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
-
 
20529
    public boolean isSetId() {
-
 
20530
      return __isset_bit_vector.get(__ID_ISSET_ID);
-
 
20531
    }
-
 
20532
 
-
 
20533
    public void setIdIsSet(boolean value) {
-
 
20534
      __isset_bit_vector.set(__ID_ISSET_ID, value);
-
 
20535
    }
-
 
20536
 
-
 
20537
    public long getWarehouseId() {
-
 
20538
      return this.warehouseId;
-
 
20539
    }
-
 
20540
 
-
 
20541
    public void setWarehouseId(long warehouseId) {
-
 
20542
      this.warehouseId = warehouseId;
-
 
20543
      setWarehouseIdIsSet(true);
-
 
20544
    }
-
 
20545
 
-
 
20546
    public void unsetWarehouseId() {
-
 
20547
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
-
 
20548
    }
-
 
20549
 
-
 
20550
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
-
 
20551
    public boolean isSetWarehouseId() {
-
 
20552
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
-
 
20553
    }
-
 
20554
 
-
 
20555
    public void setWarehouseIdIsSet(boolean value) {
-
 
20556
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
-
 
20557
    }
-
 
20558
 
-
 
20559
    public void setFieldValue(_Fields field, Object value) {
-
 
20560
      switch (field) {
-
 
20561
      case ID:
-
 
20562
        if (value == null) {
-
 
20563
          unsetId();
-
 
20564
        } else {
-
 
20565
          setId((Long)value);
-
 
20566
        }
-
 
20567
        break;
-
 
20568
 
-
 
20569
      case WAREHOUSE_ID:
-
 
20570
        if (value == null) {
-
 
20571
          unsetWarehouseId();
-
 
20572
        } else {
-
 
20573
          setWarehouseId((Long)value);
-
 
20574
        }
-
 
20575
        break;
-
 
20576
 
-
 
20577
      }
-
 
20578
    }
-
 
20579
 
-
 
20580
    public Object getFieldValue(_Fields field) {
-
 
20581
      switch (field) {
-
 
20582
      case ID:
-
 
20583
        return Long.valueOf(getId());
-
 
20584
 
-
 
20585
      case WAREHOUSE_ID:
-
 
20586
        return Long.valueOf(getWarehouseId());
-
 
20587
 
-
 
20588
      }
-
 
20589
      throw new IllegalStateException();
-
 
20590
    }
-
 
20591
 
-
 
20592
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
20593
    public boolean isSet(_Fields field) {
-
 
20594
      if (field == null) {
-
 
20595
        throw new IllegalArgumentException();
-
 
20596
      }
-
 
20597
 
-
 
20598
      switch (field) {
-
 
20599
      case ID:
-
 
20600
        return isSetId();
-
 
20601
      case WAREHOUSE_ID:
-
 
20602
        return isSetWarehouseId();
-
 
20603
      }
-
 
20604
      throw new IllegalStateException();
-
 
20605
    }
-
 
20606
 
-
 
20607
    @Override
-
 
20608
    public boolean equals(Object that) {
-
 
20609
      if (that == null)
-
 
20610
        return false;
-
 
20611
      if (that instanceof changeWarehouseForPO_args)
-
 
20612
        return this.equals((changeWarehouseForPO_args)that);
-
 
20613
      return false;
-
 
20614
    }
-
 
20615
 
-
 
20616
    public boolean equals(changeWarehouseForPO_args that) {
-
 
20617
      if (that == null)
-
 
20618
        return false;
-
 
20619
 
-
 
20620
      boolean this_present_id = true;
-
 
20621
      boolean that_present_id = true;
-
 
20622
      if (this_present_id || that_present_id) {
-
 
20623
        if (!(this_present_id && that_present_id))
-
 
20624
          return false;
-
 
20625
        if (this.id != that.id)
-
 
20626
          return false;
-
 
20627
      }
-
 
20628
 
-
 
20629
      boolean this_present_warehouseId = true;
-
 
20630
      boolean that_present_warehouseId = true;
-
 
20631
      if (this_present_warehouseId || that_present_warehouseId) {
-
 
20632
        if (!(this_present_warehouseId && that_present_warehouseId))
-
 
20633
          return false;
-
 
20634
        if (this.warehouseId != that.warehouseId)
-
 
20635
          return false;
-
 
20636
      }
-
 
20637
 
-
 
20638
      return true;
-
 
20639
    }
-
 
20640
 
-
 
20641
    @Override
-
 
20642
    public int hashCode() {
-
 
20643
      return 0;
-
 
20644
    }
-
 
20645
 
-
 
20646
    public int compareTo(changeWarehouseForPO_args other) {
-
 
20647
      if (!getClass().equals(other.getClass())) {
-
 
20648
        return getClass().getName().compareTo(other.getClass().getName());
-
 
20649
      }
-
 
20650
 
-
 
20651
      int lastComparison = 0;
-
 
20652
      changeWarehouseForPO_args typedOther = (changeWarehouseForPO_args)other;
-
 
20653
 
-
 
20654
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
-
 
20655
      if (lastComparison != 0) {
-
 
20656
        return lastComparison;
-
 
20657
      }
-
 
20658
      if (isSetId()) {
-
 
20659
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
-
 
20660
        if (lastComparison != 0) {
-
 
20661
          return lastComparison;
-
 
20662
        }
-
 
20663
      }
-
 
20664
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
-
 
20665
      if (lastComparison != 0) {
-
 
20666
        return lastComparison;
-
 
20667
      }
-
 
20668
      if (isSetWarehouseId()) {
-
 
20669
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
-
 
20670
        if (lastComparison != 0) {
-
 
20671
          return lastComparison;
-
 
20672
        }
-
 
20673
      }
-
 
20674
      return 0;
-
 
20675
    }
-
 
20676
 
-
 
20677
    public _Fields fieldForId(int fieldId) {
-
 
20678
      return _Fields.findByThriftId(fieldId);
-
 
20679
    }
-
 
20680
 
-
 
20681
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
20682
      org.apache.thrift.protocol.TField field;
-
 
20683
      iprot.readStructBegin();
-
 
20684
      while (true)
-
 
20685
      {
-
 
20686
        field = iprot.readFieldBegin();
-
 
20687
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
20688
          break;
-
 
20689
        }
-
 
20690
        switch (field.id) {
-
 
20691
          case 1: // ID
-
 
20692
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
20693
              this.id = iprot.readI64();
-
 
20694
              setIdIsSet(true);
-
 
20695
            } else { 
-
 
20696
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
20697
            }
-
 
20698
            break;
-
 
20699
          case 2: // WAREHOUSE_ID
-
 
20700
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
20701
              this.warehouseId = iprot.readI64();
-
 
20702
              setWarehouseIdIsSet(true);
-
 
20703
            } else { 
-
 
20704
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
20705
            }
-
 
20706
            break;
-
 
20707
          default:
-
 
20708
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
20709
        }
-
 
20710
        iprot.readFieldEnd();
-
 
20711
      }
-
 
20712
      iprot.readStructEnd();
-
 
20713
      validate();
-
 
20714
    }
-
 
20715
 
-
 
20716
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
20717
      validate();
-
 
20718
 
-
 
20719
      oprot.writeStructBegin(STRUCT_DESC);
-
 
20720
      oprot.writeFieldBegin(ID_FIELD_DESC);
-
 
20721
      oprot.writeI64(this.id);
-
 
20722
      oprot.writeFieldEnd();
-
 
20723
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
-
 
20724
      oprot.writeI64(this.warehouseId);
-
 
20725
      oprot.writeFieldEnd();
-
 
20726
      oprot.writeFieldStop();
-
 
20727
      oprot.writeStructEnd();
-
 
20728
    }
-
 
20729
 
-
 
20730
    @Override
-
 
20731
    public String toString() {
-
 
20732
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_args(");
-
 
20733
      boolean first = true;
-
 
20734
 
-
 
20735
      sb.append("id:");
-
 
20736
      sb.append(this.id);
-
 
20737
      first = false;
-
 
20738
      if (!first) sb.append(", ");
-
 
20739
      sb.append("warehouseId:");
-
 
20740
      sb.append(this.warehouseId);
-
 
20741
      first = false;
-
 
20742
      sb.append(")");
-
 
20743
      return sb.toString();
-
 
20744
    }
-
 
20745
 
-
 
20746
    public void validate() throws org.apache.thrift.TException {
-
 
20747
      // check for required fields
-
 
20748
    }
-
 
20749
 
-
 
20750
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
20751
      try {
-
 
20752
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
20753
      } catch (org.apache.thrift.TException te) {
-
 
20754
        throw new java.io.IOException(te);
-
 
20755
      }
-
 
20756
    }
-
 
20757
 
-
 
20758
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
20759
      try {
-
 
20760
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
20761
      } catch (org.apache.thrift.TException te) {
-
 
20762
        throw new java.io.IOException(te);
-
 
20763
      }
-
 
20764
    }
-
 
20765
 
-
 
20766
  }
-
 
20767
 
-
 
20768
  public static class changeWarehouseForPO_result implements org.apache.thrift.TBase<changeWarehouseForPO_result, changeWarehouseForPO_result._Fields>, java.io.Serializable, Cloneable   {
-
 
20769
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("changeWarehouseForPO_result");
-
 
20770
 
-
 
20771
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
20772
 
-
 
20773
    private PurchaseServiceException e; // required
-
 
20774
 
-
 
20775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
20776
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
20777
      E((short)1, "e");
-
 
20778
 
-
 
20779
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
20780
 
-
 
20781
      static {
-
 
20782
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
20783
          byName.put(field.getFieldName(), field);
-
 
20784
        }
-
 
20785
      }
-
 
20786
 
-
 
20787
      /**
-
 
20788
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
20789
       */
-
 
20790
      public static _Fields findByThriftId(int fieldId) {
-
 
20791
        switch(fieldId) {
-
 
20792
          case 1: // E
-
 
20793
            return E;
-
 
20794
          default:
-
 
20795
            return null;
-
 
20796
        }
-
 
20797
      }
-
 
20798
 
-
 
20799
      /**
-
 
20800
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
20801
       * if it is not found.
-
 
20802
       */
-
 
20803
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
20804
        _Fields fields = findByThriftId(fieldId);
-
 
20805
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
20806
        return fields;
-
 
20807
      }
-
 
20808
 
-
 
20809
      /**
-
 
20810
       * Find the _Fields constant that matches name, or null if its not found.
-
 
20811
       */
-
 
20812
      public static _Fields findByName(String name) {
-
 
20813
        return byName.get(name);
-
 
20814
      }
-
 
20815
 
-
 
20816
      private final short _thriftId;
-
 
20817
      private final String _fieldName;
-
 
20818
 
-
 
20819
      _Fields(short thriftId, String fieldName) {
-
 
20820
        _thriftId = thriftId;
-
 
20821
        _fieldName = fieldName;
-
 
20822
      }
-
 
20823
 
-
 
20824
      public short getThriftFieldId() {
-
 
20825
        return _thriftId;
-
 
20826
      }
-
 
20827
 
-
 
20828
      public String getFieldName() {
-
 
20829
        return _fieldName;
-
 
20830
      }
-
 
20831
    }
-
 
20832
 
-
 
20833
    // isset id assignments
-
 
20834
 
-
 
20835
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
20836
    static {
-
 
20837
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
20838
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
20839
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
20840
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
20841
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeWarehouseForPO_result.class, metaDataMap);
-
 
20842
    }
-
 
20843
 
-
 
20844
    public changeWarehouseForPO_result() {
-
 
20845
    }
-
 
20846
 
-
 
20847
    public changeWarehouseForPO_result(
-
 
20848
      PurchaseServiceException e)
-
 
20849
    {
-
 
20850
      this();
-
 
20851
      this.e = e;
-
 
20852
    }
-
 
20853
 
-
 
20854
    /**
-
 
20855
     * Performs a deep copy on <i>other</i>.
-
 
20856
     */
-
 
20857
    public changeWarehouseForPO_result(changeWarehouseForPO_result other) {
-
 
20858
      if (other.isSetE()) {
-
 
20859
        this.e = new PurchaseServiceException(other.e);
-
 
20860
      }
-
 
20861
    }
-
 
20862
 
-
 
20863
    public changeWarehouseForPO_result deepCopy() {
-
 
20864
      return new changeWarehouseForPO_result(this);
-
 
20865
    }
-
 
20866
 
-
 
20867
    @Override
-
 
20868
    public void clear() {
-
 
20869
      this.e = null;
-
 
20870
    }
-
 
20871
 
-
 
20872
    public PurchaseServiceException getE() {
-
 
20873
      return this.e;
-
 
20874
    }
-
 
20875
 
-
 
20876
    public void setE(PurchaseServiceException e) {
-
 
20877
      this.e = e;
-
 
20878
    }
-
 
20879
 
-
 
20880
    public void unsetE() {
-
 
20881
      this.e = null;
-
 
20882
    }
-
 
20883
 
-
 
20884
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
-
 
20885
    public boolean isSetE() {
-
 
20886
      return this.e != null;
-
 
20887
    }
-
 
20888
 
-
 
20889
    public void setEIsSet(boolean value) {
-
 
20890
      if (!value) {
-
 
20891
        this.e = null;
-
 
20892
      }
-
 
20893
    }
-
 
20894
 
-
 
20895
    public void setFieldValue(_Fields field, Object value) {
-
 
20896
      switch (field) {
-
 
20897
      case E:
-
 
20898
        if (value == null) {
-
 
20899
          unsetE();
-
 
20900
        } else {
-
 
20901
          setE((PurchaseServiceException)value);
-
 
20902
        }
-
 
20903
        break;
-
 
20904
 
-
 
20905
      }
-
 
20906
    }
-
 
20907
 
-
 
20908
    public Object getFieldValue(_Fields field) {
-
 
20909
      switch (field) {
-
 
20910
      case E:
-
 
20911
        return getE();
-
 
20912
 
-
 
20913
      }
-
 
20914
      throw new IllegalStateException();
-
 
20915
    }
-
 
20916
 
-
 
20917
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
20918
    public boolean isSet(_Fields field) {
-
 
20919
      if (field == null) {
-
 
20920
        throw new IllegalArgumentException();
-
 
20921
      }
-
 
20922
 
-
 
20923
      switch (field) {
-
 
20924
      case E:
-
 
20925
        return isSetE();
-
 
20926
      }
-
 
20927
      throw new IllegalStateException();
-
 
20928
    }
-
 
20929
 
-
 
20930
    @Override
-
 
20931
    public boolean equals(Object that) {
-
 
20932
      if (that == null)
-
 
20933
        return false;
-
 
20934
      if (that instanceof changeWarehouseForPO_result)
-
 
20935
        return this.equals((changeWarehouseForPO_result)that);
-
 
20936
      return false;
-
 
20937
    }
-
 
20938
 
-
 
20939
    public boolean equals(changeWarehouseForPO_result that) {
-
 
20940
      if (that == null)
-
 
20941
        return false;
-
 
20942
 
-
 
20943
      boolean this_present_e = true && this.isSetE();
-
 
20944
      boolean that_present_e = true && that.isSetE();
-
 
20945
      if (this_present_e || that_present_e) {
-
 
20946
        if (!(this_present_e && that_present_e))
-
 
20947
          return false;
-
 
20948
        if (!this.e.equals(that.e))
-
 
20949
          return false;
-
 
20950
      }
-
 
20951
 
-
 
20952
      return true;
-
 
20953
    }
-
 
20954
 
-
 
20955
    @Override
-
 
20956
    public int hashCode() {
-
 
20957
      return 0;
-
 
20958
    }
-
 
20959
 
-
 
20960
    public int compareTo(changeWarehouseForPO_result other) {
-
 
20961
      if (!getClass().equals(other.getClass())) {
-
 
20962
        return getClass().getName().compareTo(other.getClass().getName());
-
 
20963
      }
-
 
20964
 
-
 
20965
      int lastComparison = 0;
-
 
20966
      changeWarehouseForPO_result typedOther = (changeWarehouseForPO_result)other;
-
 
20967
 
-
 
20968
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
-
 
20969
      if (lastComparison != 0) {
-
 
20970
        return lastComparison;
-
 
20971
      }
-
 
20972
      if (isSetE()) {
-
 
20973
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
-
 
20974
        if (lastComparison != 0) {
-
 
20975
          return lastComparison;
-
 
20976
        }
-
 
20977
      }
-
 
20978
      return 0;
-
 
20979
    }
-
 
20980
 
-
 
20981
    public _Fields fieldForId(int fieldId) {
-
 
20982
      return _Fields.findByThriftId(fieldId);
-
 
20983
    }
-
 
20984
 
-
 
20985
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
20986
      org.apache.thrift.protocol.TField field;
-
 
20987
      iprot.readStructBegin();
-
 
20988
      while (true)
-
 
20989
      {
-
 
20990
        field = iprot.readFieldBegin();
-
 
20991
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
20992
          break;
-
 
20993
        }
-
 
20994
        switch (field.id) {
-
 
20995
          case 1: // E
-
 
20996
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
20997
              this.e = new PurchaseServiceException();
-
 
20998
              this.e.read(iprot);
-
 
20999
            } else { 
-
 
21000
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
21001
            }
-
 
21002
            break;
-
 
21003
          default:
-
 
21004
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
21005
        }
-
 
21006
        iprot.readFieldEnd();
-
 
21007
      }
-
 
21008
      iprot.readStructEnd();
-
 
21009
      validate();
-
 
21010
    }
-
 
21011
 
-
 
21012
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
21013
      oprot.writeStructBegin(STRUCT_DESC);
-
 
21014
 
-
 
21015
      if (this.isSetE()) {
-
 
21016
        oprot.writeFieldBegin(E_FIELD_DESC);
-
 
21017
        this.e.write(oprot);
-
 
21018
        oprot.writeFieldEnd();
-
 
21019
      }
-
 
21020
      oprot.writeFieldStop();
-
 
21021
      oprot.writeStructEnd();
-
 
21022
    }
-
 
21023
 
-
 
21024
    @Override
-
 
21025
    public String toString() {
-
 
21026
      StringBuilder sb = new StringBuilder("changeWarehouseForPO_result(");
-
 
21027
      boolean first = true;
-
 
21028
 
-
 
21029
      sb.append("e:");
-
 
21030
      if (this.e == null) {
-
 
21031
        sb.append("null");
-
 
21032
      } else {
-
 
21033
        sb.append(this.e);
-
 
21034
      }
-
 
21035
      first = false;
-
 
21036
      sb.append(")");
-
 
21037
      return sb.toString();
-
 
21038
    }
-
 
21039
 
20281
    public void validate() throws org.apache.thrift.TException {
21040
    public void validate() throws org.apache.thrift.TException {
20282
      // check for required fields
21041
      // check for required fields
20283
    }
21042
    }
20284
 
21043
 
20285
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21044
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {