com.ibm.commerce.attachment.commands

Class DeleteAttachmentRelationCmdImpl

  • All Implemented Interfaces:
    DeleteAttachmentRelationCmd, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class DeleteAttachmentRelationCmdImpl
    extends TaskCommandImpl
    implements DeleteAttachmentRelationCmd
    Deletes an attachment relation with the specified parameters.
    Behavior:
    • Delete by the attachment relation.
      • The delete by business object option is set to False.
      • If the attachment relation ID is not given, then other IDs are needed to identify the attachment relation. This IDs includes the attachment object type ID, object ID, attachment target ID, and attachment relation usage ID. This IDs will be used to obtain the attachment relation ID. If the attachment relation is not found, an exception will be thrown.
      • Delete the corresponding attachment relation.
    • Delete all the attachment relations in a business object.
      • The delete by business object option is set to True.
      • The attachment object type ID and the object ID must be specified, an exception will be thrown if any one of these parameters are missing.
      • Find all the attachment relation belongs to that business object, and delete all the attachment relations found.
    • By default, the delete by business object is set to False so it will delete only the specified attachment relation.
    Access Bean:
    • AttachmentRelationAccessBean
    • StoreEntityAccessBean
    Helper:
    • AttachmentRelationHelper
    See Also:
    Serialized Form
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        Define the CLASSNAME.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DeleteAttachmentRelationCmdImpl

        public DeleteAttachmentRelationCmdImpl()
    • Method Detail

      • getAttachmentObjectTypeId

        public java.lang.Integer getAttachmentObjectTypeId()
        Gets the attachment object type ID of the business object that owns the attachment relation.
        Specified by:
        getAttachmentObjectTypeId in interface DeleteAttachmentRelationCmd
        Returns:
        The attachment object type ID
      • getAttachmentRelationUsageId

        public java.lang.Integer getAttachmentRelationUsageId()
        Gets the attachment relation usage ID used in this attachment relation.
        Specified by:
        getAttachmentRelationUsageId in interface DeleteAttachmentRelationCmd
        Returns:
        The attachment relation usage ID
      • getAttachmentTargetId

        public java.lang.Long getAttachmentTargetId()
        Gets the attachment target ID used in this attachment relation.
        Specified by:
        getAttachmentTargetId in interface DeleteAttachmentRelationCmd
        Returns:
        The attachment target ID
      • getObjectId

        public java.lang.String getObjectId()
        Gets the primary key, in the form of a string, of the business object that owns this attachment relation.
        Specified by:
        getObjectId in interface DeleteAttachmentRelationCmd
        Returns:
        The primary key of the business object
      • getDeleteByBusinessObject

        public java.lang.Boolean getDeleteByBusinessObject()
        Gets the option to delete all the attachment relations by business object.
        • True = delete all the attachment relations by the business object specified in the parameter
        • False = delete by attachment relation ID or the unique index of the attachment relation
        By default, this option is set to False.
        Specified by:
        getDeleteByBusinessObject in interface DeleteAttachmentRelationCmd
        Returns:
        The primary key of the business object
      • reset

        public void reset()
        Resets all the parameters
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setAttachmentRelationId

        public void setAttachmentRelationId(java.lang.Long anAttachmentRelationId)
        Sets the attachment relation ID.
        Specified by:
        setAttachmentRelationId in interface DeleteAttachmentRelationCmd
        Parameters:
        anAttachmentRelationId - The attachment relation ID
      • setAttachmentObjectTypeId

        public void setAttachmentObjectTypeId(java.lang.Integer anAttachmentObjectTypeId)
        Sets the attachment object type ID of the business object that owns this attachment relation.
        Specified by:
        setAttachmentObjectTypeId in interface DeleteAttachmentRelationCmd
        Parameters:
        anAttachmentObjectTypeId - The attachment object type ID
      • setAttachmentRelationUsageId

        public void setAttachmentRelationUsageId(java.lang.Integer anAttachmentRelationUsageId)
        Sets the attachment relation usage ID used in this attachment relation.
        Specified by:
        setAttachmentRelationUsageId in interface DeleteAttachmentRelationCmd
        Parameters:
        anAttachmentRelationUsageId - The attachment relation usage
      • setAttachmentTargetId

        public void setAttachmentTargetId(java.lang.Long anAttachmentTargetId)
        Sets the attachment target ID used in the attachment relation.
        Specified by:
        setAttachmentTargetId in interface DeleteAttachmentRelationCmd
        Parameters:
        anAttachmentTargetId - The attachment target ID
      • setObjectId

        public void setObjectId(java.lang.String astrObjectId)
        Sets the primary key, in the form of a string, of the business object that owns this attachment relation.
        Specified by:
        setObjectId in interface DeleteAttachmentRelationCmd
        Parameters:
        astrObjectId -
      • setDeleteByBusinessObject

        public void setDeleteByBusinessObject(java.lang.Boolean aboolDeleteByBusinessObject)
        Sets the option to delete all the attachment relations by business object.
        • True = delete all the attachment relations by the business object specified in the parameter
        • False = delete by attachment relation ID or the unique index of the attachment relation
        By default, this option is set to False.
        Specified by:
        setDeleteByBusinessObject in interface DeleteAttachmentRelationCmd
        Parameters:
        aboolDeleteByBusinessObject - Option to delete attachment relations by business object