[Schmitzm-commits] r1636 - trunk/schmitzm-core/src/main/java/de/schmitzm/geotools/postgres
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 21 12:22:24 CEST 2011
Author: alfonx
Date: 2011-07-21 12:22:23 +0200 (Thu, 21 Jul 2011)
New Revision: 1636
Modified:
trunk/schmitzm-core/src/main/java/de/schmitzm/geotools/postgres/PGUtil.java
Log:
Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/geotools/postgres/PGUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/geotools/postgres/PGUtil.java 2011-07-21 09:27:26 UTC (rev 1635)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/geotools/postgres/PGUtil.java 2011-07-21 10:22:23 UTC (rev 1636)
@@ -21,7 +21,7 @@
*
* @see http://www.postgresql.org/docs/9.1/static/sql-grant.html
*/
- enum Privileges {
+ public enum Privileges {
SELECT, INSERT, UPDATE, DELETE, REFERENCES, TEMPORARY, ALL_PRIVILEGES("ALL PRIVILEGES");
String sql;
@@ -46,7 +46,7 @@
* List der zuzuordnenden Privilegien
* @throws SQLException
*/
- public void grantPrivilegesOnTable(Connection c, String tablename, String targetRole, Privileges... privileges)
+ public static void grantPrivilegesOnTable(Connection c, String tablename, String targetRole, Privileges... privileges)
throws SQLException {
// GRANT SELECT, UPDATE, INSERT ON mytable TO admin;
String sql = "GRANT " + LangUtil.stringConcatWithSep(",", (Object[]) privileges) + " ON " + tablename + " TO "
@@ -63,7 +63,7 @@
* List der zuzuordnenden Privilegien
* @throws SQLException
*/
- public void revokePrivilegesOnTable(Connection c, String tablename, String targetRole, Privileges... privileges)
+ public static void revokePrivilegesOnTable(Connection c, String tablename, String targetRole, Privileges... privileges)
throws SQLException {
// GRANT SELECT, UPDATE, INSERT ON mytable TO admin;
String sql = "REVOKE " + LangUtil.stringConcatWithSep(",", (Object[]) privileges) + " ON " + tablename
@@ -74,7 +74,7 @@
/**
* Erstellt eine neue Rolle ohne besondere Starteigenschaften.
*/
- public void createRole(Connection c, String rolename) throws SQLException {
+ public static void createRole(Connection c, String rolename) throws SQLException {
String sql = "CREATE ROLE " + rolename;
c.createStatement().executeUpdate(sql);
}
More information about the Schmitzm-commits
mailing list