com.ibm.commerce.giftcenter.facade.server.services.dataaccess.bom.mediator

Class ChangeGiftListPurchaseRecordPartMediator

    • Constructor Detail

      • ChangeGiftListPurchaseRecordPartMediator

        public ChangeGiftListPurchaseRecordPartMediator()
    • Method Detail

      • create

        public void create(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method creates the appropriate physical SDO and adds it to the physical data container.
        Parameters:
        aNoun - The logical GiftListType SDO business object.
        aNounPart - The logical GiftListType SDO business object.
        Throws:
        AbstractApplicationException
      • update

        public void update(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method updates the physical data container with the modified physical SDO object. This method supports modifying the below listed attributes of a purchase record. Any other elements passed other than the below would be ignored since method does not support updating them.
         
        Database table columnXPath
        GRPURREC.REGISTRANTMEMOGiftList/PurchaseRecord/RegistrantMemo
        GRPURREC.ISNOTESENTGiftList/PurchaseRecord/NoteSent
        GRPURREC.PURCHASEQUANTITYGiftList/PurchaseRecord/PurchaseItemDetails/Quantity
        The registrant or co-registrants are given access to update the first two attributes where as the third one I.e PURCHASEQUANTITY can be performed only by administrators.
        Parameters:
        aNoun - The logical GiftListType SDO business object to update.
        aNounPart - The logical PurchaseRecordType SDO business object to update.
        Throws:
        AbstractApplicationException - GiftCenterClientApplicationMessageKeys._ERR_DELETE_OR_UPDATE_NON_EXIST_PURCHASE_RECORD
      • getNounPartXPaths

        public java.lang.String[] getNounPartXPaths()
        This method gets the xpath for the noun part.
        Returns:
        The xpath for the noun part.
      • validateCreate

        public java.util.List validateCreate(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws AbstractApplicationException
        This method checks if the noun part can be created. If the noun part cannot be created, the appropriate error exception is added to the list of exceptions and returned to the caller.By default no checking is done, so an empty list is returned.
        Specified by:
        validateCreate in interface ChangeBusinessObjectPartMediator
        Overrides:
        validateCreate in class AbstractChangeGiftListPartMediator
        Parameters:
        aNoun - The logical GiftListType SDO business object.
        aNounPart - The logical PurchaseRecordType SDO business object.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty. By default an empty list is returned.
        Throws:
        AbstractApplicationException
      • validateChange

        public java.util.List validateChange(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws AbstractApplicationException
        This method checks if the noun part can be updated. If the noun part cannot be updated, the appropriate error exception is added to the list of exceptions to be returned to the caller.
        Specified by:
        validateChange in interface ChangeBusinessObjectPartMediator
        Overrides:
        validateChange in class AbstractChangeGiftListPartMediator
        Parameters:
        aNoun - The logical GiftListType SDO business object to validate.
        aNounPart - The logical PurchaseRecordType SDO business object.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty.
        Throws:
        AbstractApplicationException
      • validateDelete

        public java.util.List validateDelete(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws AbstractApplicationException
        This method checks if the noun part can be deleted. If the noun part cannot be deleted, the appropriate error exception is added to the list of exceptions and returned to the caller.By default no checking is done, so an empty list is returned.
        Specified by:
        validateDelete in interface ChangeBusinessObjectPartMediator
        Overrides:
        validateDelete in class AbstractChangeGiftListPartMediator
        Parameters:
        aNoun - The logical GiftListType SDO business object.
        aNounPart - The logical PurchaseRecordType SDO business object.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty. By default an empty list is returned.
        Throws:
        AbstractApplicationException
      • findPhysicalEntity

        public java.lang.Object findPhysicalEntity(java.lang.Object noun,
                                                   java.lang.Object nounPart)
                                            throws AbstractApplicationException
        Finds a physical purchase record entity from the initialized physical data container. It matches by purchase record ID. If there is a match, the corresponding physical gift list item is returned.
        Parameters:
        noun - - The gift list noun object.
        nounPart - - The purchase record to be resolved.
        Returns:
        Object - The physical purchase record if found, else null.
        Throws:
        AbstractApplicationException - - when an exception occurs