@Test public void test_find_by_id() { final BudgetReAppropriationEntity entity = getBudgetReAppropriationEntity(); final BudgetReAppropriation expectedResult = entity.toDomain(); when(budgetReAppropriationJdbcRepository.findById(any(BudgetReAppropriationEntity.class))).thenReturn(entity); final BudgetReAppropriation actualResult = budgetReAppropriationRepositoryWithKafka .findById(getBudgetReAppropriationDomin()); assertEquals(expectedResult.getAnticipatoryAmount(), actualResult.getAnticipatoryAmount()); assertEquals(expectedResult.getAdditionAmount(), actualResult.getAdditionAmount()); assertEquals(expectedResult.getDeductionAmount(), actualResult.getDeductionAmount()); assertEquals(expectedResult.getOriginalAdditionAmount(), actualResult.getOriginalAdditionAmount()); assertEquals(expectedResult.getOriginalDeductionAmount(), actualResult.getOriginalDeductionAmount()); }
public BudgetReAppropriation findById(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationEntity entity = budgetReAppropriationJdbcRepository .findById(new BudgetReAppropriationEntity().toEntity(budgetReAppropriation)); if (entity != null) return entity.toDomain(); return null; }
BudgetReAppropriationRepository { public BudgetReAppropriation findById(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationEntity entity = budgetReAppropriationJdbcRepository .findById(new BudgetReAppropriationEntity().toEntity(budgetReAppropriation)); if (entity != null) return entity.toDomain(); return null; } }
BudgetReAppropriationRepository { public BudgetReAppropriation findById(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationEntity entity = budgetReAppropriationJdbcRepository .findById(new BudgetReAppropriationEntity().toEntity(budgetReAppropriation)); if (entity != null) return entity.toDomain(); return null; } @Autowired  BudgetReAppropriationRepository(final BudgetReAppropriationJdbcRepository budgetReAppropriationJdbcRepository,
                                           final BudgetReAppropriationQueueRepository budgetReAppropriationQueueRepository,
                                           @Value("${persist.through.kafka}") final String persistThroughKafka,
                                           FinancialConfigurationContractRepository financialConfigurationContractRepository,
                                           BudgetReAppropriationESRepository budgetReAppropriationESRepository
    ); }
BudgetReAppropriationRepository { public BudgetReAppropriation findById(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationEntity entity = budgetReAppropriationJdbcRepository .findById(new BudgetReAppropriationEntity().toEntity(budgetReAppropriation)); if (entity != null) return entity.toDomain(); return null; } @Autowired  BudgetReAppropriationRepository(final BudgetReAppropriationJdbcRepository budgetReAppropriationJdbcRepository,
                                           final BudgetReAppropriationQueueRepository budgetReAppropriationQueueRepository,
                                           @Value("${persist.through.kafka}") final String persistThroughKafka,
                                           FinancialConfigurationContractRepository financialConfigurationContractRepository,
                                           BudgetReAppropriationESRepository budgetReAppropriationESRepository
    ); BudgetReAppropriation findById(final BudgetReAppropriation budgetReAppropriation); @Transactional List<BudgetReAppropriation> save(final List<BudgetReAppropriation> budgetReAppropriations,
                                            final RequestInfo requestInfo); @Transactional List<BudgetReAppropriation> update(final List<BudgetReAppropriation> budgetReAppropriations,
                                              final RequestInfo requestInfo); @Transactional List<BudgetReAppropriation> delete(final List<BudgetReAppropriation> budgetReAppropriations,
                                              final RequestInfo requestInfo); @Transactional BudgetReAppropriation save(final BudgetReAppropriation budgetReAppropriation); @Transactional BudgetReAppropriation update(final BudgetReAppropriation entity); @Transactional BudgetReAppropriation delete(final BudgetReAppropriation entity); Pagination<BudgetReAppropriation> search(final BudgetReAppropriationSearch domain); boolean uniqueCheck(String fieldName, BudgetReAppropriation budgetReAppropriation); }
BudgetReAppropriationRepository { public BudgetReAppropriation findById(final BudgetReAppropriation budgetReAppropriation) { final BudgetReAppropriationEntity entity = budgetReAppropriationJdbcRepository .findById(new BudgetReAppropriationEntity().toEntity(budgetReAppropriation)); if (entity != null) return entity.toDomain(); return null; } @Autowired  BudgetReAppropriationRepository(final BudgetReAppropriationJdbcRepository budgetReAppropriationJdbcRepository,
                                           final BudgetReAppropriationQueueRepository budgetReAppropriationQueueRepository,
                                           @Value("${persist.through.kafka}") final String persistThroughKafka,
                                           FinancialConfigurationContractRepository financialConfigurationContractRepository,
                                           BudgetReAppropriationESRepository budgetReAppropriationESRepository
    ); BudgetReAppropriation findById(final BudgetReAppropriation budgetReAppropriation); @Transactional List<BudgetReAppropriation> save(final List<BudgetReAppropriation> budgetReAppropriations,
                                            final RequestInfo requestInfo); @Transactional List<BudgetReAppropriation> update(final List<BudgetReAppropriation> budgetReAppropriations,
                                              final RequestInfo requestInfo); @Transactional List<BudgetReAppropriation> delete(final List<BudgetReAppropriation> budgetReAppropriations,
                                              final RequestInfo requestInfo); @Transactional BudgetReAppropriation save(final BudgetReAppropriation budgetReAppropriation); @Transactional BudgetReAppropriation update(final BudgetReAppropriation entity); @Transactional BudgetReAppropriation delete(final BudgetReAppropriation entity); Pagination<BudgetReAppropriation> search(final BudgetReAppropriationSearch domain); boolean uniqueCheck(String fieldName, BudgetReAppropriation budgetReAppropriation);  }