Interface CollectionRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Collection,Long>, org.springframework.data.jpa.repository.JpaRepository<Collection,Long>, org.springframework.data.repository.ListCrudRepository<Collection,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<Collection,Long>, org.springframework.data.repository.PagingAndSortingRepository<Collection,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Collection>, org.springframework.data.querydsl.QuerydslPredicateExecutor<Collection>, org.springframework.data.repository.Repository<Collection,Long>

public interface CollectionRepository extends org.springframework.data.jpa.repository.JpaRepository<Collection,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<Collection>
Repository class to represent the data access layer of the `collection` entity.
Author:
Infosys Equinox
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    existsByIdAndBusinessId(Long collectionId, Long businessId)
    Service definition to check collection exists by id and business id.
    boolean
    existsByNameIgnoreCaseAndBusinessId(String collectionName, Long businessId)
    This method will check and return the result of collection duplication.
    org.springframework.data.domain.Page<Collection>
    findAll(org.springframework.data.jpa.domain.Specification<Collection> specification, org.springframework.data.domain.Pageable pageRequest)
    Service definition to find all collections.
     
    findByIdAndBusinessId(Long collectionId, Long businessId)
    Service definition to find collection by id and business id.
    Service definition to find collection by business id.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    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.repository.PagingAndSortingRepository

    findAll

    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

    • findById

      @EntityGraph(attributePaths="properties") Optional<Collection> findById(Long id)
      Specified by:
      findById in interface org.springframework.data.repository.CrudRepository<Collection,Long>
    • findByIdAndBusinessId

      Optional<Collection> findByIdAndBusinessId(Long collectionId, Long businessId)
      Service definition to find collection by id and business id.
      Parameters:
      collectionId - Identifier of collection.
      businessId - Identifier of business.
      Returns:
      Collection.
    • findTopByBusinessId

      Collection findTopByBusinessId(Long businessId)
      Service definition to find collection by business id.
      Parameters:
      businessId - Identifier of business.
      Returns:
      Collection.
    • existsByIdAndBusinessId

      boolean existsByIdAndBusinessId(Long collectionId, Long businessId)
      Service definition to check collection exists by id and business id.
      Parameters:
      collectionId - Identifier of collection.
      businessId - Identifier of business.
      Returns:
      validation result.
    • findAll

      org.springframework.data.domain.Page<Collection> findAll(org.springframework.data.jpa.domain.Specification<Collection> specification, org.springframework.data.domain.Pageable pageRequest)
      Service definition to find all collections.
      Parameters:
      specification - a Specification of Collection objects.
      pageRequest - Pageable
      Returns:
      Collection
    • existsByNameIgnoreCaseAndBusinessId

      boolean existsByNameIgnoreCaseAndBusinessId(String collectionName, Long businessId)
      This method will check and return the result of collection duplication.
      Parameters:
      collectionName - a String object.
      businessId - a Long object.
      Returns:
      a Boolean object.