Interface CustomerRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Customer,,String> org.springframework.data.repository.ListCrudRepository<Customer,,String> org.springframework.data.repository.ListPagingAndSortingRepository<Customer,,String> org.springframework.data.mongodb.repository.MongoRepository<Customer,,String> org.springframework.data.repository.PagingAndSortingRepository<Customer,,String> org.springframework.data.repository.query.QueryByExampleExecutor<Customer>,org.springframework.data.repository.Repository<Customer,String>
@Repository
public interface CustomerRepository
extends org.springframework.data.mongodb.repository.MongoRepository<Customer,String>
Repository interface for Customer entities, providing CRUD operations and
custom query methods.
-
Method Summary
Modifier and TypeMethodDescriptionfindByEmail(String email) Retrieves a customer by their email address.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.mongodb.repository.MongoRepository
findAll, findAll, insert, insertMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByEmail
Retrieves a customer by their email address.- Parameters:
email- email to search for.- Returns:
- Optional containing the Customer, or an empty Optional otherwise.
-