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 Summary
Modifier and TypeMethodDescriptionboolean
existsByBusinessIdAndNameIgnoreCase
(long businessId, String name) existByBusinessIdAndNameIgnoreCaseboolean
existsByBusinessIdAndNameIgnoreCaseAndIdNot
(long businessId, String name, long id) existByBusinessIdAndNameIgnoreCaseAndIdNotfindByIdAndBusinessId
(long id, long businessId) findByIdAndBusinessIdfindByIdAndStatus
(long id, CollectionStatus status) method findByIdAndStatusMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
Methods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor
count, exists, findAll, findAll, findAll, findAll, findAll, findBy, findOne
-
Method Details
-
findByIdAndStatus
method findByIdAndStatus
Find by collection identifier and status
- Parameters:
id
- The collection identifierstatus
- The collection status- Returns:
- The collection entity model with all collection properties
-
findByIdAndBusinessId
findByIdAndBusinessId
Find by collection identifier and business identifier
- Parameters:
id
- The collection identifierbusinessId
- 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 identifiername
- 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 identifiername
- name of the collectionid
- id of the collection- Returns:
- true is collection exists false if it doesn't.
-