Subversion Repositories SmartDukaan

Rev

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

Rev 2779 Rev 2819
Line 350... Line 350...
350
     * 
350
     * 
351
     * @param returnOrderId
351
     * @param returnOrderId
352
     */
352
     */
353
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException;
353
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException;
354
 
354
 
-
 
355
    /**
-
 
356
     * Creates a purchase order corresponding to all the pending orders of the given warehouse.
-
 
357
     * Returns the PO no. of the newly created purchase order.
-
 
358
     * 
-
 
359
     * @param warehouseId
-
 
360
     */
-
 
361
    public long createPurchaseOrder(long warehouseId) throws TransactionServiceException, TException;
-
 
362
 
355
  }
363
  }
356
 
364
 
357
  public static class Client implements Iface {
365
  public static class Client implements Iface {
358
    public Client(TProtocol prot)
366
    public Client(TProtocol prot)
359
    {
367
    {
Line 2096... Line 2104...
2096
        throw result.ex;
2104
        throw result.ex;
2097
      }
2105
      }
2098
      return;
2106
      return;
2099
    }
2107
    }
2100
 
2108
 
-
 
2109
    public long createPurchaseOrder(long warehouseId) throws TransactionServiceException, TException
-
 
2110
    {
-
 
2111
      send_createPurchaseOrder(warehouseId);
-
 
2112
      return recv_createPurchaseOrder();
-
 
2113
    }
-
 
2114
 
-
 
2115
    public void send_createPurchaseOrder(long warehouseId) throws TException
-
 
2116
    {
-
 
2117
      oprot_.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.CALL, seqid_));
-
 
2118
      createPurchaseOrder_args args = new createPurchaseOrder_args();
-
 
2119
      args.warehouseId = warehouseId;
-
 
2120
      args.write(oprot_);
-
 
2121
      oprot_.writeMessageEnd();
-
 
2122
      oprot_.getTransport().flush();
-
 
2123
    }
-
 
2124
 
-
 
2125
    public long recv_createPurchaseOrder() throws TransactionServiceException, TException
-
 
2126
    {
-
 
2127
      TMessage msg = iprot_.readMessageBegin();
-
 
2128
      if (msg.type == TMessageType.EXCEPTION) {
-
 
2129
        TApplicationException x = TApplicationException.read(iprot_);
-
 
2130
        iprot_.readMessageEnd();
-
 
2131
        throw x;
-
 
2132
      }
-
 
2133
      createPurchaseOrder_result result = new createPurchaseOrder_result();
-
 
2134
      result.read(iprot_);
-
 
2135
      iprot_.readMessageEnd();
-
 
2136
      if (result.isSetSuccess()) {
-
 
2137
        return result.success;
-
 
2138
      }
-
 
2139
      if (result.ex != null) {
-
 
2140
        throw result.ex;
-
 
2141
      }
-
 
2142
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
-
 
2143
    }
-
 
2144
 
2101
  }
2145
  }
2102
  public static class Processor implements TProcessor {
2146
  public static class Processor implements TProcessor {
2103
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2147
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2104
    public Processor(Iface iface)
2148
    public Processor(Iface iface)
2105
    {
2149
    {
Line 2150... Line 2194...
2150
      processMap_.put("reshipOrder", new reshipOrder());
2194
      processMap_.put("reshipOrder", new reshipOrder());
2151
      processMap_.put("refundOrder", new refundOrder());
2195
      processMap_.put("refundOrder", new refundOrder());
2152
      processMap_.put("getReturnOrders", new getReturnOrders());
2196
      processMap_.put("getReturnOrders", new getReturnOrders());
2153
      processMap_.put("getReturnOrder", new getReturnOrder());
2197
      processMap_.put("getReturnOrder", new getReturnOrder());
2154
      processMap_.put("processReturn", new processReturn());
2198
      processMap_.put("processReturn", new processReturn());
-
 
2199
      processMap_.put("createPurchaseOrder", new createPurchaseOrder());
2155
    }
2200
    }
2156
 
2201
 
2157
    protected static interface ProcessFunction {
2202
    protected static interface ProcessFunction {
2158
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
2203
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
2159
    }
2204
    }
Line 3421... Line 3466...
3421
        oprot.getTransport().flush();
3466
        oprot.getTransport().flush();
3422
      }
3467
      }
3423
 
3468
 
3424
    }
3469
    }
3425
 
3470
 
-
 
3471
    private class createPurchaseOrder implements ProcessFunction {
-
 
3472
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
3473
      {
-
 
3474
        createPurchaseOrder_args args = new createPurchaseOrder_args();
-
 
3475
        args.read(iprot);
-
 
3476
        iprot.readMessageEnd();
-
 
3477
        createPurchaseOrder_result result = new createPurchaseOrder_result();
-
 
3478
        try {
-
 
3479
          result.success = iface_.createPurchaseOrder(args.warehouseId);
-
 
3480
          result.setSuccessIsSet(true);
-
 
3481
        } catch (TransactionServiceException ex) {
-
 
3482
          result.ex = ex;
-
 
3483
        } catch (Throwable th) {
-
 
3484
          LOGGER.error("Internal error processing createPurchaseOrder", th);
-
 
3485
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createPurchaseOrder");
-
 
3486
          oprot.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.EXCEPTION, seqid));
-
 
3487
          x.write(oprot);
-
 
3488
          oprot.writeMessageEnd();
-
 
3489
          oprot.getTransport().flush();
-
 
3490
          return;
-
 
3491
        }
-
 
3492
        oprot.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.REPLY, seqid));
-
 
3493
        result.write(oprot);
-
 
3494
        oprot.writeMessageEnd();
-
 
3495
        oprot.getTransport().flush();
-
 
3496
      }
-
 
3497
 
-
 
3498
    }
-
 
3499
 
3426
  }
3500
  }
3427
 
3501
 
3428
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3502
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3429
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3503
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3430
 
3504
 
Line 36704... Line 36778...
36704
      sb.append("ex:");
36778
      sb.append("ex:");
36705
      if (this.ex == null) {
36779
      if (this.ex == null) {
36706
        sb.append("null");
36780
        sb.append("null");
36707
      } else {
36781
      } else {
36708
        sb.append(this.ex);
36782
        sb.append(this.ex);
-
 
36783
      }
-
 
36784
      first = false;
-
 
36785
      sb.append(")");
-
 
36786
      return sb.toString();
-
 
36787
    }
-
 
36788
 
-
 
36789
    public void validate() throws TException {
-
 
36790
      // check for required fields
-
 
36791
    }
-
 
36792
 
-
 
36793
  }
-
 
36794
 
-
 
36795
  public static class createPurchaseOrder_args implements TBase<createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPurchaseOrder_args>   {
-
 
36796
    private static final TStruct STRUCT_DESC = new TStruct("createPurchaseOrder_args");
-
 
36797
 
-
 
36798
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
-
 
36799
 
-
 
36800
    private long warehouseId;
-
 
36801
 
-
 
36802
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
36803
    public enum _Fields implements TFieldIdEnum {
-
 
36804
      WAREHOUSE_ID((short)1, "warehouseId");
-
 
36805
 
-
 
36806
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
36807
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
36808
 
-
 
36809
      static {
-
 
36810
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
36811
          byId.put((int)field._thriftId, field);
-
 
36812
          byName.put(field.getFieldName(), field);
-
 
36813
        }
-
 
36814
      }
-
 
36815
 
-
 
36816
      /**
-
 
36817
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
36818
       */
-
 
36819
      public static _Fields findByThriftId(int fieldId) {
-
 
36820
        return byId.get(fieldId);
-
 
36821
      }
-
 
36822
 
-
 
36823
      /**
-
 
36824
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
36825
       * if it is not found.
-
 
36826
       */
-
 
36827
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
36828
        _Fields fields = findByThriftId(fieldId);
-
 
36829
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
36830
        return fields;
-
 
36831
      }
-
 
36832
 
-
 
36833
      /**
-
 
36834
       * Find the _Fields constant that matches name, or null if its not found.
-
 
36835
       */
-
 
36836
      public static _Fields findByName(String name) {
-
 
36837
        return byName.get(name);
-
 
36838
      }
-
 
36839
 
-
 
36840
      private final short _thriftId;
-
 
36841
      private final String _fieldName;
-
 
36842
 
-
 
36843
      _Fields(short thriftId, String fieldName) {
-
 
36844
        _thriftId = thriftId;
-
 
36845
        _fieldName = fieldName;
-
 
36846
      }
-
 
36847
 
-
 
36848
      public short getThriftFieldId() {
-
 
36849
        return _thriftId;
-
 
36850
      }
-
 
36851
 
-
 
36852
      public String getFieldName() {
-
 
36853
        return _fieldName;
-
 
36854
      }
-
 
36855
    }
-
 
36856
 
-
 
36857
    // isset id assignments
-
 
36858
    private static final int __WAREHOUSEID_ISSET_ID = 0;
-
 
36859
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
36860
 
-
 
36861
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
36862
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
-
 
36863
          new FieldValueMetaData(TType.I64)));
-
 
36864
    }});
-
 
36865
 
-
 
36866
    static {
-
 
36867
      FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
-
 
36868
    }
-
 
36869
 
-
 
36870
    public createPurchaseOrder_args() {
-
 
36871
    }
-
 
36872
 
-
 
36873
    public createPurchaseOrder_args(
-
 
36874
      long warehouseId)
-
 
36875
    {
-
 
36876
      this();
-
 
36877
      this.warehouseId = warehouseId;
-
 
36878
      setWarehouseIdIsSet(true);
-
 
36879
    }
-
 
36880
 
-
 
36881
    /**
-
 
36882
     * Performs a deep copy on <i>other</i>.
-
 
36883
     */
-
 
36884
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
-
 
36885
      __isset_bit_vector.clear();
-
 
36886
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
36887
      this.warehouseId = other.warehouseId;
-
 
36888
    }
-
 
36889
 
-
 
36890
    public createPurchaseOrder_args deepCopy() {
-
 
36891
      return new createPurchaseOrder_args(this);
-
 
36892
    }
-
 
36893
 
-
 
36894
    @Deprecated
-
 
36895
    public createPurchaseOrder_args clone() {
-
 
36896
      return new createPurchaseOrder_args(this);
-
 
36897
    }
-
 
36898
 
-
 
36899
    public long getWarehouseId() {
-
 
36900
      return this.warehouseId;
-
 
36901
    }
-
 
36902
 
-
 
36903
    public createPurchaseOrder_args setWarehouseId(long warehouseId) {
-
 
36904
      this.warehouseId = warehouseId;
-
 
36905
      setWarehouseIdIsSet(true);
-
 
36906
      return this;
-
 
36907
    }
-
 
36908
 
-
 
36909
    public void unsetWarehouseId() {
-
 
36910
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
-
 
36911
    }
-
 
36912
 
-
 
36913
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
-
 
36914
    public boolean isSetWarehouseId() {
-
 
36915
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
-
 
36916
    }
-
 
36917
 
-
 
36918
    public void setWarehouseIdIsSet(boolean value) {
-
 
36919
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
-
 
36920
    }
-
 
36921
 
-
 
36922
    public void setFieldValue(_Fields field, Object value) {
-
 
36923
      switch (field) {
-
 
36924
      case WAREHOUSE_ID:
-
 
36925
        if (value == null) {
-
 
36926
          unsetWarehouseId();
-
 
36927
        } else {
-
 
36928
          setWarehouseId((Long)value);
-
 
36929
        }
-
 
36930
        break;
-
 
36931
 
-
 
36932
      }
-
 
36933
    }
-
 
36934
 
-
 
36935
    public void setFieldValue(int fieldID, Object value) {
-
 
36936
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
36937
    }
-
 
36938
 
-
 
36939
    public Object getFieldValue(_Fields field) {
-
 
36940
      switch (field) {
-
 
36941
      case WAREHOUSE_ID:
-
 
36942
        return new Long(getWarehouseId());
-
 
36943
 
-
 
36944
      }
-
 
36945
      throw new IllegalStateException();
-
 
36946
    }
-
 
36947
 
-
 
36948
    public Object getFieldValue(int fieldId) {
-
 
36949
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
36950
    }
-
 
36951
 
-
 
36952
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
36953
    public boolean isSet(_Fields field) {
-
 
36954
      switch (field) {
-
 
36955
      case WAREHOUSE_ID:
-
 
36956
        return isSetWarehouseId();
-
 
36957
      }
-
 
36958
      throw new IllegalStateException();
-
 
36959
    }
-
 
36960
 
-
 
36961
    public boolean isSet(int fieldID) {
-
 
36962
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
36963
    }
-
 
36964
 
-
 
36965
    @Override
-
 
36966
    public boolean equals(Object that) {
-
 
36967
      if (that == null)
-
 
36968
        return false;
-
 
36969
      if (that instanceof createPurchaseOrder_args)
-
 
36970
        return this.equals((createPurchaseOrder_args)that);
-
 
36971
      return false;
-
 
36972
    }
-
 
36973
 
-
 
36974
    public boolean equals(createPurchaseOrder_args that) {
-
 
36975
      if (that == null)
-
 
36976
        return false;
-
 
36977
 
-
 
36978
      boolean this_present_warehouseId = true;
-
 
36979
      boolean that_present_warehouseId = true;
-
 
36980
      if (this_present_warehouseId || that_present_warehouseId) {
-
 
36981
        if (!(this_present_warehouseId && that_present_warehouseId))
-
 
36982
          return false;
-
 
36983
        if (this.warehouseId != that.warehouseId)
-
 
36984
          return false;
-
 
36985
      }
-
 
36986
 
-
 
36987
      return true;
-
 
36988
    }
-
 
36989
 
-
 
36990
    @Override
-
 
36991
    public int hashCode() {
-
 
36992
      return 0;
-
 
36993
    }
-
 
36994
 
-
 
36995
    public int compareTo(createPurchaseOrder_args other) {
-
 
36996
      if (!getClass().equals(other.getClass())) {
-
 
36997
        return getClass().getName().compareTo(other.getClass().getName());
-
 
36998
      }
-
 
36999
 
-
 
37000
      int lastComparison = 0;
-
 
37001
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
-
 
37002
 
-
 
37003
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
-
 
37004
      if (lastComparison != 0) {
-
 
37005
        return lastComparison;
-
 
37006
      }
-
 
37007
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
-
 
37008
      if (lastComparison != 0) {
-
 
37009
        return lastComparison;
-
 
37010
      }
-
 
37011
      return 0;
-
 
37012
    }
-
 
37013
 
-
 
37014
    public void read(TProtocol iprot) throws TException {
-
 
37015
      TField field;
-
 
37016
      iprot.readStructBegin();
-
 
37017
      while (true)
-
 
37018
      {
-
 
37019
        field = iprot.readFieldBegin();
-
 
37020
        if (field.type == TType.STOP) { 
-
 
37021
          break;
-
 
37022
        }
-
 
37023
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
37024
        if (fieldId == null) {
-
 
37025
          TProtocolUtil.skip(iprot, field.type);
-
 
37026
        } else {
-
 
37027
          switch (fieldId) {
-
 
37028
            case WAREHOUSE_ID:
-
 
37029
              if (field.type == TType.I64) {
-
 
37030
                this.warehouseId = iprot.readI64();
-
 
37031
                setWarehouseIdIsSet(true);
-
 
37032
              } else { 
-
 
37033
                TProtocolUtil.skip(iprot, field.type);
-
 
37034
              }
-
 
37035
              break;
-
 
37036
          }
-
 
37037
          iprot.readFieldEnd();
-
 
37038
        }
-
 
37039
      }
-
 
37040
      iprot.readStructEnd();
-
 
37041
      validate();
-
 
37042
    }
-
 
37043
 
-
 
37044
    public void write(TProtocol oprot) throws TException {
-
 
37045
      validate();
-
 
37046
 
-
 
37047
      oprot.writeStructBegin(STRUCT_DESC);
-
 
37048
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
-
 
37049
      oprot.writeI64(this.warehouseId);
-
 
37050
      oprot.writeFieldEnd();
-
 
37051
      oprot.writeFieldStop();
-
 
37052
      oprot.writeStructEnd();
-
 
37053
    }
-
 
37054
 
-
 
37055
    @Override
-
 
37056
    public String toString() {
-
 
37057
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
-
 
37058
      boolean first = true;
-
 
37059
 
-
 
37060
      sb.append("warehouseId:");
-
 
37061
      sb.append(this.warehouseId);
-
 
37062
      first = false;
-
 
37063
      sb.append(")");
-
 
37064
      return sb.toString();
-
 
37065
    }
-
 
37066
 
-
 
37067
    public void validate() throws TException {
-
 
37068
      // check for required fields
-
 
37069
    }
-
 
37070
 
-
 
37071
  }
-
 
37072
 
-
 
37073
  public static class createPurchaseOrder_result implements TBase<createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPurchaseOrder_result>   {
-
 
37074
    private static final TStruct STRUCT_DESC = new TStruct("createPurchaseOrder_result");
-
 
37075
 
-
 
37076
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
-
 
37077
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
-
 
37078
 
-
 
37079
    private long success;
-
 
37080
    private TransactionServiceException ex;
-
 
37081
 
-
 
37082
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
37083
    public enum _Fields implements TFieldIdEnum {
-
 
37084
      SUCCESS((short)0, "success"),
-
 
37085
      EX((short)1, "ex");
-
 
37086
 
-
 
37087
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
37088
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
37089
 
-
 
37090
      static {
-
 
37091
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
37092
          byId.put((int)field._thriftId, field);
-
 
37093
          byName.put(field.getFieldName(), field);
-
 
37094
        }
-
 
37095
      }
-
 
37096
 
-
 
37097
      /**
-
 
37098
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
37099
       */
-
 
37100
      public static _Fields findByThriftId(int fieldId) {
-
 
37101
        return byId.get(fieldId);
-
 
37102
      }
-
 
37103
 
-
 
37104
      /**
-
 
37105
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
37106
       * if it is not found.
-
 
37107
       */
-
 
37108
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
37109
        _Fields fields = findByThriftId(fieldId);
-
 
37110
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
37111
        return fields;
-
 
37112
      }
-
 
37113
 
-
 
37114
      /**
-
 
37115
       * Find the _Fields constant that matches name, or null if its not found.
-
 
37116
       */
-
 
37117
      public static _Fields findByName(String name) {
-
 
37118
        return byName.get(name);
-
 
37119
      }
-
 
37120
 
-
 
37121
      private final short _thriftId;
-
 
37122
      private final String _fieldName;
-
 
37123
 
-
 
37124
      _Fields(short thriftId, String fieldName) {
-
 
37125
        _thriftId = thriftId;
-
 
37126
        _fieldName = fieldName;
-
 
37127
      }
-
 
37128
 
-
 
37129
      public short getThriftFieldId() {
-
 
37130
        return _thriftId;
-
 
37131
      }
-
 
37132
 
-
 
37133
      public String getFieldName() {
-
 
37134
        return _fieldName;
-
 
37135
      }
-
 
37136
    }
-
 
37137
 
-
 
37138
    // isset id assignments
-
 
37139
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
37140
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
37141
 
-
 
37142
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
37143
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
37144
          new FieldValueMetaData(TType.I64)));
-
 
37145
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
-
 
37146
          new FieldValueMetaData(TType.STRUCT)));
-
 
37147
    }});
-
 
37148
 
-
 
37149
    static {
-
 
37150
      FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
-
 
37151
    }
-
 
37152
 
-
 
37153
    public createPurchaseOrder_result() {
-
 
37154
    }
-
 
37155
 
-
 
37156
    public createPurchaseOrder_result(
-
 
37157
      long success,
-
 
37158
      TransactionServiceException ex)
-
 
37159
    {
-
 
37160
      this();
-
 
37161
      this.success = success;
-
 
37162
      setSuccessIsSet(true);
-
 
37163
      this.ex = ex;
-
 
37164
    }
-
 
37165
 
-
 
37166
    /**
-
 
37167
     * Performs a deep copy on <i>other</i>.
-
 
37168
     */
-
 
37169
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
-
 
37170
      __isset_bit_vector.clear();
-
 
37171
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
37172
      this.success = other.success;
-
 
37173
      if (other.isSetEx()) {
-
 
37174
        this.ex = new TransactionServiceException(other.ex);
-
 
37175
      }
-
 
37176
    }
-
 
37177
 
-
 
37178
    public createPurchaseOrder_result deepCopy() {
-
 
37179
      return new createPurchaseOrder_result(this);
-
 
37180
    }
-
 
37181
 
-
 
37182
    @Deprecated
-
 
37183
    public createPurchaseOrder_result clone() {
-
 
37184
      return new createPurchaseOrder_result(this);
-
 
37185
    }
-
 
37186
 
-
 
37187
    public long getSuccess() {
-
 
37188
      return this.success;
-
 
37189
    }
-
 
37190
 
-
 
37191
    public createPurchaseOrder_result setSuccess(long success) {
-
 
37192
      this.success = success;
-
 
37193
      setSuccessIsSet(true);
-
 
37194
      return this;
-
 
37195
    }
-
 
37196
 
-
 
37197
    public void unsetSuccess() {
-
 
37198
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
37199
    }
-
 
37200
 
-
 
37201
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
37202
    public boolean isSetSuccess() {
-
 
37203
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
37204
    }
-
 
37205
 
-
 
37206
    public void setSuccessIsSet(boolean value) {
-
 
37207
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
37208
    }
-
 
37209
 
-
 
37210
    public TransactionServiceException getEx() {
-
 
37211
      return this.ex;
-
 
37212
    }
-
 
37213
 
-
 
37214
    public createPurchaseOrder_result setEx(TransactionServiceException ex) {
-
 
37215
      this.ex = ex;
-
 
37216
      return this;
-
 
37217
    }
-
 
37218
 
-
 
37219
    public void unsetEx() {
-
 
37220
      this.ex = null;
-
 
37221
    }
-
 
37222
 
-
 
37223
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
-
 
37224
    public boolean isSetEx() {
-
 
37225
      return this.ex != null;
-
 
37226
    }
-
 
37227
 
-
 
37228
    public void setExIsSet(boolean value) {
-
 
37229
      if (!value) {
-
 
37230
        this.ex = null;
-
 
37231
      }
-
 
37232
    }
-
 
37233
 
-
 
37234
    public void setFieldValue(_Fields field, Object value) {
-
 
37235
      switch (field) {
-
 
37236
      case SUCCESS:
-
 
37237
        if (value == null) {
-
 
37238
          unsetSuccess();
-
 
37239
        } else {
-
 
37240
          setSuccess((Long)value);
-
 
37241
        }
-
 
37242
        break;
-
 
37243
 
-
 
37244
      case EX:
-
 
37245
        if (value == null) {
-
 
37246
          unsetEx();
-
 
37247
        } else {
-
 
37248
          setEx((TransactionServiceException)value);
-
 
37249
        }
-
 
37250
        break;
-
 
37251
 
-
 
37252
      }
-
 
37253
    }
-
 
37254
 
-
 
37255
    public void setFieldValue(int fieldID, Object value) {
-
 
37256
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
37257
    }
-
 
37258
 
-
 
37259
    public Object getFieldValue(_Fields field) {
-
 
37260
      switch (field) {
-
 
37261
      case SUCCESS:
-
 
37262
        return new Long(getSuccess());
-
 
37263
 
-
 
37264
      case EX:
-
 
37265
        return getEx();
-
 
37266
 
-
 
37267
      }
-
 
37268
      throw new IllegalStateException();
-
 
37269
    }
-
 
37270
 
-
 
37271
    public Object getFieldValue(int fieldId) {
-
 
37272
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
37273
    }
-
 
37274
 
-
 
37275
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
37276
    public boolean isSet(_Fields field) {
-
 
37277
      switch (field) {
-
 
37278
      case SUCCESS:
-
 
37279
        return isSetSuccess();
-
 
37280
      case EX:
-
 
37281
        return isSetEx();
-
 
37282
      }
-
 
37283
      throw new IllegalStateException();
-
 
37284
    }
-
 
37285
 
-
 
37286
    public boolean isSet(int fieldID) {
-
 
37287
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
37288
    }
-
 
37289
 
-
 
37290
    @Override
-
 
37291
    public boolean equals(Object that) {
-
 
37292
      if (that == null)
-
 
37293
        return false;
-
 
37294
      if (that instanceof createPurchaseOrder_result)
-
 
37295
        return this.equals((createPurchaseOrder_result)that);
-
 
37296
      return false;
-
 
37297
    }
-
 
37298
 
-
 
37299
    public boolean equals(createPurchaseOrder_result that) {
-
 
37300
      if (that == null)
-
 
37301
        return false;
-
 
37302
 
-
 
37303
      boolean this_present_success = true;
-
 
37304
      boolean that_present_success = true;
-
 
37305
      if (this_present_success || that_present_success) {
-
 
37306
        if (!(this_present_success && that_present_success))
-
 
37307
          return false;
-
 
37308
        if (this.success != that.success)
-
 
37309
          return false;
-
 
37310
      }
-
 
37311
 
-
 
37312
      boolean this_present_ex = true && this.isSetEx();
-
 
37313
      boolean that_present_ex = true && that.isSetEx();
-
 
37314
      if (this_present_ex || that_present_ex) {
-
 
37315
        if (!(this_present_ex && that_present_ex))
-
 
37316
          return false;
-
 
37317
        if (!this.ex.equals(that.ex))
-
 
37318
          return false;
-
 
37319
      }
-
 
37320
 
-
 
37321
      return true;
-
 
37322
    }
-
 
37323
 
-
 
37324
    @Override
-
 
37325
    public int hashCode() {
-
 
37326
      return 0;
-
 
37327
    }
-
 
37328
 
-
 
37329
    public int compareTo(createPurchaseOrder_result other) {
-
 
37330
      if (!getClass().equals(other.getClass())) {
-
 
37331
        return getClass().getName().compareTo(other.getClass().getName());
-
 
37332
      }
-
 
37333
 
-
 
37334
      int lastComparison = 0;
-
 
37335
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
-
 
37336
 
-
 
37337
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
37338
      if (lastComparison != 0) {
-
 
37339
        return lastComparison;
-
 
37340
      }
-
 
37341
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
37342
      if (lastComparison != 0) {
-
 
37343
        return lastComparison;
-
 
37344
      }
-
 
37345
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
-
 
37346
      if (lastComparison != 0) {
-
 
37347
        return lastComparison;
-
 
37348
      }
-
 
37349
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
-
 
37350
      if (lastComparison != 0) {
-
 
37351
        return lastComparison;
-
 
37352
      }
-
 
37353
      return 0;
-
 
37354
    }
-
 
37355
 
-
 
37356
    public void read(TProtocol iprot) throws TException {
-
 
37357
      TField field;
-
 
37358
      iprot.readStructBegin();
-
 
37359
      while (true)
-
 
37360
      {
-
 
37361
        field = iprot.readFieldBegin();
-
 
37362
        if (field.type == TType.STOP) { 
-
 
37363
          break;
-
 
37364
        }
-
 
37365
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
37366
        if (fieldId == null) {
-
 
37367
          TProtocolUtil.skip(iprot, field.type);
-
 
37368
        } else {
-
 
37369
          switch (fieldId) {
-
 
37370
            case SUCCESS:
-
 
37371
              if (field.type == TType.I64) {
-
 
37372
                this.success = iprot.readI64();
-
 
37373
                setSuccessIsSet(true);
-
 
37374
              } else { 
-
 
37375
                TProtocolUtil.skip(iprot, field.type);
-
 
37376
              }
-
 
37377
              break;
-
 
37378
            case EX:
-
 
37379
              if (field.type == TType.STRUCT) {
-
 
37380
                this.ex = new TransactionServiceException();
-
 
37381
                this.ex.read(iprot);
-
 
37382
              } else { 
-
 
37383
                TProtocolUtil.skip(iprot, field.type);
-
 
37384
              }
-
 
37385
              break;
-
 
37386
          }
-
 
37387
          iprot.readFieldEnd();
-
 
37388
        }
-
 
37389
      }
-
 
37390
      iprot.readStructEnd();
-
 
37391
      validate();
-
 
37392
    }
-
 
37393
 
-
 
37394
    public void write(TProtocol oprot) throws TException {
-
 
37395
      oprot.writeStructBegin(STRUCT_DESC);
-
 
37396
 
-
 
37397
      if (this.isSetSuccess()) {
-
 
37398
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
37399
        oprot.writeI64(this.success);
-
 
37400
        oprot.writeFieldEnd();
-
 
37401
      } else if (this.isSetEx()) {
-
 
37402
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
37403
        this.ex.write(oprot);
-
 
37404
        oprot.writeFieldEnd();
-
 
37405
      }
-
 
37406
      oprot.writeFieldStop();
-
 
37407
      oprot.writeStructEnd();
-
 
37408
    }
-
 
37409
 
-
 
37410
    @Override
-
 
37411
    public String toString() {
-
 
37412
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
-
 
37413
      boolean first = true;
-
 
37414
 
-
 
37415
      sb.append("success:");
-
 
37416
      sb.append(this.success);
-
 
37417
      first = false;
-
 
37418
      if (!first) sb.append(", ");
-
 
37419
      sb.append("ex:");
-
 
37420
      if (this.ex == null) {
-
 
37421
        sb.append("null");
-
 
37422
      } else {
-
 
37423
        sb.append(this.ex);
36709
      }
37424
      }
36710
      first = false;
37425
      first = false;
36711
      sb.append(")");
37426
      sb.append(")");
36712
      return sb.toString();
37427
      return sb.toString();
36713
    }
37428
    }