support readonly table

This commit is contained in:
温少
2012-03-18 04:10:49 +08:00
parent 7040e58e75
commit 1ae7fc6ca2
4 changed files with 62 additions and 12 deletions
@@ -41,6 +41,8 @@ public class WallConfig {
protected final Set<String> permitVariants = new HashSet<String>();
protected final Set<String> permitObjects = new HashSet<String>();
protected final Set<String> readOnlyTables = new HashSet<String>();
private String dir;
private boolean inited;
@@ -256,6 +258,10 @@ public class WallConfig {
return permitObjects;
}
public Set<String> getReadOnlyTables() {
return readOnlyTables;
}
public boolean isPermitObjects(String name) {
if (!objectCheck) {
return false;
@@ -269,7 +275,7 @@ public class WallConfig {
if (!schemaCheck) {
return false;
}
name = WallVisitorUtils.form(name);
return this.permitSchemas.contains(name);
}
@@ -278,7 +284,7 @@ public class WallConfig {
if (!functionCheck) {
return false;
}
name = WallVisitorUtils.form(name);
return this.permitFunctions.contains(name);
}