Subversion Repositories SmartDukaan

Rev

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

Rev 1398 Rev 1406
Line 166... Line 166...
166
     * @param providerId
166
     * @param providerId
167
     * @param undeliveredOrders
167
     * @param undeliveredOrders
168
     */
168
     */
169
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
169
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
170
 
170
 
-
 
171
    /**
-
 
172
     * Returns the list of orders whose delivery time has passed but have not been
-
 
173
     * delivered yet for the given provider and warehouse. To get a complete list of
-
 
174
     * undelivered orders, pass them as -1.
-
 
175
     * Returns an empty list if no such orders exist.
-
 
176
     * 
-
 
177
     * @param providerId
-
 
178
     * @param warehouseId
-
 
179
     */
-
 
180
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
-
 
181
 
171
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
182
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
172
 
183
 
173
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
184
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
174
 
185
 
175
  }
186
  }
Line 1253... Line 1264...
1253
        throw result.ex;
1264
        throw result.ex;
1254
      }
1265
      }
1255
      return;
1266
      return;
1256
    }
1267
    }
1257
 
1268
 
-
 
1269
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
-
 
1270
    {
-
 
1271
      send_getUndeliveredOrders(providerId, warehouseId);
-
 
1272
      return recv_getUndeliveredOrders();
-
 
1273
    }
-
 
1274
 
-
 
1275
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
-
 
1276
    {
-
 
1277
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
-
 
1278
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
-
 
1279
      args.providerId = providerId;
-
 
1280
      args.warehouseId = warehouseId;
-
 
1281
      args.write(oprot_);
-
 
1282
      oprot_.writeMessageEnd();
-
 
1283
      oprot_.getTransport().flush();
-
 
1284
    }
-
 
1285
 
-
 
1286
    public List<Order> recv_getUndeliveredOrders() throws TException
-
 
1287
    {
-
 
1288
      TMessage msg = iprot_.readMessageBegin();
-
 
1289
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1290
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1291
        iprot_.readMessageEnd();
-
 
1292
        throw x;
-
 
1293
      }
-
 
1294
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
-
 
1295
      result.read(iprot_);
-
 
1296
      iprot_.readMessageEnd();
-
 
1297
      if (result.isSetSuccess()) {
-
 
1298
        return result.success;
-
 
1299
      }
-
 
1300
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
-
 
1301
    }
-
 
1302
 
1258
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
1303
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
1259
    {
1304
    {
1260
      send_getAlerts(orderId, valid);
1305
      send_getAlerts(orderId, valid);
1261
      return recv_getAlerts();
1306
      return recv_getAlerts();
1262
    }
1307
    }
Line 1355... Line 1400...
1355
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1400
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1356
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1401
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1357
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1402
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1358
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1403
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1359
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1404
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
-
 
1405
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
1360
      processMap_.put("getAlerts", new getAlerts());
1406
      processMap_.put("getAlerts", new getAlerts());
1361
      processMap_.put("setAlert", new setAlert());
1407
      processMap_.put("setAlert", new setAlert());
1362
    }
1408
    }
1363
 
1409
 
1364
    protected static interface ProcessFunction {
1410
    protected static interface ProcessFunction {
Line 2195... Line 2241...
2195
        oprot.getTransport().flush();
2241
        oprot.getTransport().flush();
2196
      }
2242
      }
2197
 
2243
 
2198
    }
2244
    }
2199
 
2245
 
-
 
2246
    private class getUndeliveredOrders implements ProcessFunction {
-
 
2247
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
2248
      {
-
 
2249
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
-
 
2250
        args.read(iprot);
-
 
2251
        iprot.readMessageEnd();
-
 
2252
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
-
 
2253
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
-
 
2254
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
-
 
2255
        result.write(oprot);
-
 
2256
        oprot.writeMessageEnd();
-
 
2257
        oprot.getTransport().flush();
-
 
2258
      }
-
 
2259
 
-
 
2260
    }
-
 
2261
 
2200
    private class getAlerts implements ProcessFunction {
2262
    private class getAlerts implements ProcessFunction {
2201
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2263
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2202
      {
2264
      {
2203
        getAlerts_args args = new getAlerts_args();
2265
        getAlerts_args args = new getAlerts_args();
2204
        args.read(iprot);
2266
        args.read(iprot);
Line 23076... Line 23138...
23076
      // check for required fields
23138
      // check for required fields
23077
    }
23139
    }
23078
 
23140
 
23079
  }
23141
  }
23080
 
23142
 
-
 
23143
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
-
 
23144
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
-
 
23145
 
-
 
23146
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
-
 
23147
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
-
 
23148
 
-
 
23149
    private long providerId;
-
 
23150
    private long warehouseId;
-
 
23151
 
-
 
23152
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
23153
    public enum _Fields implements TFieldIdEnum {
-
 
23154
      PROVIDER_ID((short)1, "providerId"),
-
 
23155
      WAREHOUSE_ID((short)2, "warehouseId");
-
 
23156
 
-
 
23157
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
23158
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
23159
 
-
 
23160
      static {
-
 
23161
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
23162
          byId.put((int)field._thriftId, field);
-
 
23163
          byName.put(field.getFieldName(), field);
-
 
23164
        }
-
 
23165
      }
-
 
23166
 
-
 
23167
      /**
-
 
23168
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
23169
       */
-
 
23170
      public static _Fields findByThriftId(int fieldId) {
-
 
23171
        return byId.get(fieldId);
-
 
23172
      }
-
 
23173
 
-
 
23174
      /**
-
 
23175
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
23176
       * if it is not found.
-
 
23177
       */
-
 
23178
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
23179
        _Fields fields = findByThriftId(fieldId);
-
 
23180
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
23181
        return fields;
-
 
23182
      }
-
 
23183
 
-
 
23184
      /**
-
 
23185
       * Find the _Fields constant that matches name, or null if its not found.
-
 
23186
       */
-
 
23187
      public static _Fields findByName(String name) {
-
 
23188
        return byName.get(name);
-
 
23189
      }
-
 
23190
 
-
 
23191
      private final short _thriftId;
-
 
23192
      private final String _fieldName;
-
 
23193
 
-
 
23194
      _Fields(short thriftId, String fieldName) {
-
 
23195
        _thriftId = thriftId;
-
 
23196
        _fieldName = fieldName;
-
 
23197
      }
-
 
23198
 
-
 
23199
      public short getThriftFieldId() {
-
 
23200
        return _thriftId;
-
 
23201
      }
-
 
23202
 
-
 
23203
      public String getFieldName() {
-
 
23204
        return _fieldName;
-
 
23205
      }
-
 
23206
    }
-
 
23207
 
-
 
23208
    // isset id assignments
-
 
23209
    private static final int __PROVIDERID_ISSET_ID = 0;
-
 
23210
    private static final int __WAREHOUSEID_ISSET_ID = 1;
-
 
23211
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
23212
 
-
 
23213
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
23214
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
-
 
23215
          new FieldValueMetaData(TType.I64)));
-
 
23216
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
-
 
23217
          new FieldValueMetaData(TType.I64)));
-
 
23218
    }});
-
 
23219
 
-
 
23220
    static {
-
 
23221
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
-
 
23222
    }
-
 
23223
 
-
 
23224
    public getUndeliveredOrders_args() {
-
 
23225
    }
-
 
23226
 
-
 
23227
    public getUndeliveredOrders_args(
-
 
23228
      long providerId,
-
 
23229
      long warehouseId)
-
 
23230
    {
-
 
23231
      this();
-
 
23232
      this.providerId = providerId;
-
 
23233
      setProviderIdIsSet(true);
-
 
23234
      this.warehouseId = warehouseId;
-
 
23235
      setWarehouseIdIsSet(true);
-
 
23236
    }
-
 
23237
 
-
 
23238
    /**
-
 
23239
     * Performs a deep copy on <i>other</i>.
-
 
23240
     */
-
 
23241
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
-
 
23242
      __isset_bit_vector.clear();
-
 
23243
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
23244
      this.providerId = other.providerId;
-
 
23245
      this.warehouseId = other.warehouseId;
-
 
23246
    }
-
 
23247
 
-
 
23248
    public getUndeliveredOrders_args deepCopy() {
-
 
23249
      return new getUndeliveredOrders_args(this);
-
 
23250
    }
-
 
23251
 
-
 
23252
    @Deprecated
-
 
23253
    public getUndeliveredOrders_args clone() {
-
 
23254
      return new getUndeliveredOrders_args(this);
-
 
23255
    }
-
 
23256
 
-
 
23257
    public long getProviderId() {
-
 
23258
      return this.providerId;
-
 
23259
    }
-
 
23260
 
-
 
23261
    public getUndeliveredOrders_args setProviderId(long providerId) {
-
 
23262
      this.providerId = providerId;
-
 
23263
      setProviderIdIsSet(true);
-
 
23264
      return this;
-
 
23265
    }
-
 
23266
 
-
 
23267
    public void unsetProviderId() {
-
 
23268
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
-
 
23269
    }
-
 
23270
 
-
 
23271
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
-
 
23272
    public boolean isSetProviderId() {
-
 
23273
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
-
 
23274
    }
-
 
23275
 
-
 
23276
    public void setProviderIdIsSet(boolean value) {
-
 
23277
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
-
 
23278
    }
-
 
23279
 
-
 
23280
    public long getWarehouseId() {
-
 
23281
      return this.warehouseId;
-
 
23282
    }
-
 
23283
 
-
 
23284
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
-
 
23285
      this.warehouseId = warehouseId;
-
 
23286
      setWarehouseIdIsSet(true);
-
 
23287
      return this;
-
 
23288
    }
-
 
23289
 
-
 
23290
    public void unsetWarehouseId() {
-
 
23291
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
-
 
23292
    }
-
 
23293
 
-
 
23294
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
-
 
23295
    public boolean isSetWarehouseId() {
-
 
23296
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
-
 
23297
    }
-
 
23298
 
-
 
23299
    public void setWarehouseIdIsSet(boolean value) {
-
 
23300
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
-
 
23301
    }
-
 
23302
 
-
 
23303
    public void setFieldValue(_Fields field, Object value) {
-
 
23304
      switch (field) {
-
 
23305
      case PROVIDER_ID:
-
 
23306
        if (value == null) {
-
 
23307
          unsetProviderId();
-
 
23308
        } else {
-
 
23309
          setProviderId((Long)value);
-
 
23310
        }
-
 
23311
        break;
-
 
23312
 
-
 
23313
      case WAREHOUSE_ID:
-
 
23314
        if (value == null) {
-
 
23315
          unsetWarehouseId();
-
 
23316
        } else {
-
 
23317
          setWarehouseId((Long)value);
-
 
23318
        }
-
 
23319
        break;
-
 
23320
 
-
 
23321
      }
-
 
23322
    }
-
 
23323
 
-
 
23324
    public void setFieldValue(int fieldID, Object value) {
-
 
23325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
23326
    }
-
 
23327
 
-
 
23328
    public Object getFieldValue(_Fields field) {
-
 
23329
      switch (field) {
-
 
23330
      case PROVIDER_ID:
-
 
23331
        return new Long(getProviderId());
-
 
23332
 
-
 
23333
      case WAREHOUSE_ID:
-
 
23334
        return new Long(getWarehouseId());
-
 
23335
 
-
 
23336
      }
-
 
23337
      throw new IllegalStateException();
-
 
23338
    }
-
 
23339
 
-
 
23340
    public Object getFieldValue(int fieldId) {
-
 
23341
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
23342
    }
-
 
23343
 
-
 
23344
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
23345
    public boolean isSet(_Fields field) {
-
 
23346
      switch (field) {
-
 
23347
      case PROVIDER_ID:
-
 
23348
        return isSetProviderId();
-
 
23349
      case WAREHOUSE_ID:
-
 
23350
        return isSetWarehouseId();
-
 
23351
      }
-
 
23352
      throw new IllegalStateException();
-
 
23353
    }
-
 
23354
 
-
 
23355
    public boolean isSet(int fieldID) {
-
 
23356
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
23357
    }
-
 
23358
 
-
 
23359
    @Override
-
 
23360
    public boolean equals(Object that) {
-
 
23361
      if (that == null)
-
 
23362
        return false;
-
 
23363
      if (that instanceof getUndeliveredOrders_args)
-
 
23364
        return this.equals((getUndeliveredOrders_args)that);
-
 
23365
      return false;
-
 
23366
    }
-
 
23367
 
-
 
23368
    public boolean equals(getUndeliveredOrders_args that) {
-
 
23369
      if (that == null)
-
 
23370
        return false;
-
 
23371
 
-
 
23372
      boolean this_present_providerId = true;
-
 
23373
      boolean that_present_providerId = true;
-
 
23374
      if (this_present_providerId || that_present_providerId) {
-
 
23375
        if (!(this_present_providerId && that_present_providerId))
-
 
23376
          return false;
-
 
23377
        if (this.providerId != that.providerId)
-
 
23378
          return false;
-
 
23379
      }
-
 
23380
 
-
 
23381
      boolean this_present_warehouseId = true;
-
 
23382
      boolean that_present_warehouseId = true;
-
 
23383
      if (this_present_warehouseId || that_present_warehouseId) {
-
 
23384
        if (!(this_present_warehouseId && that_present_warehouseId))
-
 
23385
          return false;
-
 
23386
        if (this.warehouseId != that.warehouseId)
-
 
23387
          return false;
-
 
23388
      }
-
 
23389
 
-
 
23390
      return true;
-
 
23391
    }
-
 
23392
 
-
 
23393
    @Override
-
 
23394
    public int hashCode() {
-
 
23395
      return 0;
-
 
23396
    }
-
 
23397
 
-
 
23398
    public int compareTo(getUndeliveredOrders_args other) {
-
 
23399
      if (!getClass().equals(other.getClass())) {
-
 
23400
        return getClass().getName().compareTo(other.getClass().getName());
-
 
23401
      }
-
 
23402
 
-
 
23403
      int lastComparison = 0;
-
 
23404
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
-
 
23405
 
-
 
23406
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
-
 
23407
      if (lastComparison != 0) {
-
 
23408
        return lastComparison;
-
 
23409
      }
-
 
23410
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
-
 
23411
      if (lastComparison != 0) {
-
 
23412
        return lastComparison;
-
 
23413
      }
-
 
23414
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
-
 
23415
      if (lastComparison != 0) {
-
 
23416
        return lastComparison;
-
 
23417
      }
-
 
23418
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
-
 
23419
      if (lastComparison != 0) {
-
 
23420
        return lastComparison;
-
 
23421
      }
-
 
23422
      return 0;
-
 
23423
    }
-
 
23424
 
-
 
23425
    public void read(TProtocol iprot) throws TException {
-
 
23426
      TField field;
-
 
23427
      iprot.readStructBegin();
-
 
23428
      while (true)
-
 
23429
      {
-
 
23430
        field = iprot.readFieldBegin();
-
 
23431
        if (field.type == TType.STOP) { 
-
 
23432
          break;
-
 
23433
        }
-
 
23434
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
23435
        if (fieldId == null) {
-
 
23436
          TProtocolUtil.skip(iprot, field.type);
-
 
23437
        } else {
-
 
23438
          switch (fieldId) {
-
 
23439
            case PROVIDER_ID:
-
 
23440
              if (field.type == TType.I64) {
-
 
23441
                this.providerId = iprot.readI64();
-
 
23442
                setProviderIdIsSet(true);
-
 
23443
              } else { 
-
 
23444
                TProtocolUtil.skip(iprot, field.type);
-
 
23445
              }
-
 
23446
              break;
-
 
23447
            case WAREHOUSE_ID:
-
 
23448
              if (field.type == TType.I64) {
-
 
23449
                this.warehouseId = iprot.readI64();
-
 
23450
                setWarehouseIdIsSet(true);
-
 
23451
              } else { 
-
 
23452
                TProtocolUtil.skip(iprot, field.type);
-
 
23453
              }
-
 
23454
              break;
-
 
23455
          }
-
 
23456
          iprot.readFieldEnd();
-
 
23457
        }
-
 
23458
      }
-
 
23459
      iprot.readStructEnd();
-
 
23460
      validate();
-
 
23461
    }
-
 
23462
 
-
 
23463
    public void write(TProtocol oprot) throws TException {
-
 
23464
      validate();
-
 
23465
 
-
 
23466
      oprot.writeStructBegin(STRUCT_DESC);
-
 
23467
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
-
 
23468
      oprot.writeI64(this.providerId);
-
 
23469
      oprot.writeFieldEnd();
-
 
23470
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
-
 
23471
      oprot.writeI64(this.warehouseId);
-
 
23472
      oprot.writeFieldEnd();
-
 
23473
      oprot.writeFieldStop();
-
 
23474
      oprot.writeStructEnd();
-
 
23475
    }
-
 
23476
 
-
 
23477
    @Override
-
 
23478
    public String toString() {
-
 
23479
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
-
 
23480
      boolean first = true;
-
 
23481
 
-
 
23482
      sb.append("providerId:");
-
 
23483
      sb.append(this.providerId);
-
 
23484
      first = false;
-
 
23485
      if (!first) sb.append(", ");
-
 
23486
      sb.append("warehouseId:");
-
 
23487
      sb.append(this.warehouseId);
-
 
23488
      first = false;
-
 
23489
      sb.append(")");
-
 
23490
      return sb.toString();
-
 
23491
    }
-
 
23492
 
-
 
23493
    public void validate() throws TException {
-
 
23494
      // check for required fields
-
 
23495
    }
-
 
23496
 
-
 
23497
  }
-
 
23498
 
-
 
23499
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
-
 
23500
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
-
 
23501
 
-
 
23502
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
23503
 
-
 
23504
    private List<Order> success;
-
 
23505
 
-
 
23506
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
23507
    public enum _Fields implements TFieldIdEnum {
-
 
23508
      SUCCESS((short)0, "success");
-
 
23509
 
-
 
23510
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
23511
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
23512
 
-
 
23513
      static {
-
 
23514
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
23515
          byId.put((int)field._thriftId, field);
-
 
23516
          byName.put(field.getFieldName(), field);
-
 
23517
        }
-
 
23518
      }
-
 
23519
 
-
 
23520
      /**
-
 
23521
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
23522
       */
-
 
23523
      public static _Fields findByThriftId(int fieldId) {
-
 
23524
        return byId.get(fieldId);
-
 
23525
      }
-
 
23526
 
-
 
23527
      /**
-
 
23528
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
23529
       * if it is not found.
-
 
23530
       */
-
 
23531
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
23532
        _Fields fields = findByThriftId(fieldId);
-
 
23533
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
23534
        return fields;
-
 
23535
      }
-
 
23536
 
-
 
23537
      /**
-
 
23538
       * Find the _Fields constant that matches name, or null if its not found.
-
 
23539
       */
-
 
23540
      public static _Fields findByName(String name) {
-
 
23541
        return byName.get(name);
-
 
23542
      }
-
 
23543
 
-
 
23544
      private final short _thriftId;
-
 
23545
      private final String _fieldName;
-
 
23546
 
-
 
23547
      _Fields(short thriftId, String fieldName) {
-
 
23548
        _thriftId = thriftId;
-
 
23549
        _fieldName = fieldName;
-
 
23550
      }
-
 
23551
 
-
 
23552
      public short getThriftFieldId() {
-
 
23553
        return _thriftId;
-
 
23554
      }
-
 
23555
 
-
 
23556
      public String getFieldName() {
-
 
23557
        return _fieldName;
-
 
23558
      }
-
 
23559
    }
-
 
23560
 
-
 
23561
    // isset id assignments
-
 
23562
 
-
 
23563
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
23564
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
23565
          new ListMetaData(TType.LIST, 
-
 
23566
              new StructMetaData(TType.STRUCT, Order.class))));
-
 
23567
    }});
-
 
23568
 
-
 
23569
    static {
-
 
23570
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
-
 
23571
    }
-
 
23572
 
-
 
23573
    public getUndeliveredOrders_result() {
-
 
23574
    }
-
 
23575
 
-
 
23576
    public getUndeliveredOrders_result(
-
 
23577
      List<Order> success)
-
 
23578
    {
-
 
23579
      this();
-
 
23580
      this.success = success;
-
 
23581
    }
-
 
23582
 
-
 
23583
    /**
-
 
23584
     * Performs a deep copy on <i>other</i>.
-
 
23585
     */
-
 
23586
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
-
 
23587
      if (other.isSetSuccess()) {
-
 
23588
        List<Order> __this__success = new ArrayList<Order>();
-
 
23589
        for (Order other_element : other.success) {
-
 
23590
          __this__success.add(new Order(other_element));
-
 
23591
        }
-
 
23592
        this.success = __this__success;
-
 
23593
      }
-
 
23594
    }
-
 
23595
 
-
 
23596
    public getUndeliveredOrders_result deepCopy() {
-
 
23597
      return new getUndeliveredOrders_result(this);
-
 
23598
    }
-
 
23599
 
-
 
23600
    @Deprecated
-
 
23601
    public getUndeliveredOrders_result clone() {
-
 
23602
      return new getUndeliveredOrders_result(this);
-
 
23603
    }
-
 
23604
 
-
 
23605
    public int getSuccessSize() {
-
 
23606
      return (this.success == null) ? 0 : this.success.size();
-
 
23607
    }
-
 
23608
 
-
 
23609
    public java.util.Iterator<Order> getSuccessIterator() {
-
 
23610
      return (this.success == null) ? null : this.success.iterator();
-
 
23611
    }
-
 
23612
 
-
 
23613
    public void addToSuccess(Order elem) {
-
 
23614
      if (this.success == null) {
-
 
23615
        this.success = new ArrayList<Order>();
-
 
23616
      }
-
 
23617
      this.success.add(elem);
-
 
23618
    }
-
 
23619
 
-
 
23620
    public List<Order> getSuccess() {
-
 
23621
      return this.success;
-
 
23622
    }
-
 
23623
 
-
 
23624
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
-
 
23625
      this.success = success;
-
 
23626
      return this;
-
 
23627
    }
-
 
23628
 
-
 
23629
    public void unsetSuccess() {
-
 
23630
      this.success = null;
-
 
23631
    }
-
 
23632
 
-
 
23633
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
23634
    public boolean isSetSuccess() {
-
 
23635
      return this.success != null;
-
 
23636
    }
-
 
23637
 
-
 
23638
    public void setSuccessIsSet(boolean value) {
-
 
23639
      if (!value) {
-
 
23640
        this.success = null;
-
 
23641
      }
-
 
23642
    }
-
 
23643
 
-
 
23644
    public void setFieldValue(_Fields field, Object value) {
-
 
23645
      switch (field) {
-
 
23646
      case SUCCESS:
-
 
23647
        if (value == null) {
-
 
23648
          unsetSuccess();
-
 
23649
        } else {
-
 
23650
          setSuccess((List<Order>)value);
-
 
23651
        }
-
 
23652
        break;
-
 
23653
 
-
 
23654
      }
-
 
23655
    }
-
 
23656
 
-
 
23657
    public void setFieldValue(int fieldID, Object value) {
-
 
23658
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
23659
    }
-
 
23660
 
-
 
23661
    public Object getFieldValue(_Fields field) {
-
 
23662
      switch (field) {
-
 
23663
      case SUCCESS:
-
 
23664
        return getSuccess();
-
 
23665
 
-
 
23666
      }
-
 
23667
      throw new IllegalStateException();
-
 
23668
    }
-
 
23669
 
-
 
23670
    public Object getFieldValue(int fieldId) {
-
 
23671
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
23672
    }
-
 
23673
 
-
 
23674
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
23675
    public boolean isSet(_Fields field) {
-
 
23676
      switch (field) {
-
 
23677
      case SUCCESS:
-
 
23678
        return isSetSuccess();
-
 
23679
      }
-
 
23680
      throw new IllegalStateException();
-
 
23681
    }
-
 
23682
 
-
 
23683
    public boolean isSet(int fieldID) {
-
 
23684
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
23685
    }
-
 
23686
 
-
 
23687
    @Override
-
 
23688
    public boolean equals(Object that) {
-
 
23689
      if (that == null)
-
 
23690
        return false;
-
 
23691
      if (that instanceof getUndeliveredOrders_result)
-
 
23692
        return this.equals((getUndeliveredOrders_result)that);
-
 
23693
      return false;
-
 
23694
    }
-
 
23695
 
-
 
23696
    public boolean equals(getUndeliveredOrders_result that) {
-
 
23697
      if (that == null)
-
 
23698
        return false;
-
 
23699
 
-
 
23700
      boolean this_present_success = true && this.isSetSuccess();
-
 
23701
      boolean that_present_success = true && that.isSetSuccess();
-
 
23702
      if (this_present_success || that_present_success) {
-
 
23703
        if (!(this_present_success && that_present_success))
-
 
23704
          return false;
-
 
23705
        if (!this.success.equals(that.success))
-
 
23706
          return false;
-
 
23707
      }
-
 
23708
 
-
 
23709
      return true;
-
 
23710
    }
-
 
23711
 
-
 
23712
    @Override
-
 
23713
    public int hashCode() {
-
 
23714
      return 0;
-
 
23715
    }
-
 
23716
 
-
 
23717
    public int compareTo(getUndeliveredOrders_result other) {
-
 
23718
      if (!getClass().equals(other.getClass())) {
-
 
23719
        return getClass().getName().compareTo(other.getClass().getName());
-
 
23720
      }
-
 
23721
 
-
 
23722
      int lastComparison = 0;
-
 
23723
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
-
 
23724
 
-
 
23725
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
23726
      if (lastComparison != 0) {
-
 
23727
        return lastComparison;
-
 
23728
      }
-
 
23729
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
23730
      if (lastComparison != 0) {
-
 
23731
        return lastComparison;
-
 
23732
      }
-
 
23733
      return 0;
-
 
23734
    }
-
 
23735
 
-
 
23736
    public void read(TProtocol iprot) throws TException {
-
 
23737
      TField field;
-
 
23738
      iprot.readStructBegin();
-
 
23739
      while (true)
-
 
23740
      {
-
 
23741
        field = iprot.readFieldBegin();
-
 
23742
        if (field.type == TType.STOP) { 
-
 
23743
          break;
-
 
23744
        }
-
 
23745
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
23746
        if (fieldId == null) {
-
 
23747
          TProtocolUtil.skip(iprot, field.type);
-
 
23748
        } else {
-
 
23749
          switch (fieldId) {
-
 
23750
            case SUCCESS:
-
 
23751
              if (field.type == TType.LIST) {
-
 
23752
                {
-
 
23753
                  TList _list72 = iprot.readListBegin();
-
 
23754
                  this.success = new ArrayList<Order>(_list72.size);
-
 
23755
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
-
 
23756
                  {
-
 
23757
                    Order _elem74;
-
 
23758
                    _elem74 = new Order();
-
 
23759
                    _elem74.read(iprot);
-
 
23760
                    this.success.add(_elem74);
-
 
23761
                  }
-
 
23762
                  iprot.readListEnd();
-
 
23763
                }
-
 
23764
              } else { 
-
 
23765
                TProtocolUtil.skip(iprot, field.type);
-
 
23766
              }
-
 
23767
              break;
-
 
23768
          }
-
 
23769
          iprot.readFieldEnd();
-
 
23770
        }
-
 
23771
      }
-
 
23772
      iprot.readStructEnd();
-
 
23773
      validate();
-
 
23774
    }
-
 
23775
 
-
 
23776
    public void write(TProtocol oprot) throws TException {
-
 
23777
      oprot.writeStructBegin(STRUCT_DESC);
-
 
23778
 
-
 
23779
      if (this.isSetSuccess()) {
-
 
23780
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
23781
        {
-
 
23782
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
23783
          for (Order _iter75 : this.success)
-
 
23784
          {
-
 
23785
            _iter75.write(oprot);
-
 
23786
          }
-
 
23787
          oprot.writeListEnd();
-
 
23788
        }
-
 
23789
        oprot.writeFieldEnd();
-
 
23790
      }
-
 
23791
      oprot.writeFieldStop();
-
 
23792
      oprot.writeStructEnd();
-
 
23793
    }
-
 
23794
 
-
 
23795
    @Override
-
 
23796
    public String toString() {
-
 
23797
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
-
 
23798
      boolean first = true;
-
 
23799
 
-
 
23800
      sb.append("success:");
-
 
23801
      if (this.success == null) {
-
 
23802
        sb.append("null");
-
 
23803
      } else {
-
 
23804
        sb.append(this.success);
-
 
23805
      }
-
 
23806
      first = false;
-
 
23807
      sb.append(")");
-
 
23808
      return sb.toString();
-
 
23809
    }
-
 
23810
 
-
 
23811
    public void validate() throws TException {
-
 
23812
      // check for required fields
-
 
23813
    }
-
 
23814
 
-
 
23815
  }
-
 
23816
 
23081
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
23817
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
23082
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
23818
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
23083
 
23819
 
23084
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
23820
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
23085
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
23821
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
Line 23686... Line 24422...
23686
        } else {
24422
        } else {
23687
          switch (fieldId) {
24423
          switch (fieldId) {
23688
            case SUCCESS:
24424
            case SUCCESS:
23689
              if (field.type == TType.LIST) {
24425
              if (field.type == TType.LIST) {
23690
                {
24426
                {
23691
                  TList _list72 = iprot.readListBegin();
24427
                  TList _list76 = iprot.readListBegin();
23692
                  this.success = new ArrayList<Alert>(_list72.size);
24428
                  this.success = new ArrayList<Alert>(_list76.size);
23693
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
24429
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
23694
                  {
24430
                  {
23695
                    Alert _elem74;
24431
                    Alert _elem78;
23696
                    _elem74 = new Alert();
24432
                    _elem78 = new Alert();
23697
                    _elem74.read(iprot);
24433
                    _elem78.read(iprot);
23698
                    this.success.add(_elem74);
24434
                    this.success.add(_elem78);
23699
                  }
24435
                  }
23700
                  iprot.readListEnd();
24436
                  iprot.readListEnd();
23701
                }
24437
                }
23702
              } else { 
24438
              } else { 
23703
                TProtocolUtil.skip(iprot, field.type);
24439
                TProtocolUtil.skip(iprot, field.type);
Line 23716... Line 24452...
23716
 
24452
 
23717
      if (this.isSetSuccess()) {
24453
      if (this.isSetSuccess()) {
23718
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24454
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23719
        {
24455
        {
23720
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
24456
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
23721
          for (Alert _iter75 : this.success)
24457
          for (Alert _iter79 : this.success)
23722
          {
24458
          {
23723
            _iter75.write(oprot);
24459
            _iter79.write(oprot);
23724
          }
24460
          }
23725
          oprot.writeListEnd();
24461
          oprot.writeListEnd();
23726
        }
24462
        }
23727
        oprot.writeFieldEnd();
24463
        oprot.writeFieldEnd();
23728
      }
24464
      }