SalesPoint Framework v3.1

data
Interface DataBasketEntry

All Superinterfaces:
DataBasketKeys
All Known Implementing Classes:
DataBasketEntryImpl

public interface DataBasketEntry
extends DataBasketKeys

An entry in a DataBasket.

DataBasketEntries describe an object that was removed from a data container, put into a data container or moved between data containers. They know about the source and destination of the operation and about the object that was moved. Additionally, they know how to commit or rollback the operation.

For reasons of efficency, DataBasketEntries are stored in a hierarchical structure, with three levels: categories, these are selected via the DataBasketEntry's main key; subcategories, selected via the DataBasketEntry's secondary key; and the items selected by the DataBasketEntry's value.

Since:
v2.0
Author:
Steffen Zschaler

Field Summary
 
Fields inherited from interface data.DataBasketKeys
CATALOG_ITEM_MAIN_KEY, STOCK_ITEM_MAIN_KEY
 
Method Summary
 void commit()
          Commit the operation described by the DataBasketEntry.
 DataBasketEntryDestination getDestination()
          Get the destination of the operation described by the DataBasketEntry.
 String getMainKey()
          Get the DataBasketEntry's main key.
 DataBasket getOwner()
          Return the DataBasket containing this DataBasketEntry.
 String getSecondaryKey()
          Get the DataBasketEntry's secondary key.
 DataBasketEntrySource getSource()
          Get the source of the operation described by the DataBasketEntry.
 Object getValue()
          Get the object moved by the operation described by the DataBasketEntry.
 boolean isHandled()
          Return false as long as no complete commit or rollback has been issued for this DataBasketEntry.
 void rollback()
          Roll back the operation described by the DataBasketEntry.
 void setOwner(DataBasket dbOwner)
          Notification that the DataBasketEntry was put into a DataBasket.
 

Method Detail

rollback

public void rollback()
Roll back the operation described by the DataBasketEntry.

Override:
Always

commit

public void commit()
Commit the operation described by the DataBasketEntry.

Override:
Always

setOwner

public void setOwner(DataBasket dbOwner)
Notification that the DataBasketEntry was put into a DataBasket.

Parameters:
dbOwner - the DataBasket that owns this DataBasketEntry. Can be null.
Override:
Always

getOwner

public DataBasket getOwner()
Return the DataBasket containing this DataBasketEntry. Initially null. Once setOwner(data.DataBasket) has been called, always returns the last value of the dbOwner parameter passed to setOwner.

Returns:
the DataBasket containing this DataBasketEntry.

getSource

public DataBasketEntrySource getSource()
Get the source of the operation described by the DataBasketEntry.

Override:
Always

getDestination

public DataBasketEntryDestination getDestination()
Get the destination of the operation described by the DataBasketEntry.

Override:
Always

getValue

public Object getValue()
Get the object moved by the operation described by the DataBasketEntry.

Override:
Always

getMainKey

public String getMainKey()
Get the DataBasketEntry's main key.

Override:
Always

getSecondaryKey

public String getSecondaryKey()
Get the DataBasketEntry's secondary key.

Override:
Always

isHandled

public boolean isHandled()
Return false as long as no complete commit or rollback has been issued for this DataBasketEntry. Returning true will lead to the DataBasketEntry being removed from the DataBasket as soon as convenient. DataBasketEntries that return true from this method are, however, guaranteed to no longer participate in any iterations of the DataBasket.

Override:
Always

SalesPoint Framework v3.1