com.ibm.commerce.membergroup.commands

Class ListUsersInStoreMemberGroupCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, ListUsersInStoreMemberGroupCmd, SegmentConstants, 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 ListUsersInStoreMemberGroupCmdImpl
    extends TaskCommandImpl
    implements ListUsersInStoreMemberGroupCmd, SegmentConstants
    This class implements the ListUsersInStoreMemberGroupCmd interface to provide the task command that lists all of the users that belong to a specified member group and have Registered Customer role for the store the member group associated. AccessBean used within the implementation:MemberGroupAccessBean, OrganizationAccessBean, UserAccessBean, StoreEntityAccessBean, MemberRoleAccessBean, RecognizedMemberGroupAccessBean, OrgEntityManageBean, RoleAccessBean.
    See Also:
    Serialized Form
    • Field Detail

    • Constructor Detail

      • ListUsersInStoreMemberGroupCmdImpl

        public ListUsersInStoreMemberGroupCmdImpl()
    • Method Detail

      • setMemberGroupName

        public void setMemberGroupName(java.lang.String memberGroupName)
        set the member group name.
        Specified by:
        setMemberGroupName in interface ListUsersInStoreMemberGroupCmd
        Parameters:
        name - the name of the membergroup.
      • setMemberGroupOwnerId

        public void setMemberGroupOwnerId(java.lang.Long memberGroupOwnerId)
        set the member group owner Id.
        Specified by:
        setMemberGroupOwnerId in interface ListUsersInStoreMemberGroupCmd
        Parameters:
        memberGroupOwnerId - the Id of the member group owner.
      • getUsers

        public UserAccessBean[] getUsers()
        return the users.
        Specified by:
        getUsers in interface ListUsersInStoreMemberGroupCmd
        Returns:
        the users that belong to a specified member group and have Registered Customer role for the store the member group associated.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        Checks to see if the command is ready to call. This method will return false if both the member group name and the member group access bean are null.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        true if the command is ready to go.
      • setQueryOnly

        public void setQueryOnly(boolean flag)
        Defers executing the query generated for querying members of the group to the caller. Useful when the caller wishes to manage the database connection and result set. The caller should use getQuery() to retreive the resulting SQL.
        Specified by:
        setQueryOnly in interface ListUsersInStoreMemberGroupCmd
        Parameters:
        flag - Set to true if only the SQL query is required, false otherwise.
      • getQuery

        public java.lang.String getQuery()
        Returns the SQL query used to generate the list of members in the group.
        Specified by:
        getQuery in interface ListUsersInStoreMemberGroupCmd
        Returns:
        the SQL query used to generate the list of members in the group.
      • setQueryWrapper

        public void setQueryWrapper(java.lang.String queryWrapper)
        Wraps the query used to determine the members of the group with the passed parameter. The parameter should be a string containing "%3CQUERY%3E" in the location the original query should be placed. All queries generated will return a set of MEMBER_ID values. Query wrappers may be any query fragment that uses %3CQUERY%3E to represent such a result set.
        Specified by:
        setQueryWrapper in interface ListUsersInStoreMemberGroupCmd
        Parameters:
        queryWrapper - the query with which to wrap the original query.
      • setMemberGroupIds

        public void setMemberGroupIds(java.lang.String[] mbrGrpIds,
                                      java.lang.String anyOrAll)
        This method sets the additonal member group IDs of the customer segments to which to return the list of users. These member group IDs are in addition to the member group passed in through the request property parameter memberGroupId to this command.
        Specified by:
        setMemberGroupIds in interface ListUsersInStoreMemberGroupCmd
        Parameters:
        mbrGrpIds - The set of IDs of the member groups to which to return the list of users.
        anyOrAll - Should the list of users be the customers in each of the specified groups (any), or should the list of users be those who are in all of the specified groups (all). Valid values are: any, all.