Package com.skava.accounts.repository
Interface PropertiesRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<PropertiesEntity,
,Long> org.springframework.data.repository.Repository<PropertiesEntity,
Long>
public interface PropertiesRepository
extends org.springframework.data.repository.CrudRepository<PropertiesEntity,Long>
The Interface PropertiesRepository extends another CrudRepository which contains all default crud operations.
PropertiesRepository contains customized methods definitions for the operations in Properties entity.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteByCollectionId
(Long collectionId) Delete PropertiesEntity by collection id.org.springframework.data.domain.Page<PropertiesEntity>
findAll
(org.springframework.data.domain.Pageable pageRequest) Find PropertiesEntities based on inputs.org.springframework.data.domain.Page<PropertiesEntity>
findAllByCollectionId
(org.springframework.data.domain.Pageable pageRequest, Long collectionId) Find all by collection id.findByAttributeIdAndCollectionId
(Long attributeId, Long collectionId) Find by name and collection id.findByAttributeNameAndCollectionId
(String name, Long collectionId) findByAttributeNameAndCollectionId - Loads the collection property by attribute name and collection id.findByIdAndCollectionId
(Long id, Long collectionId) Find by id and collection id.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findAll
org.springframework.data.domain.Page<PropertiesEntity> findAll(org.springframework.data.domain.Pageable pageRequest) Find PropertiesEntities based on inputs.- Parameters:
pageRequest
- contains pageable information like page, size- Returns:
- the list of PropertiesEntity
-
findAllByCollectionId
org.springframework.data.domain.Page<PropertiesEntity> findAllByCollectionId(org.springframework.data.domain.Pageable pageRequest, Long collectionId) Find all by collection id.- Parameters:
pageRequest
- contains pageable information like page, sizecollectionId
- It refers to the id of the collection which is a unique identifier. An collection should exists for the given collection id, and also the collection should be associated with the given PaymentTerm id.- Returns:
- the list of PropertiesEntity
-
findByAttributeIdAndCollectionId
@Cacheable(cacheNames="accountattributeidandcollection", key="\'COL-ID_\'+#p1+\'*findByAttributeIdAndCollectionId_\'+#p0", unless="#result == null") PropertiesEntity findByAttributeIdAndCollectionId(Long attributeId, Long collectionId) Find by name and collection id.- Parameters:
attributeId
- the attribute idcollectionId
- It refers to the id of the collection which is a unique identifier. An collection should exists for the given collection id, and also the collection should be associated with the given PaymentTerm id.- Returns:
- the properties
-
findByIdAndCollectionId
Find by id and collection id.- Parameters:
id
- the unique identifier of PropertiescollectionId
- It refers to the id of the collection which is a unique identifier. An collection should exists for the given collection id, and also the collection should be associated with the given PaymentTerm id.- Returns:
- the properties
-
deleteByCollectionId
Delete PropertiesEntity by collection id.- Parameters:
collectionId
- It refers to the id of the collection which is a unique identifier. An collection should exists for the given collection id, and also the collection should be associated with the given Property id.
-
findByAttributeNameAndCollectionId
@Cacheable(cacheNames="accountattributenameandcollection", key="\'COL-ID_\'+#p1+\'*findByAttributeNameAndCollectionId_\'+#p0", unless="#result == null") PropertiesEntity findByAttributeNameAndCollectionId(String name, Long collectionId) findByAttributeNameAndCollectionId - Loads the collection property by attribute name and collection id.- Parameters:
name
- Indicates the collection property name which is used for loading the property from DB.collectionId
- Indicates the collection id for which collection the property gets loaded from DB.- Returns:
- Instance of
PropertiesEntity
object
-