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.emailandUser.serverId.findByEmailIgnoreCaseAndServerIdAndArchivedIsFalse(String email, String serverId) Finds and returns the entity with the givenUser.emailandUser.serverIdthat 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.serviceIdandUser.typematch the given values.findByUsernameAndServerId(String username, String serverId) Finds and returns the entity with the givenUser.usernameandUser.serverId.findByUsernameAndServerIdAndArchivedFalse(String username, String serverId) Finds and returns the entity with the givenUser.usernameandUser.serverIdif notUser.archived.findByUsernameIgnoreCaseAndServerId(String username, String serverId) 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, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAllMethods inherited from interface com.broadleafcommerce.auth.user.repository.CustomizedUserRepository
replaceOnlyIfLastUpdatedBeforeMethods 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
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
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:
- a List containing the entities found. Entities may be archived.
-
findByEmailIgnoreCaseAndServerIdAndArchivedIsFalse
Finds and returns the entity with the givenUser.emailandUser.serverIdthat is notUser.archived.- 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
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:
- a List containing the entities found. Entities may be archived.
-
findByUsernameIgnoreCaseAndServerId
- Parameters:
username- the username to match againstUser.usernameserverId- 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.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
-
findByUsernameIgnoreCaseAndServerIdAndArchivedFalse
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
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. 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.serviceIdandUser.typematch the given values
-