Interface AttributeRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Attribute,java.lang.String>
,org.springframework.data.mongodb.repository.MongoRepository<Attribute,java.lang.String>
,org.springframework.data.repository.PagingAndSortingRepository<Attribute,java.lang.String>
,org.springframework.data.repository.query.QueryByExampleExecutor<Attribute>
,org.springframework.data.repository.Repository<Attribute,java.lang.String>
@Repository public interface AttributeRepository extends org.springframework.data.mongodb.repository.MongoRepository<Attribute,java.lang.String>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<Attribute>
findActiveAttribute(java.lang.String id)
java.util.Optional<Attribute>
findActiveAttributeByType(java.lang.String id, java.lang.String type)
java.util.Optional<Attribute>
findById(java.lang.String id)
java.util.List<Attribute>
findByIdIn(java.util.ArrayList<java.lang.String> ids)
java.util.List<Attribute>
findByType(java.lang.String type)
org.springframework.data.domain.Page<Attribute>
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, deleteById, existsById, findAllById, save
-
Methods inherited from interface org.springframework.data.mongodb.repository.MongoRepository
findAll, findAll, findAll, findAll, insert, insert, saveAll
-
-
-
-
Method Detail
-
findById
java.util.Optional<Attribute> findById(java.lang.String id)
- Specified by:
findById
in interfaceorg.springframework.data.repository.CrudRepository<Attribute,java.lang.String>
-
findActiveAttribute
@Query("{ id : ?0, active : true }") java.util.Optional<Attribute> findActiveAttribute(java.lang.String id)
-
findActiveAttributeByType
@Query("{ id : ?0, type : ?1, active : true }") java.util.Optional<Attribute> findActiveAttributeByType(java.lang.String id, java.lang.String type)
-
findByType
java.util.List<Attribute> findByType(java.lang.String type)
-
search
@Query("{ $or: [{ name : {$regex:?0,$options:\'i\'}},{ keywords : {$regex:?0,$options:\'i\'}},{ searchTerms : {$regex:?0,$options:\'i\'}} ]}") org.springframework.data.domain.Page<Attribute> search(java.lang.String query, org.springframework.data.domain.Pageable page)
-
findByIdIn
java.util.List<Attribute> findByIdIn(java.util.ArrayList<java.lang.String> ids)
-
-