Revision 59400
Added by Dimitris Pierrakos over 3 years ago
UsageStatsRepository.java | ||
---|---|---|
109 | 109 |
jedis.put("test", "fetchMode", "3"); |
110 | 110 |
} catch (Exception e) { |
111 | 111 |
System.out.println(e); |
112 |
}finally { |
|
113 |
DbUtils.closeQuietly(rs); |
|
114 |
DbUtils.closeQuietly(st); |
|
115 |
DbUtils.closeQuietly(connection); |
|
112 | 116 |
} |
113 | 117 |
|
114 | 118 |
return montlhyList; |
115 | 119 |
} |
120 |
|
|
116 | 121 |
public TotalStatsReposViewsDownloads executeTotalStatsReposViewsDownloads(String query) { |
117 | 122 |
TotalStatsReposViewsDownloads totalStatsReposViewsDownlads = new TotalStatsReposViewsDownloads(); |
118 | 123 |
|
... | ... | |
146 | 151 |
jedis.put(redis_key, "fetchMode", "3"); |
147 | 152 |
} catch (Exception e) { |
148 | 153 |
System.out.println(e); |
154 |
}finally { |
|
155 |
DbUtils.closeQuietly(rs); |
|
156 |
DbUtils.closeQuietly(st); |
|
157 |
DbUtils.closeQuietly(connection); |
|
149 | 158 |
} |
150 | 159 |
|
151 | 160 |
return totalStatsReposViewsDownlads; |
152 | 161 |
} |
162 |
|
|
153 | 163 |
public CountryUsageStatsAll executeCountryUsageStats(String query) { |
154 | 164 |
CountryUsageStatsAll countryListAll = new CountryUsageStatsAll(); |
155 | 165 |
|
... | ... | |
199 | 209 |
jedis.put(redis_key, "fetchMode", "3"); |
200 | 210 |
} catch (Exception e) { |
201 | 211 |
System.out.println(e); |
212 |
} finally { |
|
213 |
DbUtils.closeQuietly(rs); |
|
214 |
DbUtils.closeQuietly(st); |
|
215 |
DbUtils.closeQuietly(connection); |
|
202 | 216 |
} |
203 |
|
|
204 | 217 |
return countryListAll; |
205 | 218 |
} |
219 |
|
|
206 | 220 |
public CountryUsageStats executeCountryUsageStats(String query, String country) { |
207 | 221 |
CountryUsageStats countryUsageStats = new CountryUsageStats(); |
208 | 222 |
|
... | ... | |
242 | 256 |
jedis.put(redis_key, "fetchMode", "3"); |
243 | 257 |
} catch (Exception e) { |
244 | 258 |
System.out.println(e); |
259 |
} finally { |
|
260 |
DbUtils.closeQuietly(rs); |
|
261 |
DbUtils.closeQuietly(st); |
|
262 |
DbUtils.closeQuietly(connection); |
|
245 | 263 |
} |
246 |
|
|
247 | 264 |
return countryUsageStats; |
248 |
}
|
|
265 |
} |
|
249 | 266 |
|
250 | 267 |
public List<CountryRepositories> executeCountryRepositories(String query) { |
251 | 268 |
|
... | ... | |
281 | 298 |
jedis.put(redis_key, "fetchMode", "3"); |
282 | 299 |
} catch (Exception e) { |
283 | 300 |
System.out.println(e); |
301 |
} finally { |
|
302 |
DbUtils.closeQuietly(rs); |
|
303 |
DbUtils.closeQuietly(st); |
|
304 |
DbUtils.closeQuietly(connection); |
|
284 | 305 |
} |
285 | 306 |
|
286 | 307 |
return countryReposList; |
... | ... | |
318 | 339 |
jedis.put(redis_key, "fetchMode", "3"); |
319 | 340 |
} catch (Exception e) { |
320 | 341 |
System.out.println(e); |
342 |
} finally { |
|
343 |
DbUtils.closeQuietly(rs); |
|
344 |
DbUtils.closeQuietly(st); |
|
345 |
DbUtils.closeQuietly(connection); |
|
321 | 346 |
} |
322 | 347 |
|
323 | 348 |
return montlhyList; |
Also available in: Unified diff
DB connections