@Test public void test_find_by_id() { final BudgetDetailEntity entity = getBudgetDetailEntity(); final BudgetDetail expectedResult = entity.toDomain(); when(budgetDetailJdbcRepository.findById(any(BudgetDetailEntity.class))).thenReturn(entity); final BudgetDetail actualResult = budgetDetailRepositoryWithKafka.findById(getBudgetDetailDomin()); assertEquals(expectedResult.getAnticipatoryAmount(), actualResult.getAnticipatoryAmount()); assertEquals(expectedResult.getApprovedAmount(), actualResult.getApprovedAmount()); assertEquals(expectedResult.getBudgetAvailable(), actualResult.getBudgetAvailable()); assertEquals(expectedResult.getOriginalAmount(), actualResult.getOriginalAmount()); assertEquals(expectedResult.getPlanningPercent(), actualResult.getPlanningPercent()); }
public BudgetDetail findById(final BudgetDetail budgetDetail) { final BudgetDetailEntity entity = budgetDetailJdbcRepository .findById(new BudgetDetailEntity().toEntity(budgetDetail)); if (entity != null) return entity.toDomain(); return null; }
BudgetDetailRepository { public BudgetDetail findById(final BudgetDetail budgetDetail) { final BudgetDetailEntity entity = budgetDetailJdbcRepository .findById(new BudgetDetailEntity().toEntity(budgetDetail)); if (entity != null) return entity.toDomain(); return null; } }
BudgetDetailRepository { public BudgetDetail findById(final BudgetDetail budgetDetail) { final BudgetDetailEntity entity = budgetDetailJdbcRepository .findById(new BudgetDetailEntity().toEntity(budgetDetail)); if (entity != null) return entity.toDomain(); return null; } @Autowired  BudgetDetailRepository(final BudgetDetailJdbcRepository budgetDetailJdbcRepository,
                                  final BudgetDetailQueueRepository budgetDetailQueueRepository,
                                  @Value("${persist.through.kafka}") final String persistThroughKafka,
                                  FinancialConfigurationContractRepository financialConfigurationContractRepository,
                                  BudgetDetailESRepository budgetDetailESRepository
    ); }
BudgetDetailRepository { public BudgetDetail findById(final BudgetDetail budgetDetail) { final BudgetDetailEntity entity = budgetDetailJdbcRepository .findById(new BudgetDetailEntity().toEntity(budgetDetail)); if (entity != null) return entity.toDomain(); return null; } @Autowired  BudgetDetailRepository(final BudgetDetailJdbcRepository budgetDetailJdbcRepository,
                                  final BudgetDetailQueueRepository budgetDetailQueueRepository,
                                  @Value("${persist.through.kafka}") final String persistThroughKafka,
                                  FinancialConfigurationContractRepository financialConfigurationContractRepository,
                                  BudgetDetailESRepository budgetDetailESRepository
    ); BudgetDetail findById(final BudgetDetail budgetDetail); @Transactional List<BudgetDetail> save(final List<BudgetDetail> budgetDetails, final RequestInfo requestInfo); @Transactional List<BudgetDetail> update(final List<BudgetDetail> budgetDetails, final RequestInfo requestInfo); @Transactional List<BudgetDetail> delete(final List<BudgetDetail> budgetDetails, final RequestInfo requestInfo); @Transactional BudgetDetail save(final BudgetDetail budgetDetail); @Transactional BudgetDetail update(final BudgetDetail entity); @Transactional BudgetDetail delete(final BudgetDetail entity); Pagination<BudgetDetail> search(final BudgetDetailSearch domain); boolean uniqueCheck(String fieldName, BudgetDetail budgetDetail); }
BudgetDetailRepository { public BudgetDetail findById(final BudgetDetail budgetDetail) { final BudgetDetailEntity entity = budgetDetailJdbcRepository .findById(new BudgetDetailEntity().toEntity(budgetDetail)); if (entity != null) return entity.toDomain(); return null; } @Autowired  BudgetDetailRepository(final BudgetDetailJdbcRepository budgetDetailJdbcRepository,
                                  final BudgetDetailQueueRepository budgetDetailQueueRepository,
                                  @Value("${persist.through.kafka}") final String persistThroughKafka,
                                  FinancialConfigurationContractRepository financialConfigurationContractRepository,
                                  BudgetDetailESRepository budgetDetailESRepository
    ); BudgetDetail findById(final BudgetDetail budgetDetail); @Transactional List<BudgetDetail> save(final List<BudgetDetail> budgetDetails, final RequestInfo requestInfo); @Transactional List<BudgetDetail> update(final List<BudgetDetail> budgetDetails, final RequestInfo requestInfo); @Transactional List<BudgetDetail> delete(final List<BudgetDetail> budgetDetails, final RequestInfo requestInfo); @Transactional BudgetDetail save(final BudgetDetail budgetDetail); @Transactional BudgetDetail update(final BudgetDetail entity); @Transactional BudgetDetail delete(final BudgetDetail entity); Pagination<BudgetDetail> search(final BudgetDetailSearch domain); boolean uniqueCheck(String fieldName, BudgetDetail budgetDetail);  }