Interface SKURepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<SKU,java.lang.String>
,org.springframework.data.mongodb.repository.MongoRepository<SKU,java.lang.String>
,org.springframework.data.repository.PagingAndSortingRepository<SKU,java.lang.String>
,org.springframework.data.repository.query.QueryByExampleExecutor<SKU>
,org.springframework.data.repository.Repository<SKU,java.lang.String>
@Repository public interface SKURepository extends org.springframework.data.mongodb.repository.MongoRepository<SKU,java.lang.String>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
existsByName(java.lang.String name)
java.util.List<SKU>
findAllByProductId(java.lang.String productId)
java.util.Optional<SKU>
findById(java.lang.String id)
java.util.List<SKU>
findByIdIn(java.util.ArrayList<java.lang.String> ids)
SKU
findByName(java.lang.String name)
java.util.List<SKU>
findByProductName(java.lang.String productName)
SKU
findByTranslationsEquals(LocalizedText translation)
org.springframework.data.domain.Page<SKU>
search(java.lang.String query, org.springframework.data.domain.Pageable page)
org.springframework.data.domain.Page<SKU>
searchCaseSensitive(java.lang.String query, org.springframework.data.domain.Pageable page)
org.springframework.data.domain.Page<SKU>
searchIgnoreCase(java.lang.String query, org.springframework.data.domain.Pageable page)
org.springframework.data.domain.Page<SKU>
searchWithProductFilter(java.lang.String term, java.lang.String productId, org.springframework.data.domain.Pageable page)
-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAllById, save
-
Methods inherited from interface org.springframework.data.mongodb.repository.MongoRepository
findAll, findAll, findAll, findAll, insert, insert, saveAll
-
-
-
-
Method Detail
-
findByName
SKU findByName(java.lang.String name)
-
findByProductName
@Query("{ \'fallIntoProducts.name\' : ?0 }") java.util.List<SKU> findByProductName(java.lang.String productName)
-
findById
java.util.Optional<SKU> findById(java.lang.String id)
- Specified by:
findById
in interfaceorg.springframework.data.repository.CrudRepository<SKU,java.lang.String>
-
search
@Query("{ $text: { $search : ?0 }}") org.springframework.data.domain.Page<SKU> search(java.lang.String query, org.springframework.data.domain.Pageable page)
-
searchIgnoreCase
@Query("{ $or: [{ name : {$regex:?0,$options: \'i\'} },{ keywords : {$regex:?0,$options: \'i\'} },{ searchTerms : {$regex:?0,$options: \'i\'} } ]}") org.springframework.data.domain.Page<SKU> searchIgnoreCase(java.lang.String query, org.springframework.data.domain.Pageable page)
-
searchCaseSensitive
@Query("{ $or: [{ name : {$regex:?0} },{ keywords : {$regex:?0} },{ searchTerms : {$regex:?0} } ]}") org.springframework.data.domain.Page<SKU> searchCaseSensitive(java.lang.String query, org.springframework.data.domain.Pageable page)
-
searchWithProductFilter
@Query("{ $and : [{ \'fallIntoProducts._id\' : ?1 },{ $text: { $search : ?0 } }] }") org.springframework.data.domain.Page<SKU> searchWithProductFilter(java.lang.String term, java.lang.String productId, org.springframework.data.domain.Pageable page)
-
findByIdIn
java.util.List<SKU> findByIdIn(java.util.ArrayList<java.lang.String> ids)
-
existsByName
boolean existsByName(java.lang.String name)
-
findAllByProductId
@Query(value="{ \'fallIntoProducts._id\' : ?0}", count=true) java.util.List<SKU> findAllByProductId(java.lang.String productId)
-
findByTranslationsEquals
SKU findByTranslationsEquals(LocalizedText translation)
-
-