data.stdforms.twotableformsheet
Class  CSDBStrategy
java.lang.Object
  |
  +--sale.stdforms.FormSheetStrategy
        |
        +--data.stdforms.twotableformsheet.MoveStrategy
              |
              +--data.stdforms.twotableformsheet.CSDBStrategy
- public class CSDBStrategy- extends MoveStrategy
MoveStrategy for a CountingStock source and a DataBasket destination.
- Since:
- v2.0
- Version:
- 2.0 20/08/1999
- Author:
- Steffen Zschaler
- See Also:
- Serialized Form
 
 
 
| Method Summary | 
| protected  int | checkMoveToDest(SaleProcess p,
                SalesPoint sp,
                CountingStock csSource,
                DataBasket dbDest,
                CatalogItem ci,
                int nCount)Check whether the indicated move is allowable.
 | 
| protected  int | checkMoveToSource(SaleProcess p,
                  SalesPoint sp,
                  CountingStock csSource,
                  DataBasket dbDest,
                  DataBasketEntry dbe,
                  int nCount)Check whether the indicated move is allowable.
 | 
| protected  Gate | getCheckMoveToDestGate(SaleProcess p,
                       SalesPoint sp,
                       CountingStock csSource,
                       DataBasket dbDest,
                       CatalogItem ci,
                       int nCount,
                       TwoTableFormSheet ttfs)Get the first gate of the sub-process that will move items from the source to the destination.
 | 
| protected  Gate | getCheckMoveToSourceGate(SaleProcess p,
                         SalesPoint sp,
                         CountingStock csSource,
                         DataBasket dbDest,
                         DataBasketEntry dbe,
                         int nCount,
                         TwoTableFormSheet ttfs)Get the first gate of the sub-process that will move items from the destination to the source.
 | 
|  Transition | getMoveToDestProcess(SaleProcess p,
                     SalesPoint sp,
                     CountingStock csSource,
                     DataBasket dbDest,
                     CatalogItem ci,
                     int nCount,
                     TwoTableFormSheet ttfs)Get the sub-process that will move items from the source to the destination.
 | 
|  Transition | getMoveToSourceProcess(SaleProcess p,
                       SalesPoint sp,
                       CountingStock csSource,
                       DataBasket dbDest,
                       DataBasketEntry dbe,
                       int nCount,
                       TwoTableFormSheet ttfs)Get the sub-process that will move items from the destination to the source.
 | 
| protected  void | moveToDest(SaleProcess p,
           SalesPoint sp,
           CountingStock csSource,
           DataBasket dbDest,
           CatalogItem ci,
           int nCount)Move the indicated number of items as indicated into the destination DataBasket.
 | 
| protected  void | moveToSource(SaleProcess p,
             SalesPoint sp,
             CountingStock csSource,
             DataBasket dbDest,
             DataBasketEntry dbe,
             int nCount)Move the indicated number of items as indicated from the source into the destination.
 | 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
 
CSDBStrategy
public CSDBStrategy()
getMoveToDestProcess
public Transition getMoveToDestProcess(SaleProcess p,
                                       SalesPoint sp,
                                       CountingStock csSource,
                                       DataBasket dbDest,
                                       CatalogItem ci,
                                       int nCount,
                                       TwoTableFormSheet ttfs)
- Get the sub-process that will move items from the source to the destination.- 
- Override:
- Never.
- Parameters:
- p- the process into which the sub-process wil be embedded.
- sp- the SalesPoint, if any, at which the FormSheet is being displayed.
- csSource- the source CountingStock.
- dbDest- the destination DataBasket.
- ci- the CatalogItem that is selected in the source.
- nCount- the number of items to be moved.
- ttfs- the FormSheet that triggers the process.
 
getCheckMoveToDestGate
protected Gate getCheckMoveToDestGate(SaleProcess p,
                                      SalesPoint sp,
                                      CountingStock csSource,
                                      DataBasket dbDest,
                                      CatalogItem ci,
                                      int nCount,
                                      TwoTableFormSheet ttfs)
- Get the first gate of the sub-process that will move items from the source to the destination.
 This Gate will check whether the move is allowable, and if so, will trigger a Transition that
 performs it. 
- 
- Override:
- Never.-  Instead, override checkMoveToDest(sale.SaleProcess, sale.SalesPoint, data.CountingStock, data.DataBasket, data.CatalogItem, int)and/ormoveToDest(sale.SaleProcess, sale.SalesPoint, data.CountingStock, data.DataBasket, data.CatalogItem, int).
- Parameters:
- p- the process into which the sub-process wil be embedded.
- sp- the SalesPoint, if any, at which the FormSheet is being displayed.
- csSource- the source CountingStock.
- dbDest- the destination DataBasket.
- ci- the CatalogItem that is selected in the source.
- nCount- the number of items to be moved.
- ttfs- the FormSheet that triggers the process.
 
checkMoveToDest
protected int checkMoveToDest(SaleProcess p,
                              SalesPoint sp,
                              CountingStock csSource,
                              DataBasket dbDest,
                              CatalogItem ci,
                              int nCount)
                       throws InterruptedException
- Check whether the indicated move is allowable. If so, return 0, otherwise return a non-zero error value
 that can be passed on to FormSheetStrategy.error(sale.SaleProcess, int). You can assume that you are at aGate.
- 
- Override:
- Sometimes.-  The default implementation returns 0.
- Parameters:
- p- the process into which the sub-process wil be embedded.
- sp- the SalesPoint, if any, at which the FormSheet is being displayed.
- csSource- the source CountingStock.
- dbDest- the destination DataBasket.
- ci- the CatalogItem that is selected in the source.
- nCount- the number of items to be moved.
 
moveToDest
protected void moveToDest(SaleProcess p,
                          SalesPoint sp,
                          CountingStock csSource,
                          DataBasket dbDest,
                          CatalogItem ci,
                          int nCount)
- Move the indicated number of items as indicated into the destination DataBasket. You can assume that you
 are in a Transition.
- 
- Override:
- Sometimes.
- Parameters:
- p- the process into which the sub-process wil be embedded.
- sp- the SalesPoint, if any, at which the FormSheet is being displayed.
- csSource- the source CountingStock.
- dbDest- the destination DataBasket.
- ci- the CatalogItem that is selected in the source.
- nCount- the number of items to be moved.
 
getMoveToSourceProcess
public Transition getMoveToSourceProcess(SaleProcess p,
                                         SalesPoint sp,
                                         CountingStock csSource,
                                         DataBasket dbDest,
                                         DataBasketEntry dbe,
                                         int nCount,
                                         TwoTableFormSheet ttfs)
- Get the sub-process that will move items from the destination to the source.- 
- Override:
- Never.
- Parameters:
- p- the process into which the sub-process wil be embedded.
- sp- the SalesPoint, if any, at which the FormSheet is being displayed.
- csSource- the source CountingStock.
- dbDest- the destination DataBasket.
- dbe- the DataBasketEntry that is selected in the destination.
- nCount- the number of items to be moved.
- ttfs- the FormSheet that triggers the process.
 
getCheckMoveToSourceGate
protected Gate getCheckMoveToSourceGate(SaleProcess p,
                                        SalesPoint sp,
                                        CountingStock csSource,
                                        DataBasket dbDest,
                                        DataBasketEntry dbe,
                                        int nCount,
                                        TwoTableFormSheet ttfs)
- Get the first gate of the sub-process that will move items from the destination to the source.
 This Gate will check whether the move is allowable, and if so, will trigger a Transition that
 performs it. 
- 
- Override:
- Never.-  Instead, override checkMoveToSource(sale.SaleProcess, sale.SalesPoint, data.CountingStock, data.DataBasket, data.DataBasketEntry, int)and/ormoveToSource(sale.SaleProcess, sale.SalesPoint, data.CountingStock, data.DataBasket, data.DataBasketEntry, int).
- Parameters:
- p- the process into which the sub-process wil be embedded.
- sp- the SalesPoint, if any, at which the FormSheet is being displayed.
- csSource- the source CountingStock.
- dbDest- the destination DataBasket.
- dbe- the DataBasketEntry that is selected in the destination.
- nCount- the number of items to be moved.
- ttfs- the FormSheet that triggers the process.
 
checkMoveToSource
protected int checkMoveToSource(SaleProcess p,
                                SalesPoint sp,
                                CountingStock csSource,
                                DataBasket dbDest,
                                DataBasketEntry dbe,
                                int nCount)
                         throws InterruptedException
- Check whether the indicated move is allowable. If so, return 0, otherwise return a non-zero error value
 that can be passed on to FormSheetStrategy.error(sale.SaleProcess, int). You can assume that you are at aGate.
- 
- Override:
- Sometimes.-  The default implementation returns
 ProcessErrorCodes.NOT_ENOUGH_ELEMENTS_ERRORif yoy try to move more elements than are available
 in the DataBasketEntry.
- Parameters:
- p- the process into which the sub-process wil be embedded.
- sp- the SalesPoint, if any, at which the FormSheet is being displayed.
- csSource- the source CountingStock.
- dbDest- the destination DataBasket.
- dbe- the DataBasketEntry that is selected in the destination.
- nCount- the number of items to be moved.
 
moveToSource
protected void moveToSource(SaleProcess p,
                            SalesPoint sp,
                            CountingStock csSource,
                            DataBasket dbDest,
                            DataBasketEntry dbe,
                            int nCount)
- Move the indicated number of items as indicated from the source into the destination. You can assume that
 you are in a Transition.
- 
- Override:
- Sometimes.
- Parameters:
- p- the process into which the sub-process wil be embedded.
- sp- the SalesPoint, if any, at which the FormSheet is being displayed.
- csSource- the source CountingStock.
- dbDest- the destination DataBasket.
- dbe- the DataBasketEntry that is selected in the destination.
- nCount- the number of items to be moved.