public void deleteRightCriteriumImpl(Connection con, int id) throws SQLException { StringTemplate template = SecurityDatabaseUtils.stGroup().getInstanceOf("deleteRightCriterium"); JDBCUpdateTemplate jdbcTemplate = new JDBCUpdateTemplate(con, false); String sql = template.toString(); LOGGER.fine(sql); jdbcTemplate.executeUpdate(sql, id); }
public void updateRightCriteriumImpl(Connection con, RightCriteriumWrapper criteriumWrapper) throws SQLException { StringTemplate template = SecurityDatabaseUtils.stGroup().getInstanceOf("updateRightCriterium"); template.setAttribute("criteriumWrapper", criteriumWrapper); JDBCUpdateTemplate jdbcTemplate = new JDBCUpdateTemplate(con, false); String sql = template.toString(); LOGGER.fine(sql); jdbcTemplate.executeUpdate(sql); }
@InitSecurityDatabase public int insertRightCriteriumParamsImpl(Connection con, RightCriteriumParams criteriumParams) throws SQLException { StringTemplate template = SecurityDatabaseUtils.stGroup().getInstanceOf("insertRightCriteriumParams"); template.setAttribute("params", criteriumParams); JDBCUpdateTemplate jdbcTemplate = new JDBCUpdateTemplate(con, false); String sql = template.toString(); LOGGER.fine(sql); return jdbcTemplate.executeUpdate(sql); }
@InitSecurityDatabase public int insertRightCriteriumImpl(Connection con, RightCriteriumWrapper criterium) throws SQLException { StringTemplate template = SecurityDatabaseUtils.stGroup().getInstanceOf("insertRightCriterium"); template.setAttribute("criteriumWrapper", criterium); template.setAttribute("type", criterium.getCriteriumType().getVal()); JDBCUpdateTemplate jdbcTemplate = new JDBCUpdateTemplate(con, false); String sql = template.toString(); LOGGER.fine(sql); return jdbcTemplate.executeUpdate(sql); }
@InitSecurityDatabase public int insertRightImpl(Connection con, Right right) throws SQLException { StringTemplate template = SecurityDatabaseUtils.stGroup().getInstanceOf("insertRight"); template.setAttribute("association", right.getUser() instanceof Role ? "group_id" : "user_id"); template.setAttribute("right", right); template.setAttribute( "priority", right.getFixedPriority() == 0 ? "NULL" : "" + right.getFixedPriority()); JDBCUpdateTemplate jdbcTemplate = new JDBCUpdateTemplate(con, false); String sql = template.toString(); LOGGER.fine(sql); return jdbcTemplate.executeUpdate(sql); }