| 
 | SalesPoint Framework v3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdata.ooimpl.DataBasketEntryImpl
Basic simple implementation of the DataBasketEntry interface. DataBasketEntries may be coalesced, meaning that two separate operations may be expressed by one DataBasketEntry, if this is possible. Applications that inspect DataBasketEntries directly should not make assumptions about whether or not they have been coalesced.
| Field Summary | |
| protected  DataBasketEntryDestination | m_dbedDestThe destination of the operation. | 
| protected  DataBasketEntrySource | m_dbesSourceThe source of the operation. | 
| protected  DataBasketImpl | m_dbiOwnerThe DataBasket owning this entry.. | 
| protected  boolean | m_fHandledtrue if the entry was commited or rolled back completely. | 
| protected  Object | m_oValueThe object moved by the operation. | 
| protected  String | m_sMainKeyThe entry's main key. | 
| protected  String | m_sSecondaryKeyThe entry's secondary key. | 
| Fields inherited from interface data.DataBasketKeys | 
| CATALOG_ITEM_MAIN_KEY, STOCK_ITEM_MAIN_KEY | 
| Constructor Summary | |
| DataBasketEntryImpl(String sMainKey,
                                       String sSecondaryKey,
                                       DataBasketEntrySource dbesSource,
                                       DataBasketEntryDestination dbedDest,
                                       Object oValue)Create a new DataBasketEntryImpl. | |
| Method Summary | |
|  void | commit()Commit the operation. | 
|  DataBasketEntryDestination | getDestination()Get the entry's destination. | 
|  LogEntry | getLogData()Return a LogEntry that describes this DataBasketEntry. | 
|  String | getMainKey()Get the entry's main key. | 
|  DataBasket | getOwner()Return the DataBasket containing this DataBasketEntry. | 
|  String | getSecondaryKey()Get the entry's secondary key. | 
|  DataBasketEntrySource | getSource()Get the entry's source. | 
|  Object | getValue()Get the entry's value, i.e. | 
|  boolean | isHandled()Return true, if the entry has been either completely commited or rolled back. | 
|  void | rollback()Rollback the operation. | 
|  void | setOwner(DataBasket dbOwner)Set the DataBasket owning this DataBasketEntry. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected DataBasketEntrySource m_dbesSource
protected DataBasketEntryDestination m_dbedDest
protected Object m_oValue
protected String m_sMainKey
protected String m_sSecondaryKey
protected boolean m_fHandled
protected DataBasketImpl m_dbiOwner
| Constructor Detail | 
public DataBasketEntryImpl(String sMainKey,
                           String sSecondaryKey,
                           DataBasketEntrySource dbesSource,
                           DataBasketEntryDestination dbedDest,
                           Object oValue)
sMainKey - the entry's main key.sSecondaryKey - the entry's secondary key.dbesSource - the operation's source. Assumed to be a SelfManagingDBESource.dbedDest - the operation's destination.  Assumed to be a SelfManagingDBEDestination.oValue - the object moved by the operation.| Method Detail | 
public void rollback()
SelfManagingDBEDestination.rollbackAdd(data.DataBasket, data.DataBasketEntry) in
 the destination and then SelfManagingDBESource.rollbackRemove(data.DataBasket, data.DataBasketEntry) in the source of the entry.
rollback in interface DataBasketEntrypublic void commit()
SelfManagingDBESource.commitRemove(data.DataBasket, data.DataBasketEntry) in the
 source and then SelfManagingDBEDestination.commitAdd(data.DataBasket, data.DataBasketEntry) in the destination of the entry.
commit in interface DataBasketEntrypublic void setOwner(DataBasket dbOwner)
This method is public as an implementation detail and must not be called directly.
setOwner in interface DataBasketEntrydbOwner - the DataBasket that owns this DataBasketEntry. Can be null.public DataBasket getOwner()
null. Once
 setOwner(data.DataBasket) has been called, always returns the last value of the dbOwner
 parameter passed to setOwner.
getOwner in interface DataBasketEntrypublic DataBasketEntrySource getSource()
getSource in interface DataBasketEntrypublic DataBasketEntryDestination getDestination()
getDestination in interface DataBasketEntrypublic Object getValue()
getValue in interface DataBasketEntrypublic String getMainKey()
getMainKey in interface DataBasketEntrypublic String getSecondaryKey()
getSecondaryKey in interface DataBasketEntrypublic boolean isHandled()
isHandled in interface DataBasketEntrypublic LogEntry getLogData()
getLogData in interface Loggable| 
 | SalesPoint Framework v3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||