Subversion Repositories SmartDukaan

Rev

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

Rev 3061 Rev 3103
Line 86... Line 86...
86
     * @param pinCode
86
     * @param pinCode
87
     */
87
     */
88
    public String getDestinationCode(long providerId, String pinCode) throws LogisticsServiceException, TException;
88
    public String getDestinationCode(long providerId, String pinCode) throws LogisticsServiceException, TException;
89
 
89
 
90
    /**
90
    /**
91
     * Returns the number of unused AWB numbers for the given provider
91
     * Returns the number of unused AWB numbers for the given provider of the given type
92
     * 
92
     * 
93
     * @param providerId
93
     * @param providerId
-
 
94
     * @param type
94
     */
95
     */
95
    public long getFreeAwbCount(long providerId) throws TException;
96
    public long getFreeAwbCount(long providerId, String type) throws TException;
96
 
97
 
97
    /**
98
    /**
98
     * Returns list of Holiday dates between fromDate and toDate (both inclusive)
99
     * Returns list of Holiday dates between fromDate and toDate (both inclusive)
99
     * fromDate should be passed as milliseconds corresponding to the start of the day.
100
     * fromDate should be passed as milliseconds corresponding to the start of the day.
100
     * If fromDate is passed as -1, fromDate is not considered for filtering
101
     * If fromDate is passed as -1, fromDate is not considered for filtering
Line 424... Line 425...
424
        throw result.se;
425
        throw result.se;
425
      }
426
      }
426
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDestinationCode failed: unknown result");
427
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDestinationCode failed: unknown result");
427
    }
428
    }
428
 
429
 
429
    public long getFreeAwbCount(long providerId) throws TException
430
    public long getFreeAwbCount(long providerId, String type) throws TException
430
    {
431
    {
431
      send_getFreeAwbCount(providerId);
432
      send_getFreeAwbCount(providerId, type);
432
      return recv_getFreeAwbCount();
433
      return recv_getFreeAwbCount();
433
    }
434
    }
434
 
435
 
435
    public void send_getFreeAwbCount(long providerId) throws TException
436
    public void send_getFreeAwbCount(long providerId, String type) throws TException
436
    {
437
    {
437
      oprot_.writeMessageBegin(new TMessage("getFreeAwbCount", TMessageType.CALL, seqid_));
438
      oprot_.writeMessageBegin(new TMessage("getFreeAwbCount", TMessageType.CALL, seqid_));
438
      getFreeAwbCount_args args = new getFreeAwbCount_args();
439
      getFreeAwbCount_args args = new getFreeAwbCount_args();
439
      args.providerId = providerId;
440
      args.providerId = providerId;
-
 
441
      args.type = type;
440
      args.write(oprot_);
442
      args.write(oprot_);
441
      oprot_.writeMessageEnd();
443
      oprot_.writeMessageEnd();
442
      oprot_.getTransport().flush();
444
      oprot_.getTransport().flush();
443
    }
445
    }
444
 
446
 
Line 787... Line 789...
787
      {
789
      {
788
        getFreeAwbCount_args args = new getFreeAwbCount_args();
790
        getFreeAwbCount_args args = new getFreeAwbCount_args();
789
        args.read(iprot);
791
        args.read(iprot);
790
        iprot.readMessageEnd();
792
        iprot.readMessageEnd();
791
        getFreeAwbCount_result result = new getFreeAwbCount_result();
793
        getFreeAwbCount_result result = new getFreeAwbCount_result();
792
        result.success = iface_.getFreeAwbCount(args.providerId);
794
        result.success = iface_.getFreeAwbCount(args.providerId, args.type);
793
        result.setSuccessIsSet(true);
795
        result.setSuccessIsSet(true);
794
        oprot.writeMessageBegin(new TMessage("getFreeAwbCount", TMessageType.REPLY, seqid));
796
        oprot.writeMessageBegin(new TMessage("getFreeAwbCount", TMessageType.REPLY, seqid));
795
        result.write(oprot);
797
        result.write(oprot);
796
        oprot.writeMessageEnd();
798
        oprot.writeMessageEnd();
797
        oprot.getTransport().flush();
799
        oprot.getTransport().flush();
Line 6089... Line 6091...
6089
 
6091
 
6090
  public static class getFreeAwbCount_args implements TBase<getFreeAwbCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFreeAwbCount_args>   {
6092
  public static class getFreeAwbCount_args implements TBase<getFreeAwbCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFreeAwbCount_args>   {
6091
    private static final TStruct STRUCT_DESC = new TStruct("getFreeAwbCount_args");
6093
    private static final TStruct STRUCT_DESC = new TStruct("getFreeAwbCount_args");
6092
 
6094
 
6093
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
6095
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
-
 
6096
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRING, (short)2);
6094
 
6097
 
6095
    private long providerId;
6098
    private long providerId;
-
 
6099
    private String type;
6096
 
6100
 
6097
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6098
    public enum _Fields implements TFieldIdEnum {
6102
    public enum _Fields implements TFieldIdEnum {
6099
      PROVIDER_ID((short)1, "providerId");
6103
      PROVIDER_ID((short)1, "providerId"),
-
 
6104
      TYPE((short)2, "type");
6100
 
6105
 
6101
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6106
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6102
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6103
 
6108
 
6104
      static {
6109
      static {
Line 6154... Line 6159...
6154
    private BitSet __isset_bit_vector = new BitSet(1);
6159
    private BitSet __isset_bit_vector = new BitSet(1);
6155
 
6160
 
6156
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6161
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6157
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
6162
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
6158
          new FieldValueMetaData(TType.I64)));
6163
          new FieldValueMetaData(TType.I64)));
-
 
6164
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
-
 
6165
          new FieldValueMetaData(TType.STRING)));
6159
    }});
6166
    }});
6160
 
6167
 
6161
    static {
6168
    static {
6162
      FieldMetaData.addStructMetaDataMap(getFreeAwbCount_args.class, metaDataMap);
6169
      FieldMetaData.addStructMetaDataMap(getFreeAwbCount_args.class, metaDataMap);
6163
    }
6170
    }
6164
 
6171
 
6165
    public getFreeAwbCount_args() {
6172
    public getFreeAwbCount_args() {
6166
    }
6173
    }
6167
 
6174
 
6168
    public getFreeAwbCount_args(
6175
    public getFreeAwbCount_args(
6169
      long providerId)
6176
      long providerId,
-
 
6177
      String type)
6170
    {
6178
    {
6171
      this();
6179
      this();
6172
      this.providerId = providerId;
6180
      this.providerId = providerId;
6173
      setProviderIdIsSet(true);
6181
      setProviderIdIsSet(true);
-
 
6182
      this.type = type;
6174
    }
6183
    }
6175
 
6184
 
6176
    /**
6185
    /**
6177
     * Performs a deep copy on <i>other</i>.
6186
     * Performs a deep copy on <i>other</i>.
6178
     */
6187
     */
6179
    public getFreeAwbCount_args(getFreeAwbCount_args other) {
6188
    public getFreeAwbCount_args(getFreeAwbCount_args other) {
6180
      __isset_bit_vector.clear();
6189
      __isset_bit_vector.clear();
6181
      __isset_bit_vector.or(other.__isset_bit_vector);
6190
      __isset_bit_vector.or(other.__isset_bit_vector);
6182
      this.providerId = other.providerId;
6191
      this.providerId = other.providerId;
-
 
6192
      if (other.isSetType()) {
-
 
6193
        this.type = other.type;
-
 
6194
      }
6183
    }
6195
    }
6184
 
6196
 
6185
    public getFreeAwbCount_args deepCopy() {
6197
    public getFreeAwbCount_args deepCopy() {
6186
      return new getFreeAwbCount_args(this);
6198
      return new getFreeAwbCount_args(this);
6187
    }
6199
    }
Line 6212... Line 6224...
6212
 
6224
 
6213
    public void setProviderIdIsSet(boolean value) {
6225
    public void setProviderIdIsSet(boolean value) {
6214
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
6226
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
6215
    }
6227
    }
6216
 
6228
 
-
 
6229
    public String getType() {
-
 
6230
      return this.type;
-
 
6231
    }
-
 
6232
 
-
 
6233
    public getFreeAwbCount_args setType(String type) {
-
 
6234
      this.type = type;
-
 
6235
      return this;
-
 
6236
    }
-
 
6237
 
-
 
6238
    public void unsetType() {
-
 
6239
      this.type = null;
-
 
6240
    }
-
 
6241
 
-
 
6242
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
-
 
6243
    public boolean isSetType() {
-
 
6244
      return this.type != null;
-
 
6245
    }
-
 
6246
 
-
 
6247
    public void setTypeIsSet(boolean value) {
-
 
6248
      if (!value) {
-
 
6249
        this.type = null;
-
 
6250
      }
-
 
6251
    }
-
 
6252
 
6217
    public void setFieldValue(_Fields field, Object value) {
6253
    public void setFieldValue(_Fields field, Object value) {
6218
      switch (field) {
6254
      switch (field) {
6219
      case PROVIDER_ID:
6255
      case PROVIDER_ID:
6220
        if (value == null) {
6256
        if (value == null) {
6221
          unsetProviderId();
6257
          unsetProviderId();
6222
        } else {
6258
        } else {
6223
          setProviderId((Long)value);
6259
          setProviderId((Long)value);
6224
        }
6260
        }
6225
        break;
6261
        break;
6226
 
6262
 
-
 
6263
      case TYPE:
-
 
6264
        if (value == null) {
-
 
6265
          unsetType();
-
 
6266
        } else {
-
 
6267
          setType((String)value);
-
 
6268
        }
-
 
6269
        break;
-
 
6270
 
6227
      }
6271
      }
6228
    }
6272
    }
6229
 
6273
 
6230
    public void setFieldValue(int fieldID, Object value) {
6274
    public void setFieldValue(int fieldID, Object value) {
6231
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6275
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 6234... Line 6278...
6234
    public Object getFieldValue(_Fields field) {
6278
    public Object getFieldValue(_Fields field) {
6235
      switch (field) {
6279
      switch (field) {
6236
      case PROVIDER_ID:
6280
      case PROVIDER_ID:
6237
        return new Long(getProviderId());
6281
        return new Long(getProviderId());
6238
 
6282
 
-
 
6283
      case TYPE:
-
 
6284
        return getType();
-
 
6285
 
6239
      }
6286
      }
6240
      throw new IllegalStateException();
6287
      throw new IllegalStateException();
6241
    }
6288
    }
6242
 
6289
 
6243
    public Object getFieldValue(int fieldId) {
6290
    public Object getFieldValue(int fieldId) {
Line 6247... Line 6294...
6247
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6294
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6248
    public boolean isSet(_Fields field) {
6295
    public boolean isSet(_Fields field) {
6249
      switch (field) {
6296
      switch (field) {
6250
      case PROVIDER_ID:
6297
      case PROVIDER_ID:
6251
        return isSetProviderId();
6298
        return isSetProviderId();
-
 
6299
      case TYPE:
-
 
6300
        return isSetType();
6252
      }
6301
      }
6253
      throw new IllegalStateException();
6302
      throw new IllegalStateException();
6254
    }
6303
    }
6255
 
6304
 
6256
    public boolean isSet(int fieldID) {
6305
    public boolean isSet(int fieldID) {
Line 6277... Line 6326...
6277
          return false;
6326
          return false;
6278
        if (this.providerId != that.providerId)
6327
        if (this.providerId != that.providerId)
6279
          return false;
6328
          return false;
6280
      }
6329
      }
6281
 
6330
 
-
 
6331
      boolean this_present_type = true && this.isSetType();
-
 
6332
      boolean that_present_type = true && that.isSetType();
-
 
6333
      if (this_present_type || that_present_type) {
-
 
6334
        if (!(this_present_type && that_present_type))
-
 
6335
          return false;
-
 
6336
        if (!this.type.equals(that.type))
-
 
6337
          return false;
-
 
6338
      }
-
 
6339
 
6282
      return true;
6340
      return true;
6283
    }
6341
    }
6284
 
6342
 
6285
    @Override
6343
    @Override
6286
    public int hashCode() {
6344
    public int hashCode() {
Line 6301... Line 6359...
6301
      }
6359
      }
6302
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
6360
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
6303
      if (lastComparison != 0) {
6361
      if (lastComparison != 0) {
6304
        return lastComparison;
6362
        return lastComparison;
6305
      }
6363
      }
-
 
6364
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
-
 
6365
      if (lastComparison != 0) {
-
 
6366
        return lastComparison;
-
 
6367
      }
-
 
6368
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
-
 
6369
      if (lastComparison != 0) {
-
 
6370
        return lastComparison;
-
 
6371
      }
6306
      return 0;
6372
      return 0;
6307
    }
6373
    }
6308
 
6374
 
6309
    public void read(TProtocol iprot) throws TException {
6375
    public void read(TProtocol iprot) throws TException {
6310
      TField field;
6376
      TField field;
Line 6326... Line 6392...
6326
                setProviderIdIsSet(true);
6392
                setProviderIdIsSet(true);
6327
              } else { 
6393
              } else { 
6328
                TProtocolUtil.skip(iprot, field.type);
6394
                TProtocolUtil.skip(iprot, field.type);
6329
              }
6395
              }
6330
              break;
6396
              break;
-
 
6397
            case TYPE:
-
 
6398
              if (field.type == TType.STRING) {
-
 
6399
                this.type = iprot.readString();
-
 
6400
              } else { 
-
 
6401
                TProtocolUtil.skip(iprot, field.type);
-
 
6402
              }
-
 
6403
              break;
6331
          }
6404
          }
6332
          iprot.readFieldEnd();
6405
          iprot.readFieldEnd();
6333
        }
6406
        }
6334
      }
6407
      }
6335
      iprot.readStructEnd();
6408
      iprot.readStructEnd();
Line 6341... Line 6414...
6341
 
6414
 
6342
      oprot.writeStructBegin(STRUCT_DESC);
6415
      oprot.writeStructBegin(STRUCT_DESC);
6343
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
6416
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
6344
      oprot.writeI64(this.providerId);
6417
      oprot.writeI64(this.providerId);
6345
      oprot.writeFieldEnd();
6418
      oprot.writeFieldEnd();
-
 
6419
      if (this.type != null) {
-
 
6420
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
-
 
6421
        oprot.writeString(this.type);
-
 
6422
        oprot.writeFieldEnd();
-
 
6423
      }
6346
      oprot.writeFieldStop();
6424
      oprot.writeFieldStop();
6347
      oprot.writeStructEnd();
6425
      oprot.writeStructEnd();
6348
    }
6426
    }
6349
 
6427
 
6350
    @Override
6428
    @Override
Line 6353... Line 6431...
6353
      boolean first = true;
6431
      boolean first = true;
6354
 
6432
 
6355
      sb.append("providerId:");
6433
      sb.append("providerId:");
6356
      sb.append(this.providerId);
6434
      sb.append(this.providerId);
6357
      first = false;
6435
      first = false;
-
 
6436
      if (!first) sb.append(", ");
-
 
6437
      sb.append("type:");
-
 
6438
      if (this.type == null) {
-
 
6439
        sb.append("null");
-
 
6440
      } else {
-
 
6441
        sb.append(this.type);
-
 
6442
      }
-
 
6443
      first = false;
6358
      sb.append(")");
6444
      sb.append(")");
6359
      return sb.toString();
6445
      return sb.toString();
6360
    }
6446
    }
6361
 
6447
 
6362
    public void validate() throws TException {
6448
    public void validate() throws TException {