Class MemberCacheViewImpl

All Implemented Interfaces:
Iterable<Member>, CacheView<Member>, MemberCacheView, SnowflakeCacheView<Member>

public class MemberCacheViewImpl extends SnowflakeCacheViewImpl<Member> implements MemberCacheView
  • Constructor Details

    • MemberCacheViewImpl

      public MemberCacheViewImpl()
  • Method Details

    • getElementById

      public Member getElementById(long id)
      Description copied from interface: SnowflakeCacheView
      Retrieves the entity represented by the provided ID.
      Specified by:
      getElementById in interface MemberCacheView
      Specified by:
      getElementById in interface SnowflakeCacheView<Member>
      Overrides:
      getElementById in class SnowflakeCacheViewImpl<Member>
      Parameters:
      id - The ID of the entity
      Returns:
      Possibly-null entity for the specified ID
    • getElementsByUsername

      @Nonnull public List<Member> getElementsByUsername(@Nonnull String name, boolean ignoreCase)
      Description copied from interface: MemberCacheView
      Creates an immutable list of all members matching the given username.
      This will check the name of the wrapped user.
      Specified by:
      getElementsByUsername in interface MemberCacheView
      Parameters:
      name - The name to check
      ignoreCase - Whether to ignore case when comparing usernames
      Returns:
      Immutable list of members with the given username
    • getElementsByNickname

      @Nonnull public List<Member> getElementsByNickname(@Nullable String name, boolean ignoreCase)
      Description copied from interface: MemberCacheView
      Creates an immutable list of all members matching the given nickname.
      This will check the nickname of the member. If provided with null this will check for members that have no nickname set.
      Specified by:
      getElementsByNickname in interface MemberCacheView
      Parameters:
      name - The nullable nickname to check
      ignoreCase - Whether to ignore case when comparing nicknames
      Returns:
      Immutable list of members with the given nickname
    • getElementsWithRoles

      @Nonnull public List<Member> getElementsWithRoles(@Nonnull Role... roles)
      Description copied from interface: MemberCacheView
      Creates an immutable list of all members that hold all of the provided roles.
      Specified by:
      getElementsWithRoles in interface MemberCacheView
      Parameters:
      roles - Roles the members should have
      Returns:
      Immutable list of members with the given roles
    • getElementsWithRoles

      @Nonnull public List<Member> getElementsWithRoles(@Nonnull Collection<Role> roles)
      Description copied from interface: MemberCacheView
      Creates an immutable list of all members that hold all of the provided roles.
      Specified by:
      getElementsWithRoles in interface MemberCacheView
      Parameters:
      roles - Roles the members should have
      Returns:
      Immutable list of members with the given roles