Interface UserRepository<D>

All Superinterfaces:
org.springframework.data.repository.CrudRepository<D,String>, CustomizedUserRepository<D>, com.broadleafcommerce.common.extension.DomainTypeAware, org.springframework.data.repository.Repository<D,String>
All Known Subinterfaces:
JpaUserRepository<D>

@NoRepositoryBean public interface UserRepository<D> extends org.springframework.data.repository.CrudRepository<D,String>, CustomizedUserRepository<D>
Author:
Jeff Fischer
  • Method Details

    • findByIdAndArchivedFalse

      Optional<D> findByIdAndArchivedFalse(String id)
      Finds and returns the entity with the given ID if not User.archived.
      Parameters:
      id - the id of the entity to find
      Returns:
      an Optional containing the entity if found, Optional.empty() otherwise
    • findAllByArchivedFalse

      org.springframework.data.domain.Page<D> findAllByArchivedFalse(org.springframework.data.domain.Pageable page)
      Finds and returns all entities that are not User.archived.
      Parameters:
      page - information about which page of results to return from the database
      Returns:
      all entities that are not archived
    • findByEmailIgnoreCaseAndServerId

      List<D> findByEmailIgnoreCaseAndServerId(String email, String serverId)
      Finds and returns the entity with the given User.email and User.serverId.
      Parameters:
      email - the email to match against User.email
      serverId - the server ID to match against User.serverId
      Returns:
      a List containing the entities found. Entities may be archived.
    • findByEmailIgnoreCaseAndServerIdAndArchivedIsFalse

      Optional<D> findByEmailIgnoreCaseAndServerIdAndArchivedIsFalse(String email, String serverId)
      Finds and returns the entity with the given User.email and User.serverId that is not User.archived.
      Parameters:
      email - the email to match against User.email
      serverId - the server ID to match against User.serverId
      Returns:
      an Optional containing the entity if found, Optional.empty() otherwise
    • findByUsernameAndServerId

      List<D> findByUsernameAndServerId(String username, String serverId)
      Finds and returns the entity with the given User.username and User.serverId.
      Parameters:
      username - the username to match against User.username
      serverId - the server ID to match against User.serverId
      Returns:
      a List containing the entities found. Entities may be archived.
    • findByUsernameIgnoreCaseAndServerId

      List<D> findByUsernameIgnoreCaseAndServerId(String username, String serverId)
      Case-insensitive find method that returns the User with the given User.username and User.serverId.
      Parameters:
      username - the username to match against User.username
      serverId - the server ID to match against User.serverId
      Returns:
      a List containing the entities found. Entities may be archived.
    • findByUsernameAndServerIdAndArchivedFalse

      Optional<D> findByUsernameAndServerIdAndArchivedFalse(String username, String serverId)
      Finds and returns the entity with the given User.username and User.serverId if not User.archived.
      Parameters:
      username - the username to match against User.username
      serverId - the server ID to match against User.serverId
      Returns:
      an Optional containing the entity if found, Optional.empty() otherwise
    • findByUsernameIgnoreCaseAndServerIdAndArchivedFalse

      Optional<D> findByUsernameIgnoreCaseAndServerIdAndArchivedFalse(String username, String serverId)
      Case-insensitive find method that returns the User with the given User.username and User.serverId if not User.archived.
      Parameters:
      username - the username to match against User.username
      serverId - the server ID to match against User.serverId
      Returns:
      an Optional containing the entity if found, Optional.empty() otherwise
    • findByServiceIdAndType

      Optional<D> findByServiceIdAndType(String serviceId, String type)
      Finds the unique record whose User.serviceId and User.type match the given values. Since records are only guaranteed unique if both User.serviceId and User.type are present, this method does not accept null values for either argument. This record may be User.archived.
      Parameters:
      serviceId - the service id to match against. Must not be null.
      type - the type to match against. Must not be null.
      Returns:
      the record whose User.serviceId and User.type match the given values