Interface SellerRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Seller,java.lang.String>
,org.springframework.data.mongodb.repository.MongoRepository<Seller,java.lang.String>
,org.springframework.data.repository.PagingAndSortingRepository<Seller,java.lang.String>
,org.springframework.data.repository.query.QueryByExampleExecutor<Seller>
,org.springframework.data.repository.Repository<Seller,java.lang.String>
@Repository public interface SellerRepository extends org.springframework.data.mongodb.repository.MongoRepository<Seller,java.lang.String>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteById(java.lang.String id)
java.util.List<Seller>
findAllSellerByIds(java.util.HashSet<java.lang.String> ids)
java.util.Optional<Seller>
findByAccountId(java.lang.String accountId)
java.util.List<Seller>
findByAddressId(java.lang.String addressId)
java.util.Optional<Seller>
findById(java.lang.String id)
java.util.Optional<Seller>
findByProfileId(java.lang.String profileId)
java.util.Optional<Seller>
findBySubscription(java.lang.String subscriptionId)
java.util.Optional<Seller>
findCompanyIgnoreCase(java.lang.String companyName)
java.util.Optional<Seller>
findCompanyIgnoreCase(java.lang.String companyName, java.lang.String addressId)
java.util.stream.Stream<Seller>
findSellerAsStream(java.lang.String sellerId)
<S extends Seller>
Sinsert(S entity)
<S extends Seller>
Ssave(S entity)
org.springframework.data.domain.Page<Seller>
search(java.lang.String query, org.springframework.data.domain.Pageable page)
-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, existsById, findAllById
-
Methods inherited from interface org.springframework.data.mongodb.repository.MongoRepository
findAll, findAll, findAll, findAll, insert, saveAll
-
-
-
-
Method Detail
-
findCompanyIgnoreCase
@Query("{\'companyName\': {$regex:?0,$options:\'i\'}, \'address.id\' : ?1}") java.util.Optional<Seller> findCompanyIgnoreCase(java.lang.String companyName, java.lang.String addressId)
-
findCompanyIgnoreCase
@Query("{\'companyName\': {$regex:?0,$options:\'i\'}}") java.util.Optional<Seller> findCompanyIgnoreCase(java.lang.String companyName)
-
search
@Query("{ $or: [ { \'companyName\' : {$regex:?0,$options:\'i\'} } ] }") org.springframework.data.domain.Page<Seller> search(java.lang.String query, org.springframework.data.domain.Pageable page)
-
findByProfileId
@Query("{\'profiles.id\' : ?0}") java.util.Optional<Seller> findByProfileId(java.lang.String profileId)
-
findByAccountId
@Query("{\'accountId\': ?0 }") java.util.Optional<Seller> findByAccountId(java.lang.String accountId)
-
findBySubscription
@Query("{\'subscription\': ?0 }") java.util.Optional<Seller> findBySubscription(java.lang.String subscriptionId)
-
findByAddressId
java.util.List<Seller> findByAddressId(java.lang.String addressId)
-
findSellerAsStream
@Query("{\'id\' : ?0}") java.util.stream.Stream<Seller> findSellerAsStream(java.lang.String sellerId)
-
findAllSellerByIds
@Query("{id: { $in: ?0 } })") java.util.List<Seller> findAllSellerByIds(java.util.HashSet<java.lang.String> ids)
-
findById
java.util.Optional<Seller> findById(java.lang.String id)
- Specified by:
findById
in interfaceorg.springframework.data.repository.CrudRepository<Seller,java.lang.String>
-
insert
@CacheEvict(value="sellers", key="#p0.id") <S extends Seller> S insert(S entity)
- Specified by:
insert
in interfaceorg.springframework.data.mongodb.repository.MongoRepository<Seller,java.lang.String>
-
save
@CacheEvict(value="sellers", key="#p0.id") <S extends Seller> S save(S entity)
- Specified by:
save
in interfaceorg.springframework.data.repository.CrudRepository<Seller,java.lang.String>
-
deleteById
@CacheEvict(value="sellers", key="#p0") void deleteById(java.lang.String id)
- Specified by:
deleteById
in interfaceorg.springframework.data.repository.CrudRepository<Seller,java.lang.String>
-
-