Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/CompiledStatement.java @ 1011:aca3b46160cb
Added support for more than one db connection in datacage templating.
flys-artifacts/trunk@2457 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 02 Aug 2011 22:16:16 +0000 |
parents | b81626b10cb7 |
children | 5cb84ceee2a0 |
comparison
equal
deleted
inserted
replaced
1010:d419c9904825 | 1011:aca3b46160cb |
---|---|
120 finally { | 120 finally { |
121 result.close(); | 121 result.close(); |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 public ResultData execute(Connection connection, StackFrames frames) | 125 public ResultData execute( |
126 Connection connection, | |
127 StackFrames frames, | |
128 boolean cached | |
129 ) | |
126 throws SQLException | 130 throws SQLException |
127 { | 131 { |
132 if (!cached) { | |
133 return executeUncached(connection, frames); | |
134 } | |
135 | |
128 Cache cache = CacheFactory.getCache(DATACAGE_DB_CACHE); | 136 Cache cache = CacheFactory.getCache(DATACAGE_DB_CACHE); |
129 | 137 |
130 return cache != null | 138 return cache != null |
131 ? executeCached(cache, connection, frames) | 139 ? executeCached(cache, connection, frames) |
132 : executeUncached(connection, frames); | 140 : executeUncached(connection, frames); |