Subversion Repositories SmartDukaan

Rev

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

Rev 2832 Rev 3374
Line 23... Line 23...
23
import org.apache.thrift.meta_data.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
24
import org.apache.thrift.protocol.*;
25
 
25
 
26
public class WarehouseService {
26
public class WarehouseService {
27
 
27
 
28
  public interface Iface {
28
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
29
 
29
 
30
    /**
30
    /**
31
     * Creates a purchase order based on the data in the given purchase order object.
31
     * Creates a purchase order based on the data in the given purchase order object.
32
     * This method populates a nummber of missing fields
32
     * This method populates a nummber of missing fields
33
     * 
33
     * 
Line 93... Line 93...
93
     */
93
     */
94
    public void scanOut(long itemNumber, long imeiNumber, ScanType type) throws WarehouseServiceException, TException;
94
    public void scanOut(long itemNumber, long imeiNumber, ScanType type) throws WarehouseServiceException, TException;
95
 
95
 
96
  }
96
  }
97
 
97
 
98
  public static class Client implements Iface {
98
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
99
    public Client(TProtocol prot)
99
    public Client(TProtocol prot)
100
    {
100
    {
101
      this(prot, prot);
101
      this(prot, prot);
102
    }
102
    }
103
 
103
 
104
    public Client(TProtocol iprot, TProtocol oprot)
104
    public Client(TProtocol iprot, TProtocol oprot)
105
    {
105
    {
106
      iprot_ = iprot;
-
 
107
      oprot_ = oprot;
106
      super(iprot, oprot);
108
    }
-
 
109
 
-
 
110
    protected TProtocol iprot_;
-
 
111
    protected TProtocol oprot_;
-
 
112
 
-
 
113
    protected int seqid_;
-
 
114
 
-
 
115
    public TProtocol getInputProtocol()
-
 
116
    {
-
 
117
      return this.iprot_;
-
 
118
    }
-
 
119
 
-
 
120
    public TProtocol getOutputProtocol()
-
 
121
    {
-
 
122
      return this.oprot_;
-
 
123
    }
107
    }
124
 
108
 
125
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws WarehouseServiceException, TException
109
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws WarehouseServiceException, TException
126
    {
110
    {
127
      send_createPurchaseOrder(purchaseOrder);
111
      send_createPurchaseOrder(purchaseOrder);
Line 375... Line 359...
375
      }
359
      }
376
      return;
360
      return;
377
    }
361
    }
378
 
362
 
379
  }
363
  }
380
  public static class Processor implements TProcessor {
364
  public static class Processor extends in.shop2020.generic.GenericService.Processor implements TProcessor {
381
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
365
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
382
    public Processor(Iface iface)
366
    public Processor(Iface iface)
383
    {
367
    {
-
 
368
      super(iface);
384
      iface_ = iface;
369
      iface_ = iface;
385
      processMap_.put("createPurchaseOrder", new createPurchaseOrder());
370
      processMap_.put("createPurchaseOrder", new createPurchaseOrder());
386
      processMap_.put("getPurchaseOrder", new getPurchaseOrder());
371
      processMap_.put("getPurchaseOrder", new getPurchaseOrder());
387
      processMap_.put("getSupplier", new getSupplier());
372
      processMap_.put("getSupplier", new getSupplier());
388
      processMap_.put("startPurchase", new startPurchase());
373
      processMap_.put("startPurchase", new startPurchase());
389
      processMap_.put("closePurchase", new closePurchase());
374
      processMap_.put("closePurchase", new closePurchase());
390
      processMap_.put("scanIn", new scanIn());
375
      processMap_.put("scanIn", new scanIn());
391
      processMap_.put("scanOut", new scanOut());
376
      processMap_.put("scanOut", new scanOut());
392
    }
377
    }
393
 
378
 
394
    protected static interface ProcessFunction {
-
 
395
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
-
 
396
    }
-
 
397
 
-
 
398
    private Iface iface_;
379
    private Iface iface_;
399
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
-
 
400
 
380
 
401
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
381
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
402
    {
382
    {
403
      TMessage msg = iprot.readMessageBegin();
383
      TMessage msg = iprot.readMessageBegin();
404
      ProcessFunction fn = processMap_.get(msg.name);
384
      ProcessFunction fn = processMap_.get(msg.name);