public class PersistGiftRegistryItemPurchaseRecordCmdImpl extends BusinessObjectDocumentCmdImpl implements PersistGiftRegistryItemPurchaseRecordCmd
PersistGiftRegistryCmd
. This
implementation takes a UpdateGiftRegistryPurchaseRecordBOD
,
and persists all the GiftRegistryPurchaseRecordVO
objects in
it. The general rule of persistence is that a new purchase record value
object will be inserted into database. Otherwise, the corresponding database
record of a purchase record value object will be found. It will be updated
based on the value of the purchase record as well as the verb of the value
object. A value object of purchase record is considered new if it does not
have purchaseRecordId or transactionId. If a purchase record has
transactionId only, a lookup in the database will be performed. If a purchase
record that has the transactionId is found in the database, this purchase
record will be considered as an existing record. It will be
updated instead of being created. The following are detailed behavior when a
purchase record is being created or updated: -- When a purchase record is
being created:
ECException
with the following messages will be thrown:
PersistGiftRegistryCmd
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME
The class name of this class
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
PersistGiftRegistryItemPurchaseRecordCmdImpl() |
Modifier and Type | Method and Description |
---|---|
AccessVector |
getResources()
Returns a vector of AccessBeans to check authority against
|
void |
performExecute()
Persists all the data in a gift registry value object into database.
|
getResultBOD, setRequestBOD
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResultBOD, setRequestBOD
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public PersistGiftRegistryItemPurchaseRecordCmdImpl()
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- the exception is thrown when the persisting operation failspublic AccessVector getResources() throws ECException
getResources
in interface ECCommand
getResources
in class AbstractECTargetableCommand
ECException