Package com.skava.catalog.repository
Interface AttributeRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Attribute,
,AttributeId> org.springframework.data.repository.ListCrudRepository<Attribute,
,AttributeId> org.springframework.data.repository.ListPagingAndSortingRepository<Attribute,
,AttributeId> org.springframework.data.mongodb.repository.MongoRepository<Attribute,
,AttributeId> org.springframework.data.repository.PagingAndSortingRepository<Attribute,
,AttributeId> org.springframework.data.repository.query.QueryByExampleExecutor<Attribute>
,org.springframework.data.querydsl.QuerydslPredicateExecutor<Attribute>
,org.springframework.data.repository.Repository<Attribute,
AttributeId>
@CacheConfig(cacheNames="cache_catalog_services")
public interface AttributeRepository
extends org.springframework.data.mongodb.repository.MongoRepository<Attribute,AttributeId>, org.springframework.data.querydsl.QuerydslPredicateExecutor<Attribute>
The Interface AttributeRepository
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
deleteByAttributeId
(AttributeId attributeId) deleteByAttributeIdorg.springframework.data.domain.Page<Attribute>
findAll
(org.springframework.data.domain.Pageable pageRequest) findAllByCollectionIdAndAttributeIdIdentifier
(long collectionId, List<String> identifiers) findAttributesForModelUsageProcess
(long collectionId, String versionId, String parentModelId, Set<String> attributeIds) findAttributesForModelUsageProcessInCaseSensitive
(long collectionId, String versionId, String parentModelId, Set<String> attributeIds) default Attribute
findByAttributeByCollectionAndIdFromCache
(long collectionId, String identifier) findByAttributeByCollectionAndIdFromCachefindByAttributeId
(AttributeId attributeId) findByAttributeIdfindByAttributeIdCollectionId
(long collectionId) findByAttributeIdCollectionIdAndAttributeIdIdentifier
(long collectionId, String identifier) findByAttributeIdCollectionIdAndModelId
(long collectionId, String modelId) findByAttributeIdCollectionIdAndModelIdAndParentModelID
(long collectionId, String modelId, String parentModelId) findByAttributeIdCollectionIdAndParentModelId
(long collectionId, String parentModelId) findByAttributeIdInCaseSensitive
(AttributeId attributeId) findByAttributeIdfindByAttributeIdInCaseSensitiveQuery
(long collectionId, String versionId, String identifier) findByAttributeIddefault Attribute
saveAttribute
(Attribute attribute) saveAttributedefault Attribute
updateAttribute
(Attribute attribute) updateAttributeMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.mongodb.repository.MongoRepository
findAll, findAll, insert, insert
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
Methods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor
count, exists, findAll, findAll, findAll, findAll, findAll, findBy, findOne
-
Method Details
-
findAll
org.springframework.data.domain.Page<Attribute> findAll(org.springframework.data.domain.Pageable pageRequest) - Specified by:
findAll
in interfaceorg.springframework.data.repository.PagingAndSortingRepository<Attribute,
AttributeId>
-
findByAttributeId
@Cacheable(key="\'COL-ID_\'+#attributeId.collectionId+\'*attribute_\'+#attributeId.collectionId+\'_\'+#attributeId.identifier", unless="#result==null") default Optional<Attribute> findByAttributeId(AttributeId attributeId) findByAttributeId- Parameters:
attributeId
- attributeId- Returns:
- return attribute record
-
findByAttributeIdInCaseSensitive
@Cacheable(key="\'COL-ID_\'+#attributeId.collectionId+\'*attribute_\'+#attributeId.collectionId+\'_\'+#attributeId.identifier", unless="#result==null") default Optional<Attribute> findByAttributeIdInCaseSensitive(AttributeId attributeId) findByAttributeId- Parameters:
attributeId
- attributeId- Returns:
- return attribute record
-
findByAttributeIdInCaseSensitiveQuery
@Query("{\'_id.collection_id\': ?0, \'_id.version_id\': ?1, \'_id.identifier\': {$regex : \'^?2$\', $options: \'i\'}}") Optional<Attribute> findByAttributeIdInCaseSensitiveQuery(long collectionId, String versionId, String identifier) findByAttributeId- Parameters:
collectionId
- collectionIdversionId
- versionIdidentifier
- identifier- Returns:
- return attribute record
-
updateAttribute
@CacheEvict(key="\'COL-ID_\'+#attribute.attributeId.collectionId+\'*attribute_\'+#attribute.attributeId.collectionId+\'_\'+#attribute.attributeId.identifier",condition="#attribute!=null") @CacheEvict(key="\'COL-ID_\'+#attribute.attributeId.collectionId+\'*getAttributeMap_\'+#attribute.attributeId.collectionId",condition="#attribute!=null") default Attribute updateAttribute(Attribute attribute) updateAttribute- Parameters:
attribute
- attribute- Returns:
- return updated attribute record.
-
deleteByAttributeId
@CacheEvict(key="\'COL-ID_\'+#attributeId.collectionId+\'*attribute_\'+#attributeId.collectionId+\'_\'+#attributeId.identifier",condition="#attributeId!=null") @CacheEvict(key="\'COL-ID_\'+#attributeId.collectionId+\'*getAttributeMap_\'+#attributeId.collectionId",condition="#attribute!=null") default void deleteByAttributeId(AttributeId attributeId) deleteByAttributeId- Parameters:
attributeId
- attributeId
-
findByAttributeIdCollectionIdAndParentModelId
-
findByAttributeIdCollectionIdAndModelId
-
findByAttributeIdCollectionIdAndModelIdAndParentModelID
-
findAttributesForModelUsageProcessInCaseSensitive
@Query("{\'_id.collection_id\': ?0, \'_id.version_id\': ?1, \'data_type\': \'MODEL\', \'parent_model_id\': {$regex : \'^?2$\', $options: \'i\'}, \'model_id\': {$in: ?3}}") Iterable<Attribute> findAttributesForModelUsageProcessInCaseSensitive(long collectionId, String versionId, String parentModelId, Set<String> attributeIds) -
findAttributesForModelUsageProcess
-
findByAttributeIdCollectionIdAndAttributeIdIdentifier
-
findByAttributeByCollectionAndIdFromCache
@Cacheable(key="\'COL-ID_\'+#collectionId+\'*attribute_\'+#collectionId+\'_\'+#identifier", unless="#result==null") default Attribute findByAttributeByCollectionAndIdFromCache(long collectionId, String identifier) findByAttributeByCollectionAndIdFromCache- Parameters:
long
- collectionIdString
- identifier- Returns:
- return attribute record
-
findByAttributeIdCollectionId
-
findAllByCollectionIdAndAttributeIdIdentifier
-
saveAttribute
@Caching(evict=@CacheEvict(key="\'COL-ID_\'+#attribute.attributeId.collectionId+\'*getAttributeMap_\'+#attribute.attributeId.collectionId",condition="#attribute!=null")) default Attribute saveAttribute(Attribute attribute) saveAttribute- Parameters:
attribute
- attribute- Returns:
- return save attribute record.
-