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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.data.domain.Page<D>findAllByArchivedFalse(org.springframework.data.domain.Pageable page)Finds and returns all entities that are notUser.archived.Optional<D>findByEmailIgnoreCaseAndServerId(String email, String serverId)Finds and returns the entity with the givenUser.emailandUser.serverId.Optional<D>findByIdAndArchivedFalse(String id)Finds and returns the entity with the given ID if notUser.archived.Optional<D>findByServiceIdAndType(String serviceId, String type)Finds the unique record whoseUser.serviceIdandUser.typematch the given values.Optional<D>findByUsernameAndServerId(String username, String serverId)Finds and returns the entity with the givenUser.usernameandUser.serverId.Optional<D>findByUsernameAndServerIdAndArchivedFalse(String username, String serverId)Optional<D>findByUsernameIgnoreCaseAndServerId(String username, String serverId)Optional<D>findByUsernameIgnoreCaseAndServerIdAndArchivedFalse(String username, String serverId)Case-insensitive find method that returns theUserwith the givenUser.usernameandUser.serverIdif notUser.archived.-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Methods inherited from interface com.broadleafcommerce.auth.user.repository.CustomizedUserRepository
replaceOnlyIfLastUpdatedBefore
-
-
-
-
Method Detail
-
findByIdAndArchivedFalse
Optional<D> findByIdAndArchivedFalse(String id)
Finds and returns the entity with the given ID if notUser.archived.- Parameters:
id- the id of the entity to find- Returns:
- an
Optionalcontaining 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 notUser.archived.- Parameters:
page- information about which page of results to return from the database- Returns:
- all entities that are not archived
-
findByEmailIgnoreCaseAndServerId
Optional<D> findByEmailIgnoreCaseAndServerId(String email, String serverId)
Finds and returns the entity with the givenUser.emailandUser.serverId.- Parameters:
email- the email to match againstUser.emailserverId- the server ID to match againstUser.serverId- Returns:
- an
Optionalcontaining the entity if found,Optional.empty()otherwise
-
findByUsernameAndServerId
Optional<D> findByUsernameAndServerId(String username, String serverId)
Finds and returns the entity with the givenUser.usernameandUser.serverId.- Parameters:
username- the username to match againstUser.usernameserverId- the server ID to match againstUser.serverId- Returns:
- an
Optionalcontaining the entity if found,Optional.empty()otherwise
-
findByUsernameIgnoreCaseAndServerId
Optional<D> findByUsernameIgnoreCaseAndServerId(String username, String serverId)
- Parameters:
username- the username to match againstUser.usernameserverId- the server ID to match againstUser.serverId- Returns:
- an
Optionalcontaining the entity if found,Optional.empty()otherwise
-
findByUsernameAndServerIdAndArchivedFalse
Optional<D> findByUsernameAndServerIdAndArchivedFalse(String username, String serverId)
- Parameters:
username- the username to match againstUser.usernameserverId- the server ID to match againstUser.serverId- Returns:
- an
Optionalcontaining the entity if found,Optional.empty()otherwise
-
findByUsernameIgnoreCaseAndServerIdAndArchivedFalse
Optional<D> findByUsernameIgnoreCaseAndServerIdAndArchivedFalse(String username, String serverId)
Case-insensitive find method that returns theUserwith the givenUser.usernameandUser.serverIdif notUser.archived.- Parameters:
username- the username to match againstUser.usernameserverId- the server ID to match againstUser.serverId- Returns:
- an
Optionalcontaining the entity if found,Optional.empty()otherwise
-
findByServiceIdAndType
Optional<D> findByServiceIdAndType(String serviceId, String type)
Finds the unique record whoseUser.serviceIdandUser.typematch the given values. Since records are only guaranteed unique if bothUser.serviceIdandUser.typeare present, this method does not accept null values for either argument.- 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.serviceIdandUser.typematch the given values
-
-