@Override public Collection<OozieSensitivityEntity> listOozieSensitivities() { return listEntities( OOZIE_QUERY_ALL_STATEMENT, rs -> { try { OozieSensitivityEntity entity = new OozieSensitivityEntity(); entity.setJobId(rs.getString(1)); entity.setName(rs.getString(2)); entity.setSensitivityType(rs.getString(3)); return entity; } catch (Exception ex) { throw new IllegalStateException(ex); } }); }
@Override public OpResult addOozieSensitivity(Collection<OozieSensitivityEntity> h) { return addEntities( OOZIE_INSERT_STATEMENT, h, (entity, statement) -> { OozieSensitivityEntity e = (OozieSensitivityEntity) entity; try { statement.setString(1, e.getJobId()); statement.setString(2, e.getName()); statement.setString(3, e.getSensitivityType()); } catch (Exception ex) { throw new IllegalStateException(ex); } return statement; }); }