コード例 #1
0
  @Override
  public List<AutoPostingData> retrieveAllAutoPostingRules() {
    final AutoPostingMapper rm = new AutoPostingMapper();

    String sql = "select " + rm.schema();
    return this.jdbcTemplate.query(sql, rm, new Object[] {});
  }
コード例 #2
0
  @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);
    }
  }