Rev 3424 | Rev 4541 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift Compiler (0.7.0)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.warehouse;import java.util.List;import java.util.ArrayList;import java.util.Map;import java.util.HashMap;import java.util.EnumMap;import java.util.Set;import java.util.HashSet;import java.util.EnumSet;import java.util.Collections;import java.util.BitSet;import java.nio.ByteBuffer;import java.util.Arrays;import org.slf4j.Logger;import org.slf4j.LoggerFactory;public class WarehouseService {public interface Iface extends in.shop2020.generic.GenericService.Iface {/*** Creates a purchase order based on the data in the given purchase order object.* This method populates a nummber of missing fields** @param purchaseOrder*/public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws WarehouseServiceException, org.apache.thrift.TException;/*** Returns the purchase order with the given id. Throws an exception if there is no such purchase order.** @param id*/public PurchaseOrder getPurchaseOrder(long id) throws WarehouseServiceException, org.apache.thrift.TException;/*** Returns a list of all the purchase orders in the given state** @param status*/public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws WarehouseServiceException, org.apache.thrift.TException;/*** Returns the supplier with the given order id. Throws an exception if there is no such supplier.** @param id*/public Supplier getSupplier(long id) throws WarehouseServiceException, org.apache.thrift.TException;/*** Creates a purchase for the given purchase order.* Throws an exception if no more purchases are allowed against the given purchase order.** @param purchaseOrderId* @param invoiceNumber* @param freightCharges*/public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws WarehouseServiceException, org.apache.thrift.TException;/*** Marks a purchase as complete and updates the receivedOn time.* Throws an exception if no such purchase exists.** @param purchaseId*/public long closePurchase(long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;/*** Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists** @param purchaseOrderId* @param open*/public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws WarehouseServiceException, org.apache.thrift.TException;/*** Creates a Scan object using the given details.* Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.** @param purchaseId* @param itemNumber* @param imeiNumber* @param type*/public void scanIn(long purchaseId, String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, org.apache.thrift.TException;/*** Marks the Scan object with the given details as scanned out. In case, the imeiNumber is not given,* marks the oldest ItemInventory object as being scanned out.* Raises an exception if:* 1. There is no stock present corresponding to the given item details.* 2. An older stock is present corresponding to the itemNumber which has not been scanned out.** @param itemNumber* @param imeiNumber* @param type*/public void scanOut(String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, org.apache.thrift.TException;}public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;public void scanIn(long purchaseId, String itemNumber, String imeiNumber, ScanType type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanIn_call> resultHandler) throws org.apache.thrift.TException;public void scanOut(String itemNumber, String imeiNumber, ScanType type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanOut_call> resultHandler) throws org.apache.thrift.TException;}public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {public Factory() {}public Client getClient(org.apache.thrift.protocol.TProtocol prot) {return new Client(prot);}public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {return new Client(iprot, oprot);}}public Client(org.apache.thrift.protocol.TProtocol prot){super(prot, prot);}public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {super(iprot, oprot);}public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws WarehouseServiceException, org.apache.thrift.TException{send_createPurchaseOrder(purchaseOrder);return recv_createPurchaseOrder();}public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws org.apache.thrift.TException{createPurchaseOrder_args args = new createPurchaseOrder_args();args.setPurchaseOrder(purchaseOrder);sendBase("createPurchaseOrder", args);}public long recv_createPurchaseOrder() throws WarehouseServiceException, org.apache.thrift.TException{createPurchaseOrder_result result = new createPurchaseOrder_result();receiveBase(result, "createPurchaseOrder");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");}public PurchaseOrder getPurchaseOrder(long id) throws WarehouseServiceException, org.apache.thrift.TException{send_getPurchaseOrder(id);return recv_getPurchaseOrder();}public void send_getPurchaseOrder(long id) throws org.apache.thrift.TException{getPurchaseOrder_args args = new getPurchaseOrder_args();args.setId(id);sendBase("getPurchaseOrder", args);}public PurchaseOrder recv_getPurchaseOrder() throws WarehouseServiceException, org.apache.thrift.TException{getPurchaseOrder_result result = new getPurchaseOrder_result();receiveBase(result, "getPurchaseOrder");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");}public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws WarehouseServiceException, org.apache.thrift.TException{send_getAllPurchaseOrders(status);return recv_getAllPurchaseOrders();}public void send_getAllPurchaseOrders(POStatus status) throws org.apache.thrift.TException{getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();args.setStatus(status);sendBase("getAllPurchaseOrders", args);}public List<PurchaseOrder> recv_getAllPurchaseOrders() throws WarehouseServiceException, org.apache.thrift.TException{getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();receiveBase(result, "getAllPurchaseOrders");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");}public Supplier getSupplier(long id) throws WarehouseServiceException, org.apache.thrift.TException{send_getSupplier(id);return recv_getSupplier();}public void send_getSupplier(long id) throws org.apache.thrift.TException{getSupplier_args args = new getSupplier_args();args.setId(id);sendBase("getSupplier", args);}public Supplier recv_getSupplier() throws WarehouseServiceException, org.apache.thrift.TException{getSupplier_result result = new getSupplier_result();receiveBase(result, "getSupplier");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");}public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws WarehouseServiceException, org.apache.thrift.TException{send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);return recv_startPurchase();}public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException{startPurchase_args args = new startPurchase_args();args.setPurchaseOrderId(purchaseOrderId);args.setInvoiceNumber(invoiceNumber);args.setFreightCharges(freightCharges);sendBase("startPurchase", args);}public long recv_startPurchase() throws WarehouseServiceException, org.apache.thrift.TException{startPurchase_result result = new startPurchase_result();receiveBase(result, "startPurchase");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");}public long closePurchase(long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException{send_closePurchase(purchaseId);return recv_closePurchase();}public void send_closePurchase(long purchaseId) throws org.apache.thrift.TException{closePurchase_args args = new closePurchase_args();args.setPurchaseId(purchaseId);sendBase("closePurchase", args);}public long recv_closePurchase() throws WarehouseServiceException, org.apache.thrift.TException{closePurchase_result result = new closePurchase_result();receiveBase(result, "closePurchase");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");}public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws WarehouseServiceException, org.apache.thrift.TException{send_getAllPurchases(purchaseOrderId, open);return recv_getAllPurchases();}public void send_getAllPurchases(long purchaseOrderId, boolean open) throws org.apache.thrift.TException{getAllPurchases_args args = new getAllPurchases_args();args.setPurchaseOrderId(purchaseOrderId);args.setOpen(open);sendBase("getAllPurchases", args);}public List<Purchase> recv_getAllPurchases() throws WarehouseServiceException, org.apache.thrift.TException{getAllPurchases_result result = new getAllPurchases_result();receiveBase(result, "getAllPurchases");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");}public void scanIn(long purchaseId, String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, org.apache.thrift.TException{send_scanIn(purchaseId, itemNumber, imeiNumber, type);recv_scanIn();}public void send_scanIn(long purchaseId, String itemNumber, String imeiNumber, ScanType type) throws org.apache.thrift.TException{scanIn_args args = new scanIn_args();args.setPurchaseId(purchaseId);args.setItemNumber(itemNumber);args.setImeiNumber(imeiNumber);args.setType(type);sendBase("scanIn", args);}public void recv_scanIn() throws WarehouseServiceException, org.apache.thrift.TException{scanIn_result result = new scanIn_result();receiveBase(result, "scanIn");if (result.wex != null) {throw result.wex;}return;}public void scanOut(String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, org.apache.thrift.TException{send_scanOut(itemNumber, imeiNumber, type);recv_scanOut();}public void send_scanOut(String itemNumber, String imeiNumber, ScanType type) throws org.apache.thrift.TException{scanOut_args args = new scanOut_args();args.setItemNumber(itemNumber);args.setImeiNumber(imeiNumber);args.setType(type);sendBase("scanOut", args);}public void recv_scanOut() throws WarehouseServiceException, org.apache.thrift.TException{scanOut_result result = new scanOut_result();receiveBase(result, "scanOut");if (result.wex != null) {throw result.wex;}return;}}public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {private org.apache.thrift.async.TAsyncClientManager clientManager;private org.apache.thrift.protocol.TProtocolFactory protocolFactory;public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {this.clientManager = clientManager;this.protocolFactory = protocolFactory;}public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {return new AsyncClient(protocolFactory, clientManager, transport);}}public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {super(protocolFactory, clientManager, transport);}public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {checkReady();createPurchaseOrder_call method_call = new createPurchaseOrder_call(purchaseOrder, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class createPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {private PurchaseOrder purchaseOrder;public createPurchaseOrder_call(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<createPurchaseOrder_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 {super(client, protocolFactory, transport, resultHandler, false);this.purchaseOrder = purchaseOrder;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));createPurchaseOrder_args args = new createPurchaseOrder_args();args.setPurchaseOrder(purchaseOrder);args.write(prot);prot.writeMessageEnd();}public long getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_createPurchaseOrder();}}public void getPurchaseOrder(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException {checkReady();getPurchaseOrder_call method_call = new getPurchaseOrder_call(id, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getPurchaseOrder_call extends org.apache.thrift.async.TAsyncMethodCall {private long id;public getPurchaseOrder_call(long id, org.apache.thrift.async.AsyncMethodCallback<getPurchaseOrder_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 {super(client, protocolFactory, transport, resultHandler, false);this.id = id;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));getPurchaseOrder_args args = new getPurchaseOrder_args();args.setId(id);args.write(prot);prot.writeMessageEnd();}public PurchaseOrder getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_getPurchaseOrder();}}public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException {checkReady();getAllPurchaseOrders_call method_call = new getAllPurchaseOrders_call(status, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getAllPurchaseOrders_call extends org.apache.thrift.async.TAsyncMethodCall {private POStatus status;public getAllPurchaseOrders_call(POStatus status, org.apache.thrift.async.AsyncMethodCallback<getAllPurchaseOrders_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 {super(client, protocolFactory, transport, resultHandler, false);this.status = status;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchaseOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();args.setStatus(status);args.write(prot);prot.writeMessageEnd();}public List<PurchaseOrder> getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_getAllPurchaseOrders();}}public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_call> resultHandler) throws org.apache.thrift.TException {checkReady();getSupplier_call method_call = new getSupplier_call(id, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getSupplier_call extends org.apache.thrift.async.TAsyncMethodCall {private long id;public getSupplier_call(long id, org.apache.thrift.async.AsyncMethodCallback<getSupplier_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 {super(client, protocolFactory, transport, resultHandler, false);this.id = id;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupplier", org.apache.thrift.protocol.TMessageType.CALL, 0));getSupplier_args args = new getSupplier_args();args.setId(id);args.write(prot);prot.writeMessageEnd();}public Supplier getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_getSupplier();}}public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {checkReady();startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {private long purchaseOrderId;private String invoiceNumber;private double freightCharges;public startPurchase_call(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_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 {super(client, protocolFactory, transport, resultHandler, false);this.purchaseOrderId = purchaseOrderId;this.invoiceNumber = invoiceNumber;this.freightCharges = freightCharges;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));startPurchase_args args = new startPurchase_args();args.setPurchaseOrderId(purchaseOrderId);args.setInvoiceNumber(invoiceNumber);args.setFreightCharges(freightCharges);args.write(prot);prot.writeMessageEnd();}public long getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_startPurchase();}}public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_call> resultHandler) throws org.apache.thrift.TException {checkReady();closePurchase_call method_call = new closePurchase_call(purchaseId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class closePurchase_call extends org.apache.thrift.async.TAsyncMethodCall {private long purchaseId;public closePurchase_call(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<closePurchase_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 {super(client, protocolFactory, transport, resultHandler, false);this.purchaseId = purchaseId;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closePurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));closePurchase_args args = new closePurchase_args();args.setPurchaseId(purchaseId);args.write(prot);prot.writeMessageEnd();}public long getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_closePurchase();}}public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_call> resultHandler) throws org.apache.thrift.TException {checkReady();getAllPurchases_call method_call = new getAllPurchases_call(purchaseOrderId, open, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getAllPurchases_call extends org.apache.thrift.async.TAsyncMethodCall {private long purchaseOrderId;private boolean open;public getAllPurchases_call(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<getAllPurchases_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 {super(client, protocolFactory, transport, resultHandler, false);this.purchaseOrderId = purchaseOrderId;this.open = open;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPurchases", org.apache.thrift.protocol.TMessageType.CALL, 0));getAllPurchases_args args = new getAllPurchases_args();args.setPurchaseOrderId(purchaseOrderId);args.setOpen(open);args.write(prot);prot.writeMessageEnd();}public List<Purchase> getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_getAllPurchases();}}public void scanIn(long purchaseId, String itemNumber, String imeiNumber, ScanType type, org.apache.thrift.async.AsyncMethodCallback<scanIn_call> resultHandler) throws org.apache.thrift.TException {checkReady();scanIn_call method_call = new scanIn_call(purchaseId, itemNumber, imeiNumber, type, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class scanIn_call extends org.apache.thrift.async.TAsyncMethodCall {private long purchaseId;private String itemNumber;private String imeiNumber;private ScanType type;public scanIn_call(long purchaseId, String itemNumber, String imeiNumber, ScanType type, org.apache.thrift.async.AsyncMethodCallback<scanIn_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 {super(client, protocolFactory, transport, resultHandler, false);this.purchaseId = purchaseId;this.itemNumber = itemNumber;this.imeiNumber = imeiNumber;this.type = type;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanIn", org.apache.thrift.protocol.TMessageType.CALL, 0));scanIn_args args = new scanIn_args();args.setPurchaseId(purchaseId);args.setItemNumber(itemNumber);args.setImeiNumber(imeiNumber);args.setType(type);args.write(prot);prot.writeMessageEnd();}public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);(new Client(prot)).recv_scanIn();}}public void scanOut(String itemNumber, String imeiNumber, ScanType type, org.apache.thrift.async.AsyncMethodCallback<scanOut_call> resultHandler) throws org.apache.thrift.TException {checkReady();scanOut_call method_call = new scanOut_call(itemNumber, imeiNumber, type, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class scanOut_call extends org.apache.thrift.async.TAsyncMethodCall {private String itemNumber;private String imeiNumber;private ScanType type;public scanOut_call(String itemNumber, String imeiNumber, ScanType type, org.apache.thrift.async.AsyncMethodCallback<scanOut_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 {super(client, protocolFactory, transport, resultHandler, false);this.itemNumber = itemNumber;this.imeiNumber = imeiNumber;this.type = type;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanOut", org.apache.thrift.protocol.TMessageType.CALL, 0));scanOut_args args = new scanOut_args();args.setItemNumber(itemNumber);args.setImeiNumber(imeiNumber);args.setType(type);args.write(prot);prot.writeMessageEnd();}public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);(new Client(prot)).recv_scanOut();}}}public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());public Processor(I iface) {super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));}protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {super(iface, getProcessMap(processMap));}private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {processMap.put("createPurchaseOrder", new createPurchaseOrder());processMap.put("getPurchaseOrder", new getPurchaseOrder());processMap.put("getAllPurchaseOrders", new getAllPurchaseOrders());processMap.put("getSupplier", new getSupplier());processMap.put("startPurchase", new startPurchase());processMap.put("closePurchase", new closePurchase());processMap.put("getAllPurchases", new getAllPurchases());processMap.put("scanIn", new scanIn());processMap.put("scanOut", new scanOut());return processMap;}private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {public createPurchaseOrder() {super("createPurchaseOrder");}protected createPurchaseOrder_args getEmptyArgsInstance() {return new createPurchaseOrder_args();}protected createPurchaseOrder_result getResult(I iface, createPurchaseOrder_args args) throws org.apache.thrift.TException {createPurchaseOrder_result result = new createPurchaseOrder_result();try {result.success = iface.createPurchaseOrder(args.purchaseOrder);result.setSuccessIsSet(true);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class getPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseOrder_args> {public getPurchaseOrder() {super("getPurchaseOrder");}protected getPurchaseOrder_args getEmptyArgsInstance() {return new getPurchaseOrder_args();}protected getPurchaseOrder_result getResult(I iface, getPurchaseOrder_args args) throws org.apache.thrift.TException {getPurchaseOrder_result result = new getPurchaseOrder_result();try {result.success = iface.getPurchaseOrder(args.id);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class getAllPurchaseOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchaseOrders_args> {public getAllPurchaseOrders() {super("getAllPurchaseOrders");}protected getAllPurchaseOrders_args getEmptyArgsInstance() {return new getAllPurchaseOrders_args();}protected getAllPurchaseOrders_result getResult(I iface, getAllPurchaseOrders_args args) throws org.apache.thrift.TException {getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();try {result.success = iface.getAllPurchaseOrders(args.status);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class getSupplier<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupplier_args> {public getSupplier() {super("getSupplier");}protected getSupplier_args getEmptyArgsInstance() {return new getSupplier_args();}protected getSupplier_result getResult(I iface, getSupplier_args args) throws org.apache.thrift.TException {getSupplier_result result = new getSupplier_result();try {result.success = iface.getSupplier(args.id);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class startPurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPurchase_args> {public startPurchase() {super("startPurchase");}protected startPurchase_args getEmptyArgsInstance() {return new startPurchase_args();}protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {startPurchase_result result = new startPurchase_result();try {result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);result.setSuccessIsSet(true);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class closePurchase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closePurchase_args> {public closePurchase() {super("closePurchase");}protected closePurchase_args getEmptyArgsInstance() {return new closePurchase_args();}protected closePurchase_result getResult(I iface, closePurchase_args args) throws org.apache.thrift.TException {closePurchase_result result = new closePurchase_result();try {result.success = iface.closePurchase(args.purchaseId);result.setSuccessIsSet(true);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class getAllPurchases<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPurchases_args> {public getAllPurchases() {super("getAllPurchases");}protected getAllPurchases_args getEmptyArgsInstance() {return new getAllPurchases_args();}protected getAllPurchases_result getResult(I iface, getAllPurchases_args args) throws org.apache.thrift.TException {getAllPurchases_result result = new getAllPurchases_result();try {result.success = iface.getAllPurchases(args.purchaseOrderId, args.open);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class scanIn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanIn_args> {public scanIn() {super("scanIn");}protected scanIn_args getEmptyArgsInstance() {return new scanIn_args();}protected scanIn_result getResult(I iface, scanIn_args args) throws org.apache.thrift.TException {scanIn_result result = new scanIn_result();try {iface.scanIn(args.purchaseId, args.itemNumber, args.imeiNumber, args.type);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class scanOut<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanOut_args> {public scanOut() {super("scanOut");}protected scanOut_args getEmptyArgsInstance() {return new scanOut_args();}protected scanOut_result getResult(I iface, scanOut_args args) throws org.apache.thrift.TException {scanOut_result result = new scanOut_result();try {iface.scanOut(args.itemNumber, args.imeiNumber, args.type);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}}public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrder", org.apache.thrift.protocol.TType.STRUCT, (short)1);private PurchaseOrder purchaseOrder; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {PURCHASE_ORDER((short)1, "purchaseOrder");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // PURCHASE_ORDERreturn PURCHASE_ORDER;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.PURCHASE_ORDER, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrder", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);}public createPurchaseOrder_args() {}public createPurchaseOrder_args(PurchaseOrder purchaseOrder){this();this.purchaseOrder = purchaseOrder;}/*** Performs a deep copy on <i>other</i>.*/public createPurchaseOrder_args(createPurchaseOrder_args other) {if (other.isSetPurchaseOrder()) {this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);}}public createPurchaseOrder_args deepCopy() {return new createPurchaseOrder_args(this);}@Overridepublic void clear() {this.purchaseOrder = null;}public PurchaseOrder getPurchaseOrder() {return this.purchaseOrder;}public void setPurchaseOrder(PurchaseOrder purchaseOrder) {this.purchaseOrder = purchaseOrder;}public void unsetPurchaseOrder() {this.purchaseOrder = null;}/** Returns true if field purchaseOrder is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseOrder() {return this.purchaseOrder != null;}public void setPurchaseOrderIsSet(boolean value) {if (!value) {this.purchaseOrder = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case PURCHASE_ORDER:if (value == null) {unsetPurchaseOrder();} else {setPurchaseOrder((PurchaseOrder)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case PURCHASE_ORDER:return getPurchaseOrder();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case PURCHASE_ORDER:return isSetPurchaseOrder();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createPurchaseOrder_args)return this.equals((createPurchaseOrder_args)that);return false;}public boolean equals(createPurchaseOrder_args that) {if (that == null)return false;boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();if (this_present_purchaseOrder || that_present_purchaseOrder) {if (!(this_present_purchaseOrder && that_present_purchaseOrder))return false;if (!this.purchaseOrder.equals(that.purchaseOrder))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createPurchaseOrder_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(typedOther.isSetPurchaseOrder());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseOrder()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrder, typedOther.purchaseOrder);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // PURCHASE_ORDERif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.purchaseOrder = new PurchaseOrder();this.purchaseOrder.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);if (this.purchaseOrder != null) {oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);this.purchaseOrder.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");boolean first = true;sb.append("purchaseOrder:");if (this.purchaseOrder == null) {sb.append("null");} else {sb.append(this.purchaseOrder);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class createPurchaseOrder_result implements org.apache.thrift.TBase<createPurchaseOrder_result, createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_result");private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);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);private long success; // requiredprivate WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {SUCCESS((short)0, "success"),WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 0: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __SUCCESS_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);}public createPurchaseOrder_result() {}public createPurchaseOrder_result(long success,WarehouseServiceException wex){this();this.success = success;setSuccessIsSet(true);this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public createPurchaseOrder_result(createPurchaseOrder_result other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.success = other.success;if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public createPurchaseOrder_result deepCopy() {return new createPurchaseOrder_result(this);}@Overridepublic void clear() {setSuccessIsSet(false);this.success = 0;this.wex = null;}public long getSuccess() {return this.success;}public void setSuccess(long success) {this.success = success;setSuccessIsSet(true);}public void unsetSuccess() {__isset_bit_vector.clear(__SUCCESS_ISSET_ID);}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return __isset_bit_vector.get(__SUCCESS_ISSET_ID);}public void setSuccessIsSet(boolean value) {__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Long)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return Long.valueOf(getSuccess());case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case SUCCESS:return isSetSuccess();case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createPurchaseOrder_result)return this.equals((createPurchaseOrder_result)that);return false;}public boolean equals(createPurchaseOrder_result that) {if (that == null)return false;boolean this_present_success = true;boolean that_present_success = true;if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (this.success != that.success)return false;}boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createPurchaseOrder_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.I64) {this.success = iprot.readI64();setSuccessIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);oprot.writeI64(this.success);oprot.writeFieldEnd();} else if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");boolean first = true;sb.append("success:");sb.append(this.success);first = false;if (!first) sb.append(", ");sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class getPurchaseOrder_args implements org.apache.thrift.TBase<getPurchaseOrder_args, getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_args");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);private long id; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {ID((short)1, "id");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // IDreturn ID;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __ID_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);}public getPurchaseOrder_args() {}public getPurchaseOrder_args(long id){this();this.id = id;setIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getPurchaseOrder_args(getPurchaseOrder_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;}public getPurchaseOrder_args deepCopy() {return new getPurchaseOrder_args(this);}@Overridepublic void clear() {setIdIsSet(false);this.id = 0;}public long getId() {return this.id;}public void setId(long id) {this.id = id;setIdIsSet(true);}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been assigned a value) and false otherwise */public boolean isSetId() {return __isset_bit_vector.get(__ID_ISSET_ID);}public void setIdIsSet(boolean value) {__isset_bit_vector.set(__ID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ID:return Long.valueOf(getId());}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case ID:return isSetId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getPurchaseOrder_args)return this.equals((getPurchaseOrder_args)that);return false;}public boolean equals(getPurchaseOrder_args that) {if (that == null)return false;boolean this_present_id = true;boolean that_present_id = true;if (this_present_id || that_present_id) {if (!(this_present_id && that_present_id))return false;if (this.id != that.id)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPurchaseOrder_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());if (lastComparison != 0) {return lastComparison;}if (isSetId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class getPurchaseOrder_result implements org.apache.thrift.TBase<getPurchaseOrder_result, getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseOrder_result");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);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);private PurchaseOrder success; // requiredprivate WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {SUCCESS((short)0, "success"),WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 0: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);}public getPurchaseOrder_result() {}public getPurchaseOrder_result(PurchaseOrder success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public getPurchaseOrder_result(getPurchaseOrder_result other) {if (other.isSetSuccess()) {this.success = new PurchaseOrder(other.success);}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public getPurchaseOrder_result deepCopy() {return new getPurchaseOrder_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public PurchaseOrder getSuccess() {return this.success;}public void setSuccess(PurchaseOrder success) {this.success = success;}public void unsetSuccess() {this.success = null;}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return this.success != null;}public void setSuccessIsSet(boolean value) {if (!value) {this.success = null;}}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((PurchaseOrder)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case SUCCESS:return isSetSuccess();case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getPurchaseOrder_result)return this.equals((getPurchaseOrder_result)that);return false;}public boolean equals(getPurchaseOrder_result that) {if (that == null)return false;boolean this_present_success = true && this.isSetSuccess();boolean that_present_success = true && that.isSetSuccess();if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (!this.success.equals(that.success))return false;}boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getPurchaseOrder_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.success = new PurchaseOrder();this.success.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);this.success.write(oprot);oprot.writeFieldEnd();} else if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class getAllPurchaseOrders_args implements org.apache.thrift.TBase<getAllPurchaseOrders_args, getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_args");private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)1);private POStatus status; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {/**** @see POStatus*/STATUS((short)1, "status");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // STATUSreturn STATUS;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, POStatus.class)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);}public getAllPurchaseOrders_args() {}public getAllPurchaseOrders_args(POStatus status){this();this.status = status;}/*** Performs a deep copy on <i>other</i>.*/public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {if (other.isSetStatus()) {this.status = other.status;}}public getAllPurchaseOrders_args deepCopy() {return new getAllPurchaseOrders_args(this);}@Overridepublic void clear() {this.status = null;}/**** @see POStatus*/public POStatus getStatus() {return this.status;}/**** @see POStatus*/public void setStatus(POStatus status) {this.status = status;}public void unsetStatus() {this.status = null;}/** Returns true if field status is set (has been assigned a value) and false otherwise */public boolean isSetStatus() {return this.status != null;}public void setStatusIsSet(boolean value) {if (!value) {this.status = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case STATUS:if (value == null) {unsetStatus();} else {setStatus((POStatus)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case STATUS:return getStatus();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case STATUS:return isSetStatus();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getAllPurchaseOrders_args)return this.equals((getAllPurchaseOrders_args)that);return false;}public boolean equals(getAllPurchaseOrders_args that) {if (that == null)return false;boolean this_present_status = true && this.isSetStatus();boolean that_present_status = true && that.isSetStatus();if (this_present_status || that_present_status) {if (!(this_present_status && that_present_status))return false;if (!this.status.equals(that.status))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getAllPurchaseOrders_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());if (lastComparison != 0) {return lastComparison;}if (isSetStatus()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // STATUSif (field.type == org.apache.thrift.protocol.TType.I32) {this.status = POStatus.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);if (this.status != null) {oprot.writeFieldBegin(STATUS_FIELD_DESC);oprot.writeI32(this.status.getValue());oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");boolean first = true;sb.append("status:");if (this.status == null) {sb.append("null");} else {sb.append(this.status);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class getAllPurchaseOrders_result implements org.apache.thrift.TBase<getAllPurchaseOrders_result, getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchaseOrders_result");private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);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);private List<PurchaseOrder> success; // requiredprivate WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {SUCCESS((short)0, "success"),WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 0: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseOrder.class))));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);}public getAllPurchaseOrders_result() {}public getAllPurchaseOrders_result(List<PurchaseOrder> success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {if (other.isSetSuccess()) {List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();for (PurchaseOrder other_element : other.success) {__this__success.add(new PurchaseOrder(other_element));}this.success = __this__success;}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public getAllPurchaseOrders_result deepCopy() {return new getAllPurchaseOrders_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<PurchaseOrder> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(PurchaseOrder elem) {if (this.success == null) {this.success = new ArrayList<PurchaseOrder>();}this.success.add(elem);}public List<PurchaseOrder> getSuccess() {return this.success;}public void setSuccess(List<PurchaseOrder> success) {this.success = success;}public void unsetSuccess() {this.success = null;}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return this.success != null;}public void setSuccessIsSet(boolean value) {if (!value) {this.success = null;}}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((List<PurchaseOrder>)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case SUCCESS:return isSetSuccess();case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getAllPurchaseOrders_result)return this.equals((getAllPurchaseOrders_result)that);return false;}public boolean equals(getAllPurchaseOrders_result that) {if (that == null)return false;boolean this_present_success = true && this.isSetSuccess();boolean that_present_success = true && that.isSetSuccess();if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (!this.success.equals(that.success))return false;}boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getAllPurchaseOrders_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();this.success = new ArrayList<PurchaseOrder>(_list4.size);for (int _i5 = 0; _i5 < _list4.size; ++_i5){PurchaseOrder _elem6; // required_elem6 = new PurchaseOrder();_elem6.read(iprot);this.success.add(_elem6);}iprot.readListEnd();}} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));for (PurchaseOrder _iter7 : this.success){_iter7.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();} else if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class getSupplier_args implements org.apache.thrift.TBase<getSupplier_args, getSupplier_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_args");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);private long id; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {ID((short)1, "id");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // IDreturn ID;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __ID_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);}public getSupplier_args() {}public getSupplier_args(long id){this();this.id = id;setIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getSupplier_args(getSupplier_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;}public getSupplier_args deepCopy() {return new getSupplier_args(this);}@Overridepublic void clear() {setIdIsSet(false);this.id = 0;}public long getId() {return this.id;}public void setId(long id) {this.id = id;setIdIsSet(true);}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been assigned a value) and false otherwise */public boolean isSetId() {return __isset_bit_vector.get(__ID_ISSET_ID);}public void setIdIsSet(boolean value) {__isset_bit_vector.set(__ID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ID:return Long.valueOf(getId());}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case ID:return isSetId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getSupplier_args)return this.equals((getSupplier_args)that);return false;}public boolean equals(getSupplier_args that) {if (that == null)return false;boolean this_present_id = true;boolean that_present_id = true;if (this_present_id || that_present_id) {if (!(this_present_id && that_present_id))return false;if (this.id != that.id)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getSupplier_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getSupplier_args typedOther = (getSupplier_args)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());if (lastComparison != 0) {return lastComparison;}if (isSetId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getSupplier_args(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.__isset_bit_vector = new BitSet(1);read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class getSupplier_result implements org.apache.thrift.TBase<getSupplier_result, getSupplier_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupplier_result");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);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);private Supplier success; // requiredprivate WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {SUCCESS((short)0, "success"),WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 0: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Supplier.class)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);}public getSupplier_result() {}public getSupplier_result(Supplier success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public getSupplier_result(getSupplier_result other) {if (other.isSetSuccess()) {this.success = new Supplier(other.success);}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public getSupplier_result deepCopy() {return new getSupplier_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public Supplier getSuccess() {return this.success;}public void setSuccess(Supplier success) {this.success = success;}public void unsetSuccess() {this.success = null;}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return this.success != null;}public void setSuccessIsSet(boolean value) {if (!value) {this.success = null;}}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Supplier)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case SUCCESS:return isSetSuccess();case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getSupplier_result)return this.equals((getSupplier_result)that);return false;}public boolean equals(getSupplier_result that) {if (that == null)return false;boolean this_present_success = true && this.isSetSuccess();boolean that_present_success = true && that.isSetSuccess();if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (!this.success.equals(that.success))return false;}boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getSupplier_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getSupplier_result typedOther = (getSupplier_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.success = new Supplier();this.success.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);this.success.write(oprot);oprot.writeFieldEnd();} else if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getSupplier_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class startPurchase_args implements org.apache.thrift.TBase<startPurchase_args, startPurchase_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField FREIGHT_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("freightCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)3);private long purchaseOrderId; // requiredprivate String invoiceNumber; // requiredprivate double freightCharges; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),INVOICE_NUMBER((short)2, "invoiceNumber"),FREIGHT_CHARGES((short)3, "freightCharges");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // PURCHASE_ORDER_IDreturn PURCHASE_ORDER_ID;case 2: // INVOICE_NUMBERreturn INVOICE_NUMBER;case 3: // FREIGHT_CHARGESreturn FREIGHT_CHARGES;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __PURCHASEORDERID_ISSET_ID = 0;private static final int __FREIGHTCHARGES_ISSET_ID = 1;private BitSet __isset_bit_vector = new BitSet(2);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);}public startPurchase_args() {}public startPurchase_args(long purchaseOrderId,String invoiceNumber,double freightCharges){this();this.purchaseOrderId = purchaseOrderId;setPurchaseOrderIdIsSet(true);this.invoiceNumber = invoiceNumber;this.freightCharges = freightCharges;setFreightChargesIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public startPurchase_args(startPurchase_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.purchaseOrderId = other.purchaseOrderId;if (other.isSetInvoiceNumber()) {this.invoiceNumber = other.invoiceNumber;}this.freightCharges = other.freightCharges;}public startPurchase_args deepCopy() {return new startPurchase_args(this);}@Overridepublic void clear() {setPurchaseOrderIdIsSet(false);this.purchaseOrderId = 0;this.invoiceNumber = null;setFreightChargesIsSet(false);this.freightCharges = 0.0;}public long getPurchaseOrderId() {return this.purchaseOrderId;}public void setPurchaseOrderId(long purchaseOrderId) {this.purchaseOrderId = purchaseOrderId;setPurchaseOrderIdIsSet(true);}public void unsetPurchaseOrderId() {__isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);}/** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseOrderId() {return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);}public void setPurchaseOrderIdIsSet(boolean value) {__isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);}public String getInvoiceNumber() {return this.invoiceNumber;}public void setInvoiceNumber(String invoiceNumber) {this.invoiceNumber = invoiceNumber;}public void unsetInvoiceNumber() {this.invoiceNumber = null;}/** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */public boolean isSetInvoiceNumber() {return this.invoiceNumber != null;}public void setInvoiceNumberIsSet(boolean value) {if (!value) {this.invoiceNumber = null;}}public double getFreightCharges() {return this.freightCharges;}public void setFreightCharges(double freightCharges) {this.freightCharges = freightCharges;setFreightChargesIsSet(true);}public void unsetFreightCharges() {__isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);}/** Returns true if field freightCharges is set (has been assigned a value) and false otherwise */public boolean isSetFreightCharges() {return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);}public void setFreightChargesIsSet(boolean value) {__isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case PURCHASE_ORDER_ID:if (value == null) {unsetPurchaseOrderId();} else {setPurchaseOrderId((Long)value);}break;case INVOICE_NUMBER:if (value == null) {unsetInvoiceNumber();} else {setInvoiceNumber((String)value);}break;case FREIGHT_CHARGES:if (value == null) {unsetFreightCharges();} else {setFreightCharges((Double)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case PURCHASE_ORDER_ID:return Long.valueOf(getPurchaseOrderId());case INVOICE_NUMBER:return getInvoiceNumber();case FREIGHT_CHARGES:return Double.valueOf(getFreightCharges());}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case PURCHASE_ORDER_ID:return isSetPurchaseOrderId();case INVOICE_NUMBER:return isSetInvoiceNumber();case FREIGHT_CHARGES:return isSetFreightCharges();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof startPurchase_args)return this.equals((startPurchase_args)that);return false;}public boolean equals(startPurchase_args that) {if (that == null)return false;boolean this_present_purchaseOrderId = true;boolean that_present_purchaseOrderId = true;if (this_present_purchaseOrderId || that_present_purchaseOrderId) {if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))return false;if (this.purchaseOrderId != that.purchaseOrderId)return false;}boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();if (this_present_invoiceNumber || that_present_invoiceNumber) {if (!(this_present_invoiceNumber && that_present_invoiceNumber))return false;if (!this.invoiceNumber.equals(that.invoiceNumber))return false;}boolean this_present_freightCharges = true;boolean that_present_freightCharges = true;if (this_present_freightCharges || that_present_freightCharges) {if (!(this_present_freightCharges && that_present_freightCharges))return false;if (this.freightCharges != that.freightCharges)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(startPurchase_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;startPurchase_args typedOther = (startPurchase_args)other;lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseOrderId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());if (lastComparison != 0) {return lastComparison;}if (isSetInvoiceNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(typedOther.isSetFreightCharges());if (lastComparison != 0) {return lastComparison;}if (isSetFreightCharges()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // PURCHASE_ORDER_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.purchaseOrderId = iprot.readI64();setPurchaseOrderIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // INVOICE_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.invoiceNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // FREIGHT_CHARGESif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.freightCharges = iprot.readDouble();setFreightChargesIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);oprot.writeI64(this.purchaseOrderId);oprot.writeFieldEnd();if (this.invoiceNumber != null) {oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);oprot.writeString(this.invoiceNumber);oprot.writeFieldEnd();}oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);oprot.writeDouble(this.freightCharges);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("startPurchase_args(");boolean first = true;sb.append("purchaseOrderId:");sb.append(this.purchaseOrderId);first = false;if (!first) sb.append(", ");sb.append("invoiceNumber:");if (this.invoiceNumber == null) {sb.append("null");} else {sb.append(this.invoiceNumber);}first = false;if (!first) sb.append(", ");sb.append("freightCharges:");sb.append(this.freightCharges);first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class startPurchase_result implements org.apache.thrift.TBase<startPurchase_result, startPurchase_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_result");private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);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);private long success; // requiredprivate WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {SUCCESS((short)0, "success"),WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 0: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __SUCCESS_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);}public startPurchase_result() {}public startPurchase_result(long success,WarehouseServiceException wex){this();this.success = success;setSuccessIsSet(true);this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public startPurchase_result(startPurchase_result other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.success = other.success;if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public startPurchase_result deepCopy() {return new startPurchase_result(this);}@Overridepublic void clear() {setSuccessIsSet(false);this.success = 0;this.wex = null;}public long getSuccess() {return this.success;}public void setSuccess(long success) {this.success = success;setSuccessIsSet(true);}public void unsetSuccess() {__isset_bit_vector.clear(__SUCCESS_ISSET_ID);}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return __isset_bit_vector.get(__SUCCESS_ISSET_ID);}public void setSuccessIsSet(boolean value) {__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Long)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return Long.valueOf(getSuccess());case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case SUCCESS:return isSetSuccess();case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof startPurchase_result)return this.equals((startPurchase_result)that);return false;}public boolean equals(startPurchase_result that) {if (that == null)return false;boolean this_present_success = true;boolean that_present_success = true;if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (this.success != that.success)return false;}boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(startPurchase_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;startPurchase_result typedOther = (startPurchase_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.I64) {this.success = iprot.readI64();setSuccessIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);oprot.writeI64(this.success);oprot.writeFieldEnd();} else if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("startPurchase_result(");boolean first = true;sb.append("success:");sb.append(this.success);first = false;if (!first) sb.append(", ");sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class closePurchase_args implements org.apache.thrift.TBase<closePurchase_args, closePurchase_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_args");private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)1);private long purchaseId; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {PURCHASE_ID((short)1, "purchaseId");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // PURCHASE_IDreturn PURCHASE_ID;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __PURCHASEID_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);}public closePurchase_args() {}public closePurchase_args(long purchaseId){this();this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public closePurchase_args(closePurchase_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.purchaseId = other.purchaseId;}public closePurchase_args deepCopy() {return new closePurchase_args(this);}@Overridepublic void clear() {setPurchaseIdIsSet(false);this.purchaseId = 0;}public long getPurchaseId() {return this.purchaseId;}public void setPurchaseId(long purchaseId) {this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}public void unsetPurchaseId() {__isset_bit_vector.clear(__PURCHASEID_ISSET_ID);}/** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseId() {return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);}public void setPurchaseIdIsSet(boolean value) {__isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case PURCHASE_ID:if (value == null) {unsetPurchaseId();} else {setPurchaseId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case PURCHASE_ID:return Long.valueOf(getPurchaseId());}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case PURCHASE_ID:return isSetPurchaseId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof closePurchase_args)return this.equals((closePurchase_args)that);return false;}public boolean equals(closePurchase_args that) {if (that == null)return false;boolean this_present_purchaseId = true;boolean that_present_purchaseId = true;if (this_present_purchaseId || that_present_purchaseId) {if (!(this_present_purchaseId && that_present_purchaseId))return false;if (this.purchaseId != that.purchaseId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(closePurchase_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;closePurchase_args typedOther = (closePurchase_args)other;lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // PURCHASE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.purchaseId = iprot.readI64();setPurchaseIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);oprot.writeI64(this.purchaseId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("closePurchase_args(");boolean first = true;sb.append("purchaseId:");sb.append(this.purchaseId);first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class closePurchase_result implements org.apache.thrift.TBase<closePurchase_result, closePurchase_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closePurchase_result");private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);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);private long success; // requiredprivate WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {SUCCESS((short)0, "success"),WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 0: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __SUCCESS_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);}public closePurchase_result() {}public closePurchase_result(long success,WarehouseServiceException wex){this();this.success = success;setSuccessIsSet(true);this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public closePurchase_result(closePurchase_result other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.success = other.success;if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public closePurchase_result deepCopy() {return new closePurchase_result(this);}@Overridepublic void clear() {setSuccessIsSet(false);this.success = 0;this.wex = null;}public long getSuccess() {return this.success;}public void setSuccess(long success) {this.success = success;setSuccessIsSet(true);}public void unsetSuccess() {__isset_bit_vector.clear(__SUCCESS_ISSET_ID);}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return __isset_bit_vector.get(__SUCCESS_ISSET_ID);}public void setSuccessIsSet(boolean value) {__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((Long)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return Long.valueOf(getSuccess());case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case SUCCESS:return isSetSuccess();case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof closePurchase_result)return this.equals((closePurchase_result)that);return false;}public boolean equals(closePurchase_result that) {if (that == null)return false;boolean this_present_success = true;boolean that_present_success = true;if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (this.success != that.success)return false;}boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(closePurchase_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;closePurchase_result typedOther = (closePurchase_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.I64) {this.success = iprot.readI64();setSuccessIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);oprot.writeI64(this.success);oprot.writeFieldEnd();} else if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("closePurchase_result(");boolean first = true;sb.append("success:");sb.append(this.success);first = false;if (!first) sb.append(", ");sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class getAllPurchases_args implements org.apache.thrift.TBase<getAllPurchases_args, getAllPurchases_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_args");private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField OPEN_FIELD_DESC = new org.apache.thrift.protocol.TField("open", org.apache.thrift.protocol.TType.BOOL, (short)2);private long purchaseOrderId; // requiredprivate boolean open; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),OPEN((short)2, "open");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // PURCHASE_ORDER_IDreturn PURCHASE_ORDER_ID;case 2: // OPENreturn OPEN;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __PURCHASEORDERID_ISSET_ID = 0;private static final int __OPEN_ISSET_ID = 1;private BitSet __isset_bit_vector = new BitSet(2);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.OPEN, new org.apache.thrift.meta_data.FieldMetaData("open", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);}public getAllPurchases_args() {}public getAllPurchases_args(long purchaseOrderId,boolean open){this();this.purchaseOrderId = purchaseOrderId;setPurchaseOrderIdIsSet(true);this.open = open;setOpenIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getAllPurchases_args(getAllPurchases_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.purchaseOrderId = other.purchaseOrderId;this.open = other.open;}public getAllPurchases_args deepCopy() {return new getAllPurchases_args(this);}@Overridepublic void clear() {setPurchaseOrderIdIsSet(false);this.purchaseOrderId = 0;setOpenIsSet(false);this.open = false;}public long getPurchaseOrderId() {return this.purchaseOrderId;}public void setPurchaseOrderId(long purchaseOrderId) {this.purchaseOrderId = purchaseOrderId;setPurchaseOrderIdIsSet(true);}public void unsetPurchaseOrderId() {__isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);}/** Returns true if field purchaseOrderId is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseOrderId() {return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);}public void setPurchaseOrderIdIsSet(boolean value) {__isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);}public boolean isOpen() {return this.open;}public void setOpen(boolean open) {this.open = open;setOpenIsSet(true);}public void unsetOpen() {__isset_bit_vector.clear(__OPEN_ISSET_ID);}/** Returns true if field open is set (has been assigned a value) and false otherwise */public boolean isSetOpen() {return __isset_bit_vector.get(__OPEN_ISSET_ID);}public void setOpenIsSet(boolean value) {__isset_bit_vector.set(__OPEN_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case PURCHASE_ORDER_ID:if (value == null) {unsetPurchaseOrderId();} else {setPurchaseOrderId((Long)value);}break;case OPEN:if (value == null) {unsetOpen();} else {setOpen((Boolean)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case PURCHASE_ORDER_ID:return Long.valueOf(getPurchaseOrderId());case OPEN:return Boolean.valueOf(isOpen());}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case PURCHASE_ORDER_ID:return isSetPurchaseOrderId();case OPEN:return isSetOpen();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getAllPurchases_args)return this.equals((getAllPurchases_args)that);return false;}public boolean equals(getAllPurchases_args that) {if (that == null)return false;boolean this_present_purchaseOrderId = true;boolean that_present_purchaseOrderId = true;if (this_present_purchaseOrderId || that_present_purchaseOrderId) {if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))return false;if (this.purchaseOrderId != that.purchaseOrderId)return false;}boolean this_present_open = true;boolean that_present_open = true;if (this_present_open || that_present_open) {if (!(this_present_open && that_present_open))return false;if (this.open != that.open)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getAllPurchases_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getAllPurchases_args typedOther = (getAllPurchases_args)other;lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(typedOther.isSetPurchaseOrderId());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseOrderId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseOrderId, typedOther.purchaseOrderId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetOpen()).compareTo(typedOther.isSetOpen());if (lastComparison != 0) {return lastComparison;}if (isSetOpen()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open, typedOther.open);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // PURCHASE_ORDER_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.purchaseOrderId = iprot.readI64();setPurchaseOrderIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // OPENif (field.type == org.apache.thrift.protocol.TType.BOOL) {this.open = iprot.readBool();setOpenIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);oprot.writeI64(this.purchaseOrderId);oprot.writeFieldEnd();oprot.writeFieldBegin(OPEN_FIELD_DESC);oprot.writeBool(this.open);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getAllPurchases_args(");boolean first = true;sb.append("purchaseOrderId:");sb.append(this.purchaseOrderId);first = false;if (!first) sb.append(", ");sb.append("open:");sb.append(this.open);first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class getAllPurchases_result implements org.apache.thrift.TBase<getAllPurchases_result, getAllPurchases_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPurchases_result");private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);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);private List<Purchase> success; // requiredprivate WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {SUCCESS((short)0, "success"),WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 0: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Purchase.class))));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);}public getAllPurchases_result() {}public getAllPurchases_result(List<Purchase> success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public getAllPurchases_result(getAllPurchases_result other) {if (other.isSetSuccess()) {List<Purchase> __this__success = new ArrayList<Purchase>();for (Purchase other_element : other.success) {__this__success.add(new Purchase(other_element));}this.success = __this__success;}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public getAllPurchases_result deepCopy() {return new getAllPurchases_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<Purchase> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(Purchase elem) {if (this.success == null) {this.success = new ArrayList<Purchase>();}this.success.add(elem);}public List<Purchase> getSuccess() {return this.success;}public void setSuccess(List<Purchase> success) {this.success = success;}public void unsetSuccess() {this.success = null;}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return this.success != null;}public void setSuccessIsSet(boolean value) {if (!value) {this.success = null;}}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((List<Purchase>)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case SUCCESS:return isSetSuccess();case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getAllPurchases_result)return this.equals((getAllPurchases_result)that);return false;}public boolean equals(getAllPurchases_result that) {if (that == null)return false;boolean this_present_success = true && this.isSetSuccess();boolean that_present_success = true && that.isSetSuccess();if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (!this.success.equals(that.success))return false;}boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getAllPurchases_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getAllPurchases_result typedOther = (getAllPurchases_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();this.success = new ArrayList<Purchase>(_list8.size);for (int _i9 = 0; _i9 < _list8.size; ++_i9){Purchase _elem10; // required_elem10 = new Purchase();_elem10.read(iprot);this.success.add(_elem10);}iprot.readListEnd();}} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));for (Purchase _iter11 : this.success){_iter11.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();} else if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getAllPurchases_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}first = false;if (!first) sb.append(", ");sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class scanIn_args implements org.apache.thrift.TBase<scanIn_args, scanIn_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanIn_args");private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField IMEI_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("imeiNumber", org.apache.thrift.protocol.TType.STRING, (short)3);private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4);private long purchaseId; // requiredprivate String itemNumber; // requiredprivate String imeiNumber; // requiredprivate ScanType type; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {PURCHASE_ID((short)1, "purchaseId"),ITEM_NUMBER((short)2, "itemNumber"),IMEI_NUMBER((short)3, "imeiNumber"),/**** @see ScanType*/TYPE((short)4, "type");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // PURCHASE_IDreturn PURCHASE_ID;case 2: // ITEM_NUMBERreturn ITEM_NUMBER;case 3: // IMEI_NUMBERreturn IMEI_NUMBER;case 4: // TYPEreturn TYPE;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentsprivate static final int __PURCHASEID_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.IMEI_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("imeiNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanIn_args.class, metaDataMap);}public scanIn_args() {}public scanIn_args(long purchaseId,String itemNumber,String imeiNumber,ScanType type){this();this.purchaseId = purchaseId;setPurchaseIdIsSet(true);this.itemNumber = itemNumber;this.imeiNumber = imeiNumber;this.type = type;}/*** Performs a deep copy on <i>other</i>.*/public scanIn_args(scanIn_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.purchaseId = other.purchaseId;if (other.isSetItemNumber()) {this.itemNumber = other.itemNumber;}if (other.isSetImeiNumber()) {this.imeiNumber = other.imeiNumber;}if (other.isSetType()) {this.type = other.type;}}public scanIn_args deepCopy() {return new scanIn_args(this);}@Overridepublic void clear() {setPurchaseIdIsSet(false);this.purchaseId = 0;this.itemNumber = null;this.imeiNumber = null;this.type = null;}public long getPurchaseId() {return this.purchaseId;}public void setPurchaseId(long purchaseId) {this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}public void unsetPurchaseId() {__isset_bit_vector.clear(__PURCHASEID_ISSET_ID);}/** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseId() {return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);}public void setPurchaseIdIsSet(boolean value) {__isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);}public String getItemNumber() {return this.itemNumber;}public void setItemNumber(String itemNumber) {this.itemNumber = itemNumber;}public void unsetItemNumber() {this.itemNumber = null;}/** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */public boolean isSetItemNumber() {return this.itemNumber != null;}public void setItemNumberIsSet(boolean value) {if (!value) {this.itemNumber = null;}}public String getImeiNumber() {return this.imeiNumber;}public void setImeiNumber(String imeiNumber) {this.imeiNumber = imeiNumber;}public void unsetImeiNumber() {this.imeiNumber = null;}/** Returns true if field imeiNumber is set (has been assigned a value) and false otherwise */public boolean isSetImeiNumber() {return this.imeiNumber != null;}public void setImeiNumberIsSet(boolean value) {if (!value) {this.imeiNumber = null;}}/**** @see ScanType*/public ScanType getType() {return this.type;}/**** @see ScanType*/public void setType(ScanType type) {this.type = type;}public void unsetType() {this.type = null;}/** Returns true if field type is set (has been assigned a value) and false otherwise */public boolean isSetType() {return this.type != null;}public void setTypeIsSet(boolean value) {if (!value) {this.type = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case PURCHASE_ID:if (value == null) {unsetPurchaseId();} else {setPurchaseId((Long)value);}break;case ITEM_NUMBER:if (value == null) {unsetItemNumber();} else {setItemNumber((String)value);}break;case IMEI_NUMBER:if (value == null) {unsetImeiNumber();} else {setImeiNumber((String)value);}break;case TYPE:if (value == null) {unsetType();} else {setType((ScanType)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case PURCHASE_ID:return Long.valueOf(getPurchaseId());case ITEM_NUMBER:return getItemNumber();case IMEI_NUMBER:return getImeiNumber();case TYPE:return getType();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case PURCHASE_ID:return isSetPurchaseId();case ITEM_NUMBER:return isSetItemNumber();case IMEI_NUMBER:return isSetImeiNumber();case TYPE:return isSetType();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanIn_args)return this.equals((scanIn_args)that);return false;}public boolean equals(scanIn_args that) {if (that == null)return false;boolean this_present_purchaseId = true;boolean that_present_purchaseId = true;if (this_present_purchaseId || that_present_purchaseId) {if (!(this_present_purchaseId && that_present_purchaseId))return false;if (this.purchaseId != that.purchaseId)return false;}boolean this_present_itemNumber = true && this.isSetItemNumber();boolean that_present_itemNumber = true && that.isSetItemNumber();if (this_present_itemNumber || that_present_itemNumber) {if (!(this_present_itemNumber && that_present_itemNumber))return false;if (!this.itemNumber.equals(that.itemNumber))return false;}boolean this_present_imeiNumber = true && this.isSetImeiNumber();boolean that_present_imeiNumber = true && that.isSetImeiNumber();if (this_present_imeiNumber || that_present_imeiNumber) {if (!(this_present_imeiNumber && that_present_imeiNumber))return false;if (!this.imeiNumber.equals(that.imeiNumber))return false;}boolean this_present_type = true && this.isSetType();boolean that_present_type = true && that.isSetType();if (this_present_type || that_present_type) {if (!(this_present_type && that_present_type))return false;if (!this.type.equals(that.type))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanIn_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanIn_args typedOther = (scanIn_args)other;lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());if (lastComparison != 0) {return lastComparison;}if (isSetItemNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(typedOther.isSetImeiNumber());if (lastComparison != 0) {return lastComparison;}if (isSetImeiNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imeiNumber, typedOther.imeiNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());if (lastComparison != 0) {return lastComparison;}if (isSetType()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // PURCHASE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.purchaseId = iprot.readI64();setPurchaseIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // ITEM_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.itemNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // IMEI_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.imeiNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // TYPEif (field.type == org.apache.thrift.protocol.TType.I32) {this.type = ScanType.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);oprot.writeI64(this.purchaseId);oprot.writeFieldEnd();if (this.itemNumber != null) {oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);oprot.writeString(this.itemNumber);oprot.writeFieldEnd();}if (this.imeiNumber != null) {oprot.writeFieldBegin(IMEI_NUMBER_FIELD_DESC);oprot.writeString(this.imeiNumber);oprot.writeFieldEnd();}if (this.type != null) {oprot.writeFieldBegin(TYPE_FIELD_DESC);oprot.writeI32(this.type.getValue());oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanIn_args(");boolean first = true;sb.append("purchaseId:");sb.append(this.purchaseId);first = false;if (!first) sb.append(", ");sb.append("itemNumber:");if (this.itemNumber == null) {sb.append("null");} else {sb.append(this.itemNumber);}first = false;if (!first) sb.append(", ");sb.append("imeiNumber:");if (this.imeiNumber == null) {sb.append("null");} else {sb.append(this.imeiNumber);}first = false;if (!first) sb.append(", ");sb.append("type:");if (this.type == null) {sb.append("null");} else {sb.append(this.type);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class scanIn_result implements org.apache.thrift.TBase<scanIn_result, scanIn_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanIn_result");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);private WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanIn_result.class, metaDataMap);}public scanIn_result() {}public scanIn_result(WarehouseServiceException wex){this();this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public scanIn_result(scanIn_result other) {if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public scanIn_result deepCopy() {return new scanIn_result(this);}@Overridepublic void clear() {this.wex = null;}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanIn_result)return this.equals((scanIn_result)that);return false;}public boolean equals(scanIn_result that) {if (that == null)return false;boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanIn_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanIn_result typedOther = (scanIn_result)other;lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanIn_result(");boolean first = true;sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class scanOut_args implements org.apache.thrift.TBase<scanOut_args, scanOut_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanOut_args");private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)1);private static final org.apache.thrift.protocol.TField IMEI_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("imeiNumber", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)3);private String itemNumber; // requiredprivate String imeiNumber; // requiredprivate ScanType type; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {ITEM_NUMBER((short)1, "itemNumber"),IMEI_NUMBER((short)2, "imeiNumber"),/**** @see ScanType*/TYPE((short)3, "type");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // ITEM_NUMBERreturn ITEM_NUMBER;case 2: // IMEI_NUMBERreturn IMEI_NUMBER;case 3: // TYPEreturn TYPE;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.IMEI_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("imeiNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanOut_args.class, metaDataMap);}public scanOut_args() {}public scanOut_args(String itemNumber,String imeiNumber,ScanType type){this();this.itemNumber = itemNumber;this.imeiNumber = imeiNumber;this.type = type;}/*** Performs a deep copy on <i>other</i>.*/public scanOut_args(scanOut_args other) {if (other.isSetItemNumber()) {this.itemNumber = other.itemNumber;}if (other.isSetImeiNumber()) {this.imeiNumber = other.imeiNumber;}if (other.isSetType()) {this.type = other.type;}}public scanOut_args deepCopy() {return new scanOut_args(this);}@Overridepublic void clear() {this.itemNumber = null;this.imeiNumber = null;this.type = null;}public String getItemNumber() {return this.itemNumber;}public void setItemNumber(String itemNumber) {this.itemNumber = itemNumber;}public void unsetItemNumber() {this.itemNumber = null;}/** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */public boolean isSetItemNumber() {return this.itemNumber != null;}public void setItemNumberIsSet(boolean value) {if (!value) {this.itemNumber = null;}}public String getImeiNumber() {return this.imeiNumber;}public void setImeiNumber(String imeiNumber) {this.imeiNumber = imeiNumber;}public void unsetImeiNumber() {this.imeiNumber = null;}/** Returns true if field imeiNumber is set (has been assigned a value) and false otherwise */public boolean isSetImeiNumber() {return this.imeiNumber != null;}public void setImeiNumberIsSet(boolean value) {if (!value) {this.imeiNumber = null;}}/**** @see ScanType*/public ScanType getType() {return this.type;}/**** @see ScanType*/public void setType(ScanType type) {this.type = type;}public void unsetType() {this.type = null;}/** Returns true if field type is set (has been assigned a value) and false otherwise */public boolean isSetType() {return this.type != null;}public void setTypeIsSet(boolean value) {if (!value) {this.type = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case ITEM_NUMBER:if (value == null) {unsetItemNumber();} else {setItemNumber((String)value);}break;case IMEI_NUMBER:if (value == null) {unsetImeiNumber();} else {setImeiNumber((String)value);}break;case TYPE:if (value == null) {unsetType();} else {setType((ScanType)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ITEM_NUMBER:return getItemNumber();case IMEI_NUMBER:return getImeiNumber();case TYPE:return getType();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case ITEM_NUMBER:return isSetItemNumber();case IMEI_NUMBER:return isSetImeiNumber();case TYPE:return isSetType();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanOut_args)return this.equals((scanOut_args)that);return false;}public boolean equals(scanOut_args that) {if (that == null)return false;boolean this_present_itemNumber = true && this.isSetItemNumber();boolean that_present_itemNumber = true && that.isSetItemNumber();if (this_present_itemNumber || that_present_itemNumber) {if (!(this_present_itemNumber && that_present_itemNumber))return false;if (!this.itemNumber.equals(that.itemNumber))return false;}boolean this_present_imeiNumber = true && this.isSetImeiNumber();boolean that_present_imeiNumber = true && that.isSetImeiNumber();if (this_present_imeiNumber || that_present_imeiNumber) {if (!(this_present_imeiNumber && that_present_imeiNumber))return false;if (!this.imeiNumber.equals(that.imeiNumber))return false;}boolean this_present_type = true && this.isSetType();boolean that_present_type = true && that.isSetType();if (this_present_type || that_present_type) {if (!(this_present_type && that_present_type))return false;if (!this.type.equals(that.type))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanOut_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanOut_args typedOther = (scanOut_args)other;lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());if (lastComparison != 0) {return lastComparison;}if (isSetItemNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(typedOther.isSetImeiNumber());if (lastComparison != 0) {return lastComparison;}if (isSetImeiNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imeiNumber, typedOther.imeiNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());if (lastComparison != 0) {return lastComparison;}if (isSetType()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // ITEM_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.itemNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // IMEI_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.imeiNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // TYPEif (field.type == org.apache.thrift.protocol.TType.I32) {this.type = ScanType.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);if (this.itemNumber != null) {oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);oprot.writeString(this.itemNumber);oprot.writeFieldEnd();}if (this.imeiNumber != null) {oprot.writeFieldBegin(IMEI_NUMBER_FIELD_DESC);oprot.writeString(this.imeiNumber);oprot.writeFieldEnd();}if (this.type != null) {oprot.writeFieldBegin(TYPE_FIELD_DESC);oprot.writeI32(this.type.getValue());oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanOut_args(");boolean first = true;sb.append("itemNumber:");if (this.itemNumber == null) {sb.append("null");} else {sb.append(this.itemNumber);}first = false;if (!first) sb.append(", ");sb.append("imeiNumber:");if (this.imeiNumber == null) {sb.append("null");} else {sb.append(this.imeiNumber);}first = false;if (!first) sb.append(", ");sb.append("type:");if (this.type == null) {sb.append("null");} else {sb.append(this.type);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}public static class scanOut_result implements org.apache.thrift.TBase<scanOut_result, scanOut_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanOut_result");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);private WarehouseServiceException wex; // required/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */public enum _Fields implements org.apache.thrift.TFieldIdEnum {WEX((short)1, "wex");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();static {for (_Fields field : EnumSet.allOf(_Fields.class)) {byName.put(field.getFieldName(), field);}}/*** Find the _Fields constant that matches fieldId, or null if its not found.*/public static _Fields findByThriftId(int fieldId) {switch(fieldId) {case 1: // WEXreturn WEX;default:return null;}}/*** Find the _Fields constant that matches fieldId, throwing an exception* if it is not found.*/public static _Fields findByThriftIdOrThrow(int fieldId) {_Fields fields = findByThriftId(fieldId);if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");return fields;}/*** Find the _Fields constant that matches name, or null if its not found.*/public static _Fields findByName(String name) {return byName.get(name);}private final short _thriftId;private final String _fieldName;_Fields(short thriftId, String fieldName) {_thriftId = thriftId;_fieldName = fieldName;}public short getThriftFieldId() {return _thriftId;}public String getFieldName() {return _fieldName;}}// isset id assignmentspublic static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanOut_result.class, metaDataMap);}public scanOut_result() {}public scanOut_result(WarehouseServiceException wex){this();this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public scanOut_result(scanOut_result other) {if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public scanOut_result deepCopy() {return new scanOut_result(this);}@Overridepublic void clear() {this.wex = null;}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case WEX:return getWex();}throw new IllegalStateException();}/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */public boolean isSet(_Fields field) {if (field == null) {throw new IllegalArgumentException();}switch (field) {case WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanOut_result)return this.equals((scanOut_result)that);return false;}public boolean equals(scanOut_result that) {if (that == null)return false;boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanOut_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanOut_result typedOther = (scanOut_result)other;lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);if (lastComparison != 0) {return lastComparison;}}return 0;}public _Fields fieldForId(int fieldId) {return _Fields.findByThriftId(fieldId);}public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanOut_result(");boolean first = true;sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {try {write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {try {read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));} catch (org.apache.thrift.TException te) {throw new java.io.IOException(te);}}}}