Interface PaymentItemRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<PaymentItemEntity,
,Long> org.springframework.data.repository.Repository<PaymentItemEntity,
Long>
@Repository
public interface PaymentItemRepository
extends org.springframework.data.repository.CrudRepository<PaymentItemEntity,Long>
This is PaymentRepository interface.
* Interface for generic CRUD operations of the payment entity.
This handles the below operations.
- Create
- Read
- Update
- Delete
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteById
(long id) To delete aPaymentItemEntity
for the given PaymentItem id.org.springframework.data.domain.Page<PaymentItemEntity>
findAll
(org.springframework.data.domain.Pageable pageRequest) To find allPaymentItemEntity
with the requested page limits.org.springframework.data.domain.Page<PaymentItemEntity>
findAll
(org.springframework.data.jpa.domain.Specification<PaymentItemEntity> specifications, org.springframework.data.domain.Pageable pageable) To find allPaymentItemEntity
with the given filter specifications and requested page limits.findAllByPayment
(PaymentEntity payment) To find allPaymentItemEntity
under the given payment.org.springframework.data.domain.Page<PaymentItemEntity>
findAllByPayment
(PaymentEntity payment, org.springframework.data.domain.Pageable pageable) To find allPaymentItemEntity
under the given payment and page limits.To findPaymentItemEntity
for the given paymentItem id.findById
(long id) save
(PaymentItemEntity paymentItem) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, saveAll
-
Method Details
-
findAll
org.springframework.data.domain.Page<PaymentItemEntity> findAll(org.springframework.data.domain.Pageable pageRequest) To find allPaymentItemEntity
with the requested page limits.- Parameters:
pageRequest
- APageable
object. This is for pagination.- Returns:
- A
Page
ofPaymentItemEntity
objects.
-
findAll
org.springframework.data.domain.Page<PaymentItemEntity> findAll(org.springframework.data.jpa.domain.Specification<PaymentItemEntity> specifications, org.springframework.data.domain.Pageable pageable) To find allPaymentItemEntity
with the given filter specifications and requested page limits.- Parameters:
specifications
- ASpecification
object for search specification.pageable
- APageable
object. This is for pagination.- Returns:
- A
Page
ofPaymentItemEntity
objects.
-
findAllByPayment
org.springframework.data.domain.Page<PaymentItemEntity> findAllByPayment(PaymentEntity payment, org.springframework.data.domain.Pageable pageable) To find allPaymentItemEntity
under the given payment and page limits.- Parameters:
payment
- APaymentEntity
object.pageable
- APageable
object. This is for pagination.- Returns:
- A
Page
ofPaymentItemEntity
objects.
-
findAllByPayment
To find allPaymentItemEntity
under the given payment.- Parameters:
payment
- APaymentEntity
object.- Returns:
- A
List
ofPaymentItemEntity
objects.
-
findAllByproviderId
To findPaymentItemEntity
for the given paymentItem id.- Parameters:
id
- A long variable. Unique Id of aPaymentItemEntity
.- Returns:
- A
Optional
ofPaymentItemEntity
object.
-
findById
@Cacheable(cacheNames="paymentItemCache", key="#p0") @Transactional(readOnly=true) Optional<PaymentItemEntity> findById(long id) - Parameters:
id
- A long variable. Unique Id of aPaymentItemEntity
.- Returns:
- A
Optional
ofPaymentItemEntity
object.
-
deleteById
@CacheEvict(cacheNames="paymentItemCache", key="#p0") void deleteById(long id) To delete aPaymentItemEntity
for the given PaymentItem id.- Parameters:
id
- A long variable. Unique Id of aPaymentItemEntity
.
-
save
@Caching(put=@CachePut(value="paymentItemCache",key="#result.id")) @Transactional PaymentItemEntity save(PaymentItemEntity paymentItem) - Specified by:
save
in interfaceorg.springframework.data.repository.CrudRepository<PaymentItemEntity,
Long>
-