Subversion Repositories SmartDukaan

Rev

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

Rev 4754 Rev 5185
Line 112... Line 112...
112
     * 
112
     * 
113
     * @param purchaseOrder
113
     * @param purchaseOrder
114
     */
114
     */
115
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
115
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder) throws PurchaseServiceException, org.apache.thrift.TException;
116
 
116
 
-
 
117
    /**
-
 
118
     * Fulfills a given purchase id with an item and its quantity.
-
 
119
     * 
-
 
120
     * @param purchaseId
-
 
121
     * @param itemId
-
 
122
     * @param quantity
-
 
123
     */
-
 
124
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
-
 
125
 
117
  }
126
  }
118
 
127
 
119
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
128
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
120
 
129
 
121
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
130
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
Line 140... Line 149...
140
 
149
 
141
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
150
    public void fulfillPO(long purchaseOrderId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fulfillPO_call> resultHandler) throws org.apache.thrift.TException;
142
 
151
 
143
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
152
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
144
 
153
 
-
 
154
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
-
 
155
 
145
  }
156
  }
146
 
157
 
147
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
158
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
148
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
159
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
149
      public Factory() {}
160
      public Factory() {}
Line 469... Line 480...
469
        throw result.e;
480
        throw result.e;
470
      }
481
      }
471
      return;
482
      return;
472
    }
483
    }
473
 
484
 
-
 
485
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException
-
 
486
    {
-
 
487
      send_unFulfillPO(purchaseId, itemId, quantity);
-
 
488
      recv_unFulfillPO();
-
 
489
    }
-
 
490
 
-
 
491
    public void send_unFulfillPO(long purchaseId, long itemId, long quantity) throws org.apache.thrift.TException
-
 
492
    {
-
 
493
      unFulfillPO_args args = new unFulfillPO_args();
-
 
494
      args.setPurchaseId(purchaseId);
-
 
495
      args.setItemId(itemId);
-
 
496
      args.setQuantity(quantity);
-
 
497
      sendBase("unFulfillPO", args);
-
 
498
    }
-
 
499
 
-
 
500
    public void recv_unFulfillPO() throws PurchaseServiceException, org.apache.thrift.TException
-
 
501
    {
-
 
502
      unFulfillPO_result result = new unFulfillPO_result();
-
 
503
      receiveBase(result, "unFulfillPO");
-
 
504
      if (result.e != null) {
-
 
505
        throw result.e;
-
 
506
      }
-
 
507
      return;
-
 
508
    }
-
 
509
 
474
  }
510
  }
475
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
511
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
476
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
512
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
477
      private org.apache.thrift.async.TAsyncClientManager clientManager;
513
      private org.apache.thrift.async.TAsyncClientManager clientManager;
478
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
514
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 883... Line 919...
883
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
919
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
884
        (new Client(prot)).recv_updatePurchaseOrder();
920
        (new Client(prot)).recv_updatePurchaseOrder();
885
      }
921
      }
886
    }
922
    }
887
 
923
 
-
 
924
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_call> resultHandler) throws org.apache.thrift.TException {
-
 
925
      checkReady();
-
 
926
      unFulfillPO_call method_call = new unFulfillPO_call(purchaseId, itemId, quantity, resultHandler, this, ___protocolFactory, ___transport);
-
 
927
      this.___currentMethod = method_call;
-
 
928
      ___manager.call(method_call);
-
 
929
    }
-
 
930
 
-
 
931
    public static class unFulfillPO_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
932
      private long purchaseId;
-
 
933
      private long itemId;
-
 
934
      private long quantity;
-
 
935
      public unFulfillPO_call(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<unFulfillPO_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 {
-
 
936
        super(client, protocolFactory, transport, resultHandler, false);
-
 
937
        this.purchaseId = purchaseId;
-
 
938
        this.itemId = itemId;
-
 
939
        this.quantity = quantity;
-
 
940
      }
-
 
941
 
-
 
942
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
943
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unFulfillPO", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
944
        unFulfillPO_args args = new unFulfillPO_args();
-
 
945
        args.setPurchaseId(purchaseId);
-
 
946
        args.setItemId(itemId);
-
 
947
        args.setQuantity(quantity);
-
 
948
        args.write(prot);
-
 
949
        prot.writeMessageEnd();
-
 
950
      }
-
 
951
 
-
 
952
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
-
 
953
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
954
          throw new IllegalStateException("Method call not finished!");
-
 
955
        }
-
 
956
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
957
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
958
        (new Client(prot)).recv_unFulfillPO();
-
 
959
      }
-
 
960
    }
-
 
961
 
888
  }
962
  }
889
 
963
 
890
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
964
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
891
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
965
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
892
    public Processor(I iface) {
966
    public Processor(I iface) {
Line 908... Line 982...
908
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
982
      processMap.put("getPurchaseOrderForPurchase", new getPurchaseOrderForPurchase());
909
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
983
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
910
      processMap.put("getSuppliers", new getSuppliers());
984
      processMap.put("getSuppliers", new getSuppliers());
911
      processMap.put("fulfillPO", new fulfillPO());
985
      processMap.put("fulfillPO", new fulfillPO());
912
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
986
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
-
 
987
      processMap.put("unFulfillPO", new unFulfillPO());
913
      return processMap;
988
      return processMap;
914
    }
989
    }
915
 
990
 
916
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
991
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
917
      public createPurchaseOrder() {
992
      public createPurchaseOrder() {
Line 1150... Line 1225...
1150
        }
1225
        }
1151
        return result;
1226
        return result;
1152
      }
1227
      }
1153
    }
1228
    }
1154
 
1229
 
-
 
1230
    private static class unFulfillPO<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unFulfillPO_args> {
-
 
1231
      public unFulfillPO() {
-
 
1232
        super("unFulfillPO");
-
 
1233
      }
-
 
1234
 
-
 
1235
      protected unFulfillPO_args getEmptyArgsInstance() {
-
 
1236
        return new unFulfillPO_args();
-
 
1237
      }
-
 
1238
 
-
 
1239
      protected unFulfillPO_result getResult(I iface, unFulfillPO_args args) throws org.apache.thrift.TException {
-
 
1240
        unFulfillPO_result result = new unFulfillPO_result();
-
 
1241
        try {
-
 
1242
          iface.unFulfillPO(args.purchaseId, args.itemId, args.quantity);
-
 
1243
        } catch (PurchaseServiceException e) {
-
 
1244
          result.e = e;
-
 
1245
        }
-
 
1246
        return result;
-
 
1247
      }
-
 
1248
    }
-
 
1249
 
1155
  }
1250
  }
1156
 
1251
 
1157
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1252
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1158
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1253
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1159
 
1254
 
Line 9447... Line 9542...
9447
      boolean first = true;
9542
      boolean first = true;
9448
 
9543
 
9449
      sb.append("e:");
9544
      sb.append("e:");
9450
      if (this.e == null) {
9545
      if (this.e == null) {
9451
        sb.append("null");
9546
        sb.append("null");
-
 
9547
      } else {
-
 
9548
        sb.append(this.e);
-
 
9549
      }
-
 
9550
      first = false;
-
 
9551
      sb.append(")");
-
 
9552
      return sb.toString();
-
 
9553
    }
-
 
9554
 
-
 
9555
    public void validate() throws org.apache.thrift.TException {
-
 
9556
      // check for required fields
-
 
9557
    }
-
 
9558
 
-
 
9559
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
9560
      try {
-
 
9561
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
9562
      } catch (org.apache.thrift.TException te) {
-
 
9563
        throw new java.io.IOException(te);
-
 
9564
      }
-
 
9565
    }
-
 
9566
 
-
 
9567
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
9568
      try {
-
 
9569
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
9570
      } catch (org.apache.thrift.TException te) {
-
 
9571
        throw new java.io.IOException(te);
-
 
9572
      }
-
 
9573
    }
-
 
9574
 
-
 
9575
  }
-
 
9576
 
-
 
9577
  public static class unFulfillPO_args implements org.apache.thrift.TBase<unFulfillPO_args, unFulfillPO_args._Fields>, java.io.Serializable, Cloneable   {
-
 
9578
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_args");
-
 
9579
 
-
 
9580
    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);
-
 
9581
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
9582
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)3);
-
 
9583
 
-
 
9584
    private long purchaseId; // required
-
 
9585
    private long itemId; // required
-
 
9586
    private long quantity; // required
-
 
9587
 
-
 
9588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
9589
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
9590
      PURCHASE_ID((short)1, "purchaseId"),
-
 
9591
      ITEM_ID((short)2, "itemId"),
-
 
9592
      QUANTITY((short)3, "quantity");
-
 
9593
 
-
 
9594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
9595
 
-
 
9596
      static {
-
 
9597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
9598
          byName.put(field.getFieldName(), field);
-
 
9599
        }
-
 
9600
      }
-
 
9601
 
-
 
9602
      /**
-
 
9603
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
9604
       */
-
 
9605
      public static _Fields findByThriftId(int fieldId) {
-
 
9606
        switch(fieldId) {
-
 
9607
          case 1: // PURCHASE_ID
-
 
9608
            return PURCHASE_ID;
-
 
9609
          case 2: // ITEM_ID
-
 
9610
            return ITEM_ID;
-
 
9611
          case 3: // QUANTITY
-
 
9612
            return QUANTITY;
-
 
9613
          default:
-
 
9614
            return null;
-
 
9615
        }
-
 
9616
      }
-
 
9617
 
-
 
9618
      /**
-
 
9619
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
9620
       * if it is not found.
-
 
9621
       */
-
 
9622
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
9623
        _Fields fields = findByThriftId(fieldId);
-
 
9624
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
9625
        return fields;
-
 
9626
      }
-
 
9627
 
-
 
9628
      /**
-
 
9629
       * Find the _Fields constant that matches name, or null if its not found.
-
 
9630
       */
-
 
9631
      public static _Fields findByName(String name) {
-
 
9632
        return byName.get(name);
-
 
9633
      }
-
 
9634
 
-
 
9635
      private final short _thriftId;
-
 
9636
      private final String _fieldName;
-
 
9637
 
-
 
9638
      _Fields(short thriftId, String fieldName) {
-
 
9639
        _thriftId = thriftId;
-
 
9640
        _fieldName = fieldName;
-
 
9641
      }
-
 
9642
 
-
 
9643
      public short getThriftFieldId() {
-
 
9644
        return _thriftId;
-
 
9645
      }
-
 
9646
 
-
 
9647
      public String getFieldName() {
-
 
9648
        return _fieldName;
-
 
9649
      }
-
 
9650
    }
-
 
9651
 
-
 
9652
    // isset id assignments
-
 
9653
    private static final int __PURCHASEID_ISSET_ID = 0;
-
 
9654
    private static final int __ITEMID_ISSET_ID = 1;
-
 
9655
    private static final int __QUANTITY_ISSET_ID = 2;
-
 
9656
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
9657
 
-
 
9658
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
9659
    static {
-
 
9660
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
9661
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
9662
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
9663
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
9664
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
9665
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
9666
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
9667
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
9668
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_args.class, metaDataMap);
-
 
9669
    }
-
 
9670
 
-
 
9671
    public unFulfillPO_args() {
-
 
9672
    }
-
 
9673
 
-
 
9674
    public unFulfillPO_args(
-
 
9675
      long purchaseId,
-
 
9676
      long itemId,
-
 
9677
      long quantity)
-
 
9678
    {
-
 
9679
      this();
-
 
9680
      this.purchaseId = purchaseId;
-
 
9681
      setPurchaseIdIsSet(true);
-
 
9682
      this.itemId = itemId;
-
 
9683
      setItemIdIsSet(true);
-
 
9684
      this.quantity = quantity;
-
 
9685
      setQuantityIsSet(true);
-
 
9686
    }
-
 
9687
 
-
 
9688
    /**
-
 
9689
     * Performs a deep copy on <i>other</i>.
-
 
9690
     */
-
 
9691
    public unFulfillPO_args(unFulfillPO_args other) {
-
 
9692
      __isset_bit_vector.clear();
-
 
9693
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
9694
      this.purchaseId = other.purchaseId;
-
 
9695
      this.itemId = other.itemId;
-
 
9696
      this.quantity = other.quantity;
-
 
9697
    }
-
 
9698
 
-
 
9699
    public unFulfillPO_args deepCopy() {
-
 
9700
      return new unFulfillPO_args(this);
-
 
9701
    }
-
 
9702
 
-
 
9703
    @Override
-
 
9704
    public void clear() {
-
 
9705
      setPurchaseIdIsSet(false);
-
 
9706
      this.purchaseId = 0;
-
 
9707
      setItemIdIsSet(false);
-
 
9708
      this.itemId = 0;
-
 
9709
      setQuantityIsSet(false);
-
 
9710
      this.quantity = 0;
-
 
9711
    }
-
 
9712
 
-
 
9713
    public long getPurchaseId() {
-
 
9714
      return this.purchaseId;
-
 
9715
    }
-
 
9716
 
-
 
9717
    public void setPurchaseId(long purchaseId) {
-
 
9718
      this.purchaseId = purchaseId;
-
 
9719
      setPurchaseIdIsSet(true);
-
 
9720
    }
-
 
9721
 
-
 
9722
    public void unsetPurchaseId() {
-
 
9723
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
-
 
9724
    }
-
 
9725
 
-
 
9726
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
-
 
9727
    public boolean isSetPurchaseId() {
-
 
9728
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
-
 
9729
    }
-
 
9730
 
-
 
9731
    public void setPurchaseIdIsSet(boolean value) {
-
 
9732
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
-
 
9733
    }
-
 
9734
 
-
 
9735
    public long getItemId() {
-
 
9736
      return this.itemId;
-
 
9737
    }
-
 
9738
 
-
 
9739
    public void setItemId(long itemId) {
-
 
9740
      this.itemId = itemId;
-
 
9741
      setItemIdIsSet(true);
-
 
9742
    }
-
 
9743
 
-
 
9744
    public void unsetItemId() {
-
 
9745
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
-
 
9746
    }
-
 
9747
 
-
 
9748
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
-
 
9749
    public boolean isSetItemId() {
-
 
9750
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
-
 
9751
    }
-
 
9752
 
-
 
9753
    public void setItemIdIsSet(boolean value) {
-
 
9754
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
-
 
9755
    }
-
 
9756
 
-
 
9757
    public long getQuantity() {
-
 
9758
      return this.quantity;
-
 
9759
    }
-
 
9760
 
-
 
9761
    public void setQuantity(long quantity) {
-
 
9762
      this.quantity = quantity;
-
 
9763
      setQuantityIsSet(true);
-
 
9764
    }
-
 
9765
 
-
 
9766
    public void unsetQuantity() {
-
 
9767
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
-
 
9768
    }
-
 
9769
 
-
 
9770
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
-
 
9771
    public boolean isSetQuantity() {
-
 
9772
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
-
 
9773
    }
-
 
9774
 
-
 
9775
    public void setQuantityIsSet(boolean value) {
-
 
9776
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
-
 
9777
    }
-
 
9778
 
-
 
9779
    public void setFieldValue(_Fields field, Object value) {
-
 
9780
      switch (field) {
-
 
9781
      case PURCHASE_ID:
-
 
9782
        if (value == null) {
-
 
9783
          unsetPurchaseId();
-
 
9784
        } else {
-
 
9785
          setPurchaseId((Long)value);
-
 
9786
        }
-
 
9787
        break;
-
 
9788
 
-
 
9789
      case ITEM_ID:
-
 
9790
        if (value == null) {
-
 
9791
          unsetItemId();
-
 
9792
        } else {
-
 
9793
          setItemId((Long)value);
-
 
9794
        }
-
 
9795
        break;
-
 
9796
 
-
 
9797
      case QUANTITY:
-
 
9798
        if (value == null) {
-
 
9799
          unsetQuantity();
-
 
9800
        } else {
-
 
9801
          setQuantity((Long)value);
-
 
9802
        }
-
 
9803
        break;
-
 
9804
 
-
 
9805
      }
-
 
9806
    }
-
 
9807
 
-
 
9808
    public Object getFieldValue(_Fields field) {
-
 
9809
      switch (field) {
-
 
9810
      case PURCHASE_ID:
-
 
9811
        return Long.valueOf(getPurchaseId());
-
 
9812
 
-
 
9813
      case ITEM_ID:
-
 
9814
        return Long.valueOf(getItemId());
-
 
9815
 
-
 
9816
      case QUANTITY:
-
 
9817
        return Long.valueOf(getQuantity());
-
 
9818
 
-
 
9819
      }
-
 
9820
      throw new IllegalStateException();
-
 
9821
    }
-
 
9822
 
-
 
9823
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
9824
    public boolean isSet(_Fields field) {
-
 
9825
      if (field == null) {
-
 
9826
        throw new IllegalArgumentException();
-
 
9827
      }
-
 
9828
 
-
 
9829
      switch (field) {
-
 
9830
      case PURCHASE_ID:
-
 
9831
        return isSetPurchaseId();
-
 
9832
      case ITEM_ID:
-
 
9833
        return isSetItemId();
-
 
9834
      case QUANTITY:
-
 
9835
        return isSetQuantity();
-
 
9836
      }
-
 
9837
      throw new IllegalStateException();
-
 
9838
    }
-
 
9839
 
-
 
9840
    @Override
-
 
9841
    public boolean equals(Object that) {
-
 
9842
      if (that == null)
-
 
9843
        return false;
-
 
9844
      if (that instanceof unFulfillPO_args)
-
 
9845
        return this.equals((unFulfillPO_args)that);
-
 
9846
      return false;
-
 
9847
    }
-
 
9848
 
-
 
9849
    public boolean equals(unFulfillPO_args that) {
-
 
9850
      if (that == null)
-
 
9851
        return false;
-
 
9852
 
-
 
9853
      boolean this_present_purchaseId = true;
-
 
9854
      boolean that_present_purchaseId = true;
-
 
9855
      if (this_present_purchaseId || that_present_purchaseId) {
-
 
9856
        if (!(this_present_purchaseId && that_present_purchaseId))
-
 
9857
          return false;
-
 
9858
        if (this.purchaseId != that.purchaseId)
-
 
9859
          return false;
-
 
9860
      }
-
 
9861
 
-
 
9862
      boolean this_present_itemId = true;
-
 
9863
      boolean that_present_itemId = true;
-
 
9864
      if (this_present_itemId || that_present_itemId) {
-
 
9865
        if (!(this_present_itemId && that_present_itemId))
-
 
9866
          return false;
-
 
9867
        if (this.itemId != that.itemId)
-
 
9868
          return false;
-
 
9869
      }
-
 
9870
 
-
 
9871
      boolean this_present_quantity = true;
-
 
9872
      boolean that_present_quantity = true;
-
 
9873
      if (this_present_quantity || that_present_quantity) {
-
 
9874
        if (!(this_present_quantity && that_present_quantity))
-
 
9875
          return false;
-
 
9876
        if (this.quantity != that.quantity)
-
 
9877
          return false;
-
 
9878
      }
-
 
9879
 
-
 
9880
      return true;
-
 
9881
    }
-
 
9882
 
-
 
9883
    @Override
-
 
9884
    public int hashCode() {
-
 
9885
      return 0;
-
 
9886
    }
-
 
9887
 
-
 
9888
    public int compareTo(unFulfillPO_args other) {
-
 
9889
      if (!getClass().equals(other.getClass())) {
-
 
9890
        return getClass().getName().compareTo(other.getClass().getName());
-
 
9891
      }
-
 
9892
 
-
 
9893
      int lastComparison = 0;
-
 
9894
      unFulfillPO_args typedOther = (unFulfillPO_args)other;
-
 
9895
 
-
 
9896
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
-
 
9897
      if (lastComparison != 0) {
-
 
9898
        return lastComparison;
-
 
9899
      }
-
 
9900
      if (isSetPurchaseId()) {
-
 
9901
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
-
 
9902
        if (lastComparison != 0) {
-
 
9903
          return lastComparison;
-
 
9904
        }
-
 
9905
      }
-
 
9906
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
-
 
9907
      if (lastComparison != 0) {
-
 
9908
        return lastComparison;
-
 
9909
      }
-
 
9910
      if (isSetItemId()) {
-
 
9911
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
-
 
9912
        if (lastComparison != 0) {
-
 
9913
          return lastComparison;
-
 
9914
        }
-
 
9915
      }
-
 
9916
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
-
 
9917
      if (lastComparison != 0) {
-
 
9918
        return lastComparison;
-
 
9919
      }
-
 
9920
      if (isSetQuantity()) {
-
 
9921
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
-
 
9922
        if (lastComparison != 0) {
-
 
9923
          return lastComparison;
-
 
9924
        }
-
 
9925
      }
-
 
9926
      return 0;
-
 
9927
    }
-
 
9928
 
-
 
9929
    public _Fields fieldForId(int fieldId) {
-
 
9930
      return _Fields.findByThriftId(fieldId);
-
 
9931
    }
-
 
9932
 
-
 
9933
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
9934
      org.apache.thrift.protocol.TField field;
-
 
9935
      iprot.readStructBegin();
-
 
9936
      while (true)
-
 
9937
      {
-
 
9938
        field = iprot.readFieldBegin();
-
 
9939
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
9940
          break;
-
 
9941
        }
-
 
9942
        switch (field.id) {
-
 
9943
          case 1: // PURCHASE_ID
-
 
9944
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
9945
              this.purchaseId = iprot.readI64();
-
 
9946
              setPurchaseIdIsSet(true);
-
 
9947
            } else { 
-
 
9948
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9949
            }
-
 
9950
            break;
-
 
9951
          case 2: // ITEM_ID
-
 
9952
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
9953
              this.itemId = iprot.readI64();
-
 
9954
              setItemIdIsSet(true);
-
 
9955
            } else { 
-
 
9956
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9957
            }
-
 
9958
            break;
-
 
9959
          case 3: // QUANTITY
-
 
9960
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
9961
              this.quantity = iprot.readI64();
-
 
9962
              setQuantityIsSet(true);
-
 
9963
            } else { 
-
 
9964
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9965
            }
-
 
9966
            break;
-
 
9967
          default:
-
 
9968
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9969
        }
-
 
9970
        iprot.readFieldEnd();
-
 
9971
      }
-
 
9972
      iprot.readStructEnd();
-
 
9973
      validate();
-
 
9974
    }
-
 
9975
 
-
 
9976
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
9977
      validate();
-
 
9978
 
-
 
9979
      oprot.writeStructBegin(STRUCT_DESC);
-
 
9980
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
-
 
9981
      oprot.writeI64(this.purchaseId);
-
 
9982
      oprot.writeFieldEnd();
-
 
9983
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
-
 
9984
      oprot.writeI64(this.itemId);
-
 
9985
      oprot.writeFieldEnd();
-
 
9986
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
-
 
9987
      oprot.writeI64(this.quantity);
-
 
9988
      oprot.writeFieldEnd();
-
 
9989
      oprot.writeFieldStop();
-
 
9990
      oprot.writeStructEnd();
-
 
9991
    }
-
 
9992
 
-
 
9993
    @Override
-
 
9994
    public String toString() {
-
 
9995
      StringBuilder sb = new StringBuilder("unFulfillPO_args(");
-
 
9996
      boolean first = true;
-
 
9997
 
-
 
9998
      sb.append("purchaseId:");
-
 
9999
      sb.append(this.purchaseId);
-
 
10000
      first = false;
-
 
10001
      if (!first) sb.append(", ");
-
 
10002
      sb.append("itemId:");
-
 
10003
      sb.append(this.itemId);
-
 
10004
      first = false;
-
 
10005
      if (!first) sb.append(", ");
-
 
10006
      sb.append("quantity:");
-
 
10007
      sb.append(this.quantity);
-
 
10008
      first = false;
-
 
10009
      sb.append(")");
-
 
10010
      return sb.toString();
-
 
10011
    }
-
 
10012
 
-
 
10013
    public void validate() throws org.apache.thrift.TException {
-
 
10014
      // check for required fields
-
 
10015
    }
-
 
10016
 
-
 
10017
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10018
      try {
-
 
10019
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10020
      } catch (org.apache.thrift.TException te) {
-
 
10021
        throw new java.io.IOException(te);
-
 
10022
      }
-
 
10023
    }
-
 
10024
 
-
 
10025
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10026
      try {
-
 
10027
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
10028
        __isset_bit_vector = new BitSet(1);
-
 
10029
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10030
      } catch (org.apache.thrift.TException te) {
-
 
10031
        throw new java.io.IOException(te);
-
 
10032
      }
-
 
10033
    }
-
 
10034
 
-
 
10035
  }
-
 
10036
 
-
 
10037
  public static class unFulfillPO_result implements org.apache.thrift.TBase<unFulfillPO_result, unFulfillPO_result._Fields>, java.io.Serializable, Cloneable   {
-
 
10038
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unFulfillPO_result");
-
 
10039
 
-
 
10040
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
10041
 
-
 
10042
    private PurchaseServiceException e; // required
-
 
10043
 
-
 
10044
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10045
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10046
      E((short)1, "e");
-
 
10047
 
-
 
10048
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10049
 
-
 
10050
      static {
-
 
10051
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10052
          byName.put(field.getFieldName(), field);
-
 
10053
        }
-
 
10054
      }
-
 
10055
 
-
 
10056
      /**
-
 
10057
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10058
       */
-
 
10059
      public static _Fields findByThriftId(int fieldId) {
-
 
10060
        switch(fieldId) {
-
 
10061
          case 1: // E
-
 
10062
            return E;
-
 
10063
          default:
-
 
10064
            return null;
-
 
10065
        }
-
 
10066
      }
-
 
10067
 
-
 
10068
      /**
-
 
10069
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10070
       * if it is not found.
-
 
10071
       */
-
 
10072
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10073
        _Fields fields = findByThriftId(fieldId);
-
 
10074
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10075
        return fields;
-
 
10076
      }
-
 
10077
 
-
 
10078
      /**
-
 
10079
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10080
       */
-
 
10081
      public static _Fields findByName(String name) {
-
 
10082
        return byName.get(name);
-
 
10083
      }
-
 
10084
 
-
 
10085
      private final short _thriftId;
-
 
10086
      private final String _fieldName;
-
 
10087
 
-
 
10088
      _Fields(short thriftId, String fieldName) {
-
 
10089
        _thriftId = thriftId;
-
 
10090
        _fieldName = fieldName;
-
 
10091
      }
-
 
10092
 
-
 
10093
      public short getThriftFieldId() {
-
 
10094
        return _thriftId;
-
 
10095
      }
-
 
10096
 
-
 
10097
      public String getFieldName() {
-
 
10098
        return _fieldName;
-
 
10099
      }
-
 
10100
    }
-
 
10101
 
-
 
10102
    // isset id assignments
-
 
10103
 
-
 
10104
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10105
    static {
-
 
10106
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10107
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10108
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
10109
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10110
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unFulfillPO_result.class, metaDataMap);
-
 
10111
    }
-
 
10112
 
-
 
10113
    public unFulfillPO_result() {
-
 
10114
    }
-
 
10115
 
-
 
10116
    public unFulfillPO_result(
-
 
10117
      PurchaseServiceException e)
-
 
10118
    {
-
 
10119
      this();
-
 
10120
      this.e = e;
-
 
10121
    }
-
 
10122
 
-
 
10123
    /**
-
 
10124
     * Performs a deep copy on <i>other</i>.
-
 
10125
     */
-
 
10126
    public unFulfillPO_result(unFulfillPO_result other) {
-
 
10127
      if (other.isSetE()) {
-
 
10128
        this.e = new PurchaseServiceException(other.e);
-
 
10129
      }
-
 
10130
    }
-
 
10131
 
-
 
10132
    public unFulfillPO_result deepCopy() {
-
 
10133
      return new unFulfillPO_result(this);
-
 
10134
    }
-
 
10135
 
-
 
10136
    @Override
-
 
10137
    public void clear() {
-
 
10138
      this.e = null;
-
 
10139
    }
-
 
10140
 
-
 
10141
    public PurchaseServiceException getE() {
-
 
10142
      return this.e;
-
 
10143
    }
-
 
10144
 
-
 
10145
    public void setE(PurchaseServiceException e) {
-
 
10146
      this.e = e;
-
 
10147
    }
-
 
10148
 
-
 
10149
    public void unsetE() {
-
 
10150
      this.e = null;
-
 
10151
    }
-
 
10152
 
-
 
10153
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
-
 
10154
    public boolean isSetE() {
-
 
10155
      return this.e != null;
-
 
10156
    }
-
 
10157
 
-
 
10158
    public void setEIsSet(boolean value) {
-
 
10159
      if (!value) {
-
 
10160
        this.e = null;
-
 
10161
      }
-
 
10162
    }
-
 
10163
 
-
 
10164
    public void setFieldValue(_Fields field, Object value) {
-
 
10165
      switch (field) {
-
 
10166
      case E:
-
 
10167
        if (value == null) {
-
 
10168
          unsetE();
-
 
10169
        } else {
-
 
10170
          setE((PurchaseServiceException)value);
-
 
10171
        }
-
 
10172
        break;
-
 
10173
 
-
 
10174
      }
-
 
10175
    }
-
 
10176
 
-
 
10177
    public Object getFieldValue(_Fields field) {
-
 
10178
      switch (field) {
-
 
10179
      case E:
-
 
10180
        return getE();
-
 
10181
 
-
 
10182
      }
-
 
10183
      throw new IllegalStateException();
-
 
10184
    }
-
 
10185
 
-
 
10186
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10187
    public boolean isSet(_Fields field) {
-
 
10188
      if (field == null) {
-
 
10189
        throw new IllegalArgumentException();
-
 
10190
      }
-
 
10191
 
-
 
10192
      switch (field) {
-
 
10193
      case E:
-
 
10194
        return isSetE();
-
 
10195
      }
-
 
10196
      throw new IllegalStateException();
-
 
10197
    }
-
 
10198
 
-
 
10199
    @Override
-
 
10200
    public boolean equals(Object that) {
-
 
10201
      if (that == null)
-
 
10202
        return false;
-
 
10203
      if (that instanceof unFulfillPO_result)
-
 
10204
        return this.equals((unFulfillPO_result)that);
-
 
10205
      return false;
-
 
10206
    }
-
 
10207
 
-
 
10208
    public boolean equals(unFulfillPO_result that) {
-
 
10209
      if (that == null)
-
 
10210
        return false;
-
 
10211
 
-
 
10212
      boolean this_present_e = true && this.isSetE();
-
 
10213
      boolean that_present_e = true && that.isSetE();
-
 
10214
      if (this_present_e || that_present_e) {
-
 
10215
        if (!(this_present_e && that_present_e))
-
 
10216
          return false;
-
 
10217
        if (!this.e.equals(that.e))
-
 
10218
          return false;
-
 
10219
      }
-
 
10220
 
-
 
10221
      return true;
-
 
10222
    }
-
 
10223
 
-
 
10224
    @Override
-
 
10225
    public int hashCode() {
-
 
10226
      return 0;
-
 
10227
    }
-
 
10228
 
-
 
10229
    public int compareTo(unFulfillPO_result other) {
-
 
10230
      if (!getClass().equals(other.getClass())) {
-
 
10231
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10232
      }
-
 
10233
 
-
 
10234
      int lastComparison = 0;
-
 
10235
      unFulfillPO_result typedOther = (unFulfillPO_result)other;
-
 
10236
 
-
 
10237
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
-
 
10238
      if (lastComparison != 0) {
-
 
10239
        return lastComparison;
-
 
10240
      }
-
 
10241
      if (isSetE()) {
-
 
10242
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
-
 
10243
        if (lastComparison != 0) {
-
 
10244
          return lastComparison;
-
 
10245
        }
-
 
10246
      }
-
 
10247
      return 0;
-
 
10248
    }
-
 
10249
 
-
 
10250
    public _Fields fieldForId(int fieldId) {
-
 
10251
      return _Fields.findByThriftId(fieldId);
-
 
10252
    }
-
 
10253
 
-
 
10254
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10255
      org.apache.thrift.protocol.TField field;
-
 
10256
      iprot.readStructBegin();
-
 
10257
      while (true)
-
 
10258
      {
-
 
10259
        field = iprot.readFieldBegin();
-
 
10260
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10261
          break;
-
 
10262
        }
-
 
10263
        switch (field.id) {
-
 
10264
          case 1: // E
-
 
10265
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
10266
              this.e = new PurchaseServiceException();
-
 
10267
              this.e.read(iprot);
-
 
10268
            } else { 
-
 
10269
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10270
            }
-
 
10271
            break;
-
 
10272
          default:
-
 
10273
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10274
        }
-
 
10275
        iprot.readFieldEnd();
-
 
10276
      }
-
 
10277
      iprot.readStructEnd();
-
 
10278
      validate();
-
 
10279
    }
-
 
10280
 
-
 
10281
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
10282
      oprot.writeStructBegin(STRUCT_DESC);
-
 
10283
 
-
 
10284
      if (this.isSetE()) {
-
 
10285
        oprot.writeFieldBegin(E_FIELD_DESC);
-
 
10286
        this.e.write(oprot);
-
 
10287
        oprot.writeFieldEnd();
-
 
10288
      }
-
 
10289
      oprot.writeFieldStop();
-
 
10290
      oprot.writeStructEnd();
-
 
10291
    }
-
 
10292
 
-
 
10293
    @Override
-
 
10294
    public String toString() {
-
 
10295
      StringBuilder sb = new StringBuilder("unFulfillPO_result(");
-
 
10296
      boolean first = true;
-
 
10297
 
-
 
10298
      sb.append("e:");
-
 
10299
      if (this.e == null) {
-
 
10300
        sb.append("null");
9452
      } else {
10301
      } else {
9453
        sb.append(this.e);
10302
        sb.append(this.e);
9454
      }
10303
      }
9455
      first = false;
10304
      first = false;
9456
      sb.append(")");
10305
      sb.append(")");