comparison flys-aft/src/main/java/de/intevation/db/Statements.java @ 4074:100c4e0a45e1

Improved infrastructure for prepared statements. flys-aft/trunk@3407 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 13 Dec 2011 14:32:55 +0000
parents 2c70fae83d0c
children 79bb64f66c74
comparison
equal deleted inserted replaced
4073:2c70fae83d0c 4074:100c4e0a45e1
27 this.type = type; 27 this.type = type;
28 this.driver = driver; 28 this.driver = driver;
29 } 29 }
30 30
31 public SymbolicStatement getStatement(String key) { 31 public SymbolicStatement getStatement(String key) {
32 return getStatements().get(key);
33 }
34
35 public Map<String, SymbolicStatement> getStatements() {
32 if (statements == null) { 36 if (statements == null) {
33 statements = loadStatements(); 37 statements = loadStatements();
34 } 38 }
35 return statements.get(key); 39 return statements;
36 } 40 }
37 41
38 protected Map<String, SymbolicStatement> loadStatements() { 42 protected Map<String, SymbolicStatement> loadStatements() {
39 Map<String, SymbolicStatement> statements = 43 Map<String, SymbolicStatement> statements =
40 new HashMap<String, SymbolicStatement>(); 44 new HashMap<String, SymbolicStatement>();

http://dive4elements.wald.intevation.org