Interface BasketInvoicesRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<BasketInvoiceEntity,,Long> DomainIdRepository<BasketInvoiceEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<BasketInvoiceEntity,,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<BasketInvoiceEntity>,org.springframework.data.repository.ListCrudRepository<BasketInvoiceEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<BasketInvoiceEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<BasketInvoiceEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<BasketInvoiceEntity>,org.springframework.data.repository.Repository<BasketInvoiceEntity,Long>
@Repository
public interface BasketInvoicesRepository
extends DomainIdRepository<BasketInvoiceEntity,Long>
Provides domain-scoped persistence and statistical queries for basket invoices.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T extends Object> -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<BasketInvoiceEntity>findAllByLoggedUserIdAndDomainId(Integer loggedUserId, Integer domainId, org.springframework.data.domain.Pageable pageable) findAllByLoggedUserIdAndDomainIdOrderByCreateDateDesc(Integer loggedUserId, Integer domainId) findAllForStatistics(Integer domainId, Date dateFrom, Date dateTo, boolean filterByStatus, List<Integer> statusIds) Finds invoice values for the selected reporting interval and optional statuses.getStatusId(Long id, Integer domainId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface sk.iway.iwcm.system.datatable.spring.DomainIdRepository
findAllByDomainId, findAllByDomainId, findAllByIdInAndDomainId, findFirstByIdAndDomainIdMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, count, delete, delete, exists, exists, findAll, findAll, findAll, findAll, findAll, findBy, findBy, findOne, findOne, updateMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findAllByLoggedUserIdAndDomainId
org.springframework.data.domain.Page<BasketInvoiceEntity> findAllByLoggedUserIdAndDomainId(Integer loggedUserId, Integer domainId, org.springframework.data.domain.Pageable pageable) -
findAllByLoggedUserIdAndDomainIdOrderByCreateDateDesc
List<BasketInvoiceEntity> findAllByLoggedUserIdAndDomainIdOrderByCreateDateDesc(Integer loggedUserId, Integer domainId) -
getStatusId
-
findAllForStatistics
@Query("SELECT bie.createDate AS createDate,\n bie.statusId AS statusId,\n bie.deliveryMethod AS deliveryMethod,\n bie.paymentMethod AS paymentMethod,\n bie.priceToPayVat AS priceToPayVat,\n bie.priceToPayNoVat AS priceToPayNoVat,\n bie.currency AS currency\nFROM BasketInvoiceEntity bie\nWHERE bie.domainId = :domainId\n AND bie.createDate >= :dateFrom\n AND bie.createDate <= :dateTo\n AND (:filterByStatus = false OR bie.statusId IN :statusIds)\nORDER BY bie.createDate ASC\n") List<BasketInvoiceStatsProjection> findAllForStatistics(@Param("domainId") Integer domainId, @Param("dateFrom") Date dateFrom, @Param("dateTo") Date dateTo, @Param("filterByStatus") boolean filterByStatus, @Param("statusIds") List<Integer> statusIds) Finds invoice values for the selected reporting interval and optional statuses.- Parameters:
domainId- domain whose invoices are includeddateFrom- inclusive start of the reporting intervaldateTo- inclusive end of the reporting intervalfilterByStatus- whether to restrict invoices tostatusIdsstatusIds- invoice statuses included when filtering is enabled- Returns:
- matching invoices ordered by creation date
-