@Override public List<AutoPostingData> retrieveAllAutoPostingRules() { final AutoPostingMapper rm = new AutoPostingMapper(); String sql = "select " + rm.schema(); return this.jdbcTemplate.query(sql, rm, new Object[] {}); }
@Override public AutoPostingData retrieveAutoPostingRuleById(final long autopostingId) { try { final AutoPostingMapper rm = new AutoPostingMapper(); final String sql = "select " + rm.schema() + " and glClosure.id = ?"; final AutoPostingData autoPostingData = this.jdbcTemplate.queryForObject(sql, rm, new Object[] {autopostingId}); return autoPostingData; } catch (final EmptyResultDataAccessException e) { throw new GLClosureNotFoundException(autopostingId); } }