Package com.skava.accounts.repository
Interface ContractsRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ContractsEntity,
,Long> org.springframework.data.jpa.repository.JpaRepository<ContractsEntity,
,Long> org.springframework.data.repository.ListCrudRepository<ContractsEntity,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<ContractsEntity,
,Long> org.springframework.data.repository.PagingAndSortingRepository<ContractsEntity,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<ContractsEntity>
,org.springframework.data.querydsl.QuerydslPredicateExecutor<ContractsEntity>
,org.springframework.data.repository.Repository<ContractsEntity,
Long>
public interface ContractsRepository
extends org.springframework.data.jpa.repository.JpaRepository<ContractsEntity,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<ContractsEntity>
The Interface ContractsRepository extends another JpaRepository which contains all default crud operations.
ContractsRepository contains customized methods definitions for the operations in Contracts entity.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionlong
count
(com.querydsl.core.types.Predicate predicates) boolean
existsByIdAndAccountId
(long id, long accountId) org.springframework.data.domain.Page<ContractsEntity>
findAll
(org.springframework.data.jpa.domain.Specification<ContractsEntity> specification, org.springframework.data.domain.Pageable pageRequest) Find all ContractsEntity based on inputs.org.springframework.data.domain.Page<ContractsEntity>
findAllByAccountId
(long accountId, org.springframework.data.domain.Pageable pageRequest) Find all ContractsEntity by account id.findAllByAccountIdAndStartTimeLessThanEqualAndEndTimeGreaterThanEqual
(long accountId, long endTime, long startTime) findByIdAndAccountId
(long id, long accountId) To check if a Contract Exists By the given id and accountId.findByPaymentTermId
(long paymentTermId) This function is used to load all the contracts associated with the given paymentTermId.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.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
exists, findAll, findAll, findAll, findAll, findAll, findBy, findOne
-
Method Details
-
findAll
org.springframework.data.domain.Page<ContractsEntity> findAll(org.springframework.data.jpa.domain.Specification<ContractsEntity> specification, org.springframework.data.domain.Pageable pageRequest) Find all ContractsEntity based on inputs.- Parameters:
specification
- contains all search criteria like accountId=1, teamId=2pageRequest
- contains pageable information like page, size- Returns:
- the list of ContractsEntity
-
findByIdAndAccountId
To check if a Contract Exists By the given id and accountId.- Parameters:
id
- the unique identifier of the collectionaccountId
- It refers to the id of the account which is a unique identifier. An account should exists for the given account id, and also the account should be associated with the given Contract id.- Returns:
- the ContractsEntity
-
findAllByAccountId
org.springframework.data.domain.Page<ContractsEntity> findAllByAccountId(long accountId, org.springframework.data.domain.Pageable pageRequest) Find all ContractsEntity by account id.- Parameters:
accountId
- It refers to the id of the account which is a unique identifier. An account should exists for the given account id, and also the account should be associated with the given Contract id.pageRequest
- contains pageable information like page, size- Returns:
- the list
-
existsByIdAndAccountId
boolean existsByIdAndAccountId(long id, long accountId) - Parameters:
id
- unique identifier of ContractsEntityaccountId
- It refers to the id of the account which is a unique identifier. An account should exists for the given account id, and also the account should be associated with the given Contract id.- Returns:
- true, if successful
-
findByPaymentTermId
This function is used to load all the contracts associated with the given paymentTermId.- Parameters:
paymentTermId
- It refers to the unique identifier of a payment term- Returns:
- a list of object of type ContractsEntity
-
findAllByAccountIdAndStartTimeLessThanEqualAndEndTimeGreaterThanEqual
List<ContractsEntity> findAllByAccountIdAndStartTimeLessThanEqualAndEndTimeGreaterThanEqual(long accountId, long endTime, long startTime) - Parameters:
accountId
- the accountIdendTime
- the endTimestartTime
- the startTime- Returns:
- list of
ContractsEntity
-
count
long count(com.querydsl.core.types.Predicate predicates) - Specified by:
count
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<ContractsEntity>
-