|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object data.ooimpl.DataBasketEntryImpl<T>
public class DataBasketEntryImpl<T>
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_dbedDest
The destination of the operation. |
protected DataBasketEntrySource |
m_dbesSource
The source of the operation. |
protected DataBasketImpl |
m_dbiOwner
The DataBasket owning this entry.. |
protected boolean |
m_fHandled
true if the entry was commited or rolled back completely. |
protected T |
m_oValue
The object moved by the operation. |
protected String |
m_sMainKey
The entry's main key. |
protected String |
m_sSecondaryKey
The 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,
T 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. |
T |
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 T 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, T 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 DataBasketEntry<T>
public 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 DataBasketEntry<T>
public void setOwner(DataBasket dbOwner)
This method is public as an implementation detail and must not be called directly.
setOwner
in interface DataBasketEntry<T>
dbOwner
- 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 DataBasketEntry<T>
public DataBasketEntrySource getSource()
getSource
in interface DataBasketEntry<T>
public DataBasketEntryDestination getDestination()
getDestination
in interface DataBasketEntry<T>
public T getValue()
getValue
in interface DataBasketEntry<T>
public String getMainKey()
getMainKey
in interface DataBasketEntry<T>
public String getSecondaryKey()
getSecondaryKey
in interface DataBasketEntry<T>
public boolean isHandled()
isHandled
in interface DataBasketEntry<T>
public LogEntry getLogData()
getLogData
in interface Loggable
|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |