@NoRepositoryBean public interface UserRepository<D> extends org.springframework.data.repository.CrudRepository<D,String>, CustomizedUserRepository<D>
Modifier and Type | Method and Description |
---|---|
org.springframework.data.domain.Page<D> |
findAllByArchivedFalse(org.springframework.data.domain.Pageable page)
Finds and returns all entities that are not
User.archived . |
Optional<D> |
findByEmailIgnoreCaseAndServerId(String email,
String serverId)
Finds and returns the entity with the given
User.email and User.serverId . |
Optional<D> |
findByIdAndArchivedFalse(String id)
Finds and returns the entity with the given ID if not
User.archived . |
Optional<D> |
findByServiceIdAndType(String serviceId,
String type)
Finds the unique record whose
User.serviceId and User.type match the given
values. |
Optional<D> |
findByUsernameAndServerId(String username,
String serverId)
Finds and returns the entity with the given
User.username and User.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 the
User with the given
User.username and User.serverId if not User.archived . |
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAllById, findById, save, saveAll
replaceOnlyIfLastUpdatedBefore
Optional<D> findByIdAndArchivedFalse(String id)
User.archived
.id
- the id of the entity to findOptional
containing the entity if found, Optional.empty()
otherwiseorg.springframework.data.domain.Page<D> findAllByArchivedFalse(org.springframework.data.domain.Pageable page)
User.archived
.page
- information about which page of results to return from the databaseOptional<D> findByEmailIgnoreCaseAndServerId(String email, String serverId)
User.email
and User.serverId
.email
- the email to match against User.email
serverId
- the server ID to match against User.serverId
Optional
containing the entity if found, Optional.empty()
otherwiseOptional<D> findByUsernameAndServerId(String username, String serverId)
User.username
and User.serverId
.username
- the username to match against User.username
serverId
- the server ID to match against User.serverId
Optional
containing the entity if found, Optional.empty()
otherwiseOptional<D> findByUsernameIgnoreCaseAndServerId(String username, String serverId)
username
- the username to match against User.username
serverId
- the server ID to match against User.serverId
Optional
containing the entity if found, Optional.empty()
otherwiseOptional<D> findByUsernameAndServerIdAndArchivedFalse(String username, String serverId)
username
- the username to match against User.username
serverId
- the server ID to match against User.serverId
Optional
containing the entity if found, Optional.empty()
otherwiseOptional<D> findByUsernameIgnoreCaseAndServerIdAndArchivedFalse(String username, String serverId)
User
with the given
User.username
and User.serverId
if not User.archived
.username
- the username to match against User.username
serverId
- the server ID to match against User.serverId
Optional
containing the entity if found, Optional.empty()
otherwiseOptional<D> findByServiceIdAndType(String serviceId, String type)
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.serviceId
- the service id to match against. Must not be null.type
- the type to match against. Must not be null.User.serviceId
and User.type
match the given valuesCopyright © 2021. All rights reserved.