263264265266267268269270271272
// Commit sqlConn.commit(); } catch (SQLException sqlEX) { rollback(sqlConn); throw new FeatureAccessException("Cannot update features database, SQL ERROR", sqlEX); } finally { closeStatement(ps); } }
281282283284285286287288
try { if (!sqlConn.isClosed()) { sqlConn.rollback(); } } catch (SQLException e) { throw new FeatureAccessException("Cannot rollback database, SQL ERROR", e); } }
361362363364365366367368369370371
mapFP.get(uid).getPermissions().add(rs.getString(COL_ROLE_ROLENAME)); } return mapFP; } catch (SQLException sqlEX) { throw new FeatureAccessException("Cannot check feature existence, error related to database", sqlEX); } finally { closeResultSet(rs); closeStatement(ps); } }
386387388389390391392393394395396
setOFGroup.add(groupName); } } return setOFGroup; } catch (SQLException sqlEX) { throw new FeatureAccessException("Cannot list groups, error related to database", sqlEX); } finally { closeResultSet(rs); closeStatement(ps); } }
444445446447448449450451452453454
if (rs.next()) { return (rs.getInt(1) > 0); } return false; } catch (SQLException sqlEX) { throw new FeatureAccessException("Cannot check feature existence, error related to database", sqlEX); } finally { closeResultSet(rs); closeStatement(ps); } }
508509510511512513514515516517518
} } return mapFP; } catch (SQLException sqlEX) { throw new FeatureAccessException("Cannot check feature existence, error related to database", sqlEX); } finally { closeResultSet(rs); closeStatement(ps); } }
624625626627628629630631632633
PreparedStatement ps = null; try { ps = buildStatement(query, params); ps.executeUpdate(); } catch (SQLException sqlEX) { throw new FeatureAccessException("Cannot update features database, SQL ERROR", sqlEX); } finally { closeStatement(ps); } }
642643644645646647648649
try { if (rs != null) { rs.close(); } } catch (SQLException e) { throw new FeatureAccessException("An error occur when closing resultset", e); } }
661662663664665666667668
ps.getConnection().close(); } ps.close(); } } catch (SQLException e) { throw new FeatureAccessException("An error occur when closing statement", e); } }