Package com.skava.catalog.repository
Interface ModelRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Model,
,ModelId> org.springframework.data.repository.ListCrudRepository<Model,
,ModelId> org.springframework.data.repository.ListPagingAndSortingRepository<Model,
,ModelId> org.springframework.data.mongodb.repository.MongoRepository<Model,
,ModelId> org.springframework.data.repository.PagingAndSortingRepository<Model,
,ModelId> org.springframework.data.repository.query.QueryByExampleExecutor<Model>
,org.springframework.data.querydsl.QuerydslPredicateExecutor<Model>
,org.springframework.data.repository.Repository<Model,
ModelId>
@CacheConfig(cacheNames="cache_catalog_services")
public interface ModelRepository
extends org.springframework.data.mongodb.repository.MongoRepository<Model,ModelId>, org.springframework.data.querydsl.QuerydslPredicateExecutor<Model>
The Interface ModelRepository
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
deleteByModelId
(ModelId modelId) org.springframework.data.domain.Page<Model>
findAll
(org.springframework.data.domain.Pageable pageRequest) findByModelId
(ModelId modelId) Retrieves Model based on modelIdfindByModelIdInCaseSensitive
(ModelId modelId, boolean mongoRegexCheckEnabled) Retrieves catalog based on catalog idfindByModelIdInCaseSensitiveQuery
(long collectionId, String identifier) Retrieves catalog based on catalog idfindByModelIdQuery
(long collectionId, String identifier) Retrieves catalog based on catalog idfindTemplateModelByCollectionId
(long collectionId, int page, int size) Retrieves Model based on Collection id and type templateMethods 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<Model> findAll(org.springframework.data.domain.Pageable pageRequest) -
deleteByModelId
-
findByModelId
Retrieves Model based on modelId- Parameters:
modelId
- catalog identifier- Returns:
- return catalog record.
-
findByModelIdInCaseSensitive
default Optional<Model> findByModelIdInCaseSensitive(ModelId modelId, boolean mongoRegexCheckEnabled) Retrieves catalog based on catalog id- Parameters:
modelId
- catalog identifiermongoRegexCheckEnabled
-- Returns:
- return catalog record.
-
findByModelIdInCaseSensitiveQuery
@Query("{\'_id.collection_id\': ?0, \'_id.identifier\': {$regex : \'^?1$\', $options: \'i\'}}") Optional<Model> findByModelIdInCaseSensitiveQuery(long collectionId, String identifier) Retrieves catalog based on catalog id- Parameters:
collectionId
- collectionIdidentifier
- identifier- Returns:
- return catalog record.
-
findByModelIdQuery
@Query("{\'_id.collection_id\': ?0, \'_id.identifier\': ?1}") Optional<Model> findByModelIdQuery(long collectionId, String identifier) Retrieves catalog based on catalog id- Parameters:
collectionId
- collectionIdidentifier
- identifier- Returns:
- return catalog record.
-
findTemplateModelByCollectionId
Retrieves Model based on Collection id and type template- Parameters:
collectionId
- collectionIdpage
- it contains number of pages to be loadsize
- it contains pages limit- Returns:
- return List of Model record.
-