class ChartOfAccountDetailJdbcRepository extends JdbcRepository {

    public ChartOfAccountDetailEntity findById(ChartOfAccountDetailEntity entity) {
        List<String> list = allIdentitiferFields.get(entity.getClass().getSimpleName());

        Map<String, Object> paramValues = new HashMap<>();

        for (String s : list) {
            paramValues.put(s, getValue(getField(entity, s), entity));
        }

        List<ChartOfAccountDetailEntity> chartofaccountdetails = namedParameterJdbcTemplate.query(
                getByIdQuery.get(entity.getClass().getSimpleName()).toString(), paramValues,
                new BeanPropertyRowMapper(ChartOfAccountDetailEntity.class));
        if (chartofaccountdetails.isEmpty()) {
            return null;
        } else {
            return chartofaccountdetails.get(0);
        }

    }

    public  ChartOfAccountDetailJdbcRepository(NamedParameterJdbcTemplate namedParameterJdbcTemplate,
            AccountDetailTypeJdbcRepository accountDetailTypeJdbcRepository);

}