SalesPoint v3.3 API

data
Interface DataBasketEntry<T>

All Superinterfaces:
DataBasketKeys
All Known Implementing Classes:
CatalogItemDataBasketEntry, CountingStockItemDBEntry, DataBasketEntryImpl, StockItemDBEntry, StoringStockItemDBEntry

public interface DataBasketEntry<T>
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.
 T 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

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

Override:
Always

commit

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

Override:
Always

setOwner

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

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

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

Override:
Always

getDestination

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

Override:
Always

getValue

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

Override:
Always

getMainKey

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

Override:
Always

getSecondaryKey

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

Override:
Always

isHandled

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 v3.3 API