Interface CollectionRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<CollectionEntity,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<CollectionEntity>, org.springframework.data.repository.Repository<CollectionEntity,Long>

@Repository public interface CollectionRepository extends org.springframework.data.repository.CrudRepository<CollectionEntity,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<CollectionEntity>

CollectionRepository

Handles CRUD operations of Collection entity

Author:
Infosys Equinox
  • Method Details

    • findByIdAndStatus

      Optional<CollectionEntity> findByIdAndStatus(long id, CollectionStatus status)

      method findByIdAndStatus

      Find by collection identifier and status

      Parameters:
      id - The collection identifier
      status - The collection status
      Returns:
      The collection entity model with all collection properties
    • findByIdAndBusinessId

      Optional<CollectionEntity> findByIdAndBusinessId(long id, long businessId)

      findByIdAndBusinessId

      Find by collection identifier and business identifier

      Parameters:
      id - The collection identifier
      businessId - The business identifier
      Returns:
      The collection entity model with all collection properties
    • existsByBusinessIdAndNameIgnoreCase

      boolean existsByBusinessIdAndNameIgnoreCase(@Param("businessId") long businessId, @Param("name") String name)

      existByBusinessIdAndNameIgnoreCase

      Retrieves Collection records by BusinessId and Name

      Parameters:
      businessId - to business identifier
      name - name of the collection
      Returns:
      true is collection exists false if it doesn't.
    • existsByBusinessIdAndNameIgnoreCaseAndIdNot

      boolean existsByBusinessIdAndNameIgnoreCaseAndIdNot(@Param("businessId") long businessId, @Param("name") String name, @Param("id") long id)

      existByBusinessIdAndNameIgnoreCaseAndIdNot

      Retrieves Collection records by BusinessId and Name

      Parameters:
      businessId - to business identifier
      name - name of the collection
      id - id of the collection
      Returns:
      true is collection exists false if it doesn't.