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 Type
    Method
    Description
    default void
     
    org.springframework.data.domain.Page<Model>
    findAll(org.springframework.data.domain.Pageable pageRequest)
     
    default Optional<Model>
    Retrieves Model based on modelId
    default Optional<Model>
    findByModelIdInCaseSensitive(ModelId modelId, boolean mongoRegexCheckEnabled)
    Retrieves catalog based on catalog id
    findByModelIdInCaseSensitiveQuery(long collectionId, String identifier)
    Retrieves catalog based on catalog id
    findByModelIdQuery(long collectionId, String identifier)
    Retrieves catalog based on catalog id
    default List<Model>
    findTemplateModelByCollectionId(long collectionId, int page, int size)
    Retrieves Model based on Collection id and type template

    Methods 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)
      Specified by:
      findAll in interface org.springframework.data.repository.PagingAndSortingRepository<Model,ModelId>
    • deleteByModelId

      default void deleteByModelId(ModelId modelId)
    • findByModelId

      default Optional<Model> findByModelId(ModelId modelId)
      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 identifier
      mongoRegexCheckEnabled -
      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 - collectionId
      identifier - 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 - collectionId
      identifier - identifier
      Returns:
      return catalog record.
    • findTemplateModelByCollectionId

      default List<Model> findTemplateModelByCollectionId(long collectionId, int page, int size)
      Retrieves Model based on Collection id and type template
      Parameters:
      collectionId - collectionId
      page - it contains number of pages to be load
      size - it contains pages limit
      Returns:
      return List of Model record.