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
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<D>
findAllByArchivedFalse
(org.springframework.data.domain.Pageable page) Finds and returns all entities that are notUser.archived
.findByEmailIgnoreCaseAndServerId
(String email, String serverId) Finds and returns the entity with the givenUser.email
andUser.serverId
.findByEmailIgnoreCaseAndServerIdAndArchivedIsFalse
(String email, String serverId) Finds and returns the entity with the givenUser.email
andUser.serverId
that is notUser.archived
.Finds and returns the entity with the given ID if notUser.archived
.findByServiceIdAndType
(String serviceId, String type) Finds the unique record whoseUser.serviceId
andUser.type
match the given values.findByUsernameAndServerId
(String username, String serverId) Finds and returns the entity with the givenUser.username
andUser.serverId
.findByUsernameAndServerIdAndArchivedFalse
(String username, String serverId) Finds and returns the entity with the givenUser.username
andUser.serverId
if notUser.archived
.findByUsernameIgnoreCaseAndServerId
(String username, String serverId) findByUsernameIgnoreCaseAndServerIdAndArchivedFalse
(String username, String serverId) Case-insensitive find method that returns theUser
with the givenUser.username
andUser.serverId
if notUser.archived
.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
Methods inherited from interface com.broadleafcommerce.auth.user.repository.CustomizedUserRepository
replaceOnlyIfLastUpdatedBefore
Methods inherited from interface com.broadleafcommerce.common.extension.DomainTypeAware
getDomainType
-
Method Details
-
findByIdAndArchivedFalse
Finds and returns the entity with the given ID if notUser.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 notUser.archived
.- Parameters:
page
- information about which page of results to return from the database- Returns:
- all entities that are not archived
-
findByEmailIgnoreCaseAndServerId
Finds and returns the entity with the givenUser.email
andUser.serverId
.- Parameters:
email
- the email to match againstUser.email
serverId
- the server ID to match againstUser.serverId
- Returns:
- a List containing the entities found. Entities may be archived.
-
findByEmailIgnoreCaseAndServerIdAndArchivedIsFalse
Finds and returns the entity with the givenUser.email
andUser.serverId
that is notUser.archived
.- Parameters:
email
- the email to match againstUser.email
serverId
- the server ID to match againstUser.serverId
- Returns:
- an
Optional
containing the entity if found,Optional.empty()
otherwise
-
findByUsernameAndServerId
Finds and returns the entity with the givenUser.username
andUser.serverId
.- Parameters:
username
- the username to match againstUser.username
serverId
- the server ID to match againstUser.serverId
- Returns:
- a List containing the entities found. Entities may be archived.
-
findByUsernameIgnoreCaseAndServerId
- Parameters:
username
- the username to match againstUser.username
serverId
- the server ID to match againstUser.serverId
- Returns:
- a List containing the entities found. Entities may be archived.
-
findByUsernameAndServerIdAndArchivedFalse
Finds and returns the entity with the givenUser.username
andUser.serverId
if notUser.archived
.- Parameters:
username
- the username to match againstUser.username
serverId
- the server ID to match againstUser.serverId
- Returns:
- an
Optional
containing the entity if found,Optional.empty()
otherwise
-
findByUsernameIgnoreCaseAndServerIdAndArchivedFalse
Case-insensitive find method that returns theUser
with the givenUser.username
andUser.serverId
if notUser.archived
.- Parameters:
username
- the username to match againstUser.username
serverId
- the server ID to match againstUser.serverId
- Returns:
- an
Optional
containing the entity if found,Optional.empty()
otherwise
-
findByServiceIdAndType
Finds the unique record whoseUser.serviceId
andUser.type
match the given values. Since records are only guaranteed unique if bothUser.serviceId
andUser.type
are present, this method does not accept null values for either argument. This record may beUser.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
andUser.type
match the given values
-