• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision91 (tree)
Time2015-08-23 14:59:44
Authort_nakayama1971

Log Message

(empty log message)

Change Summary

Incremental Difference

--- trunk/framework/pjSvc/src/project/master/CodeKeeperImpl.java (revision 90)
+++ trunk/framework/pjSvc/src/project/master/CodeKeeperImpl.java (revision 91)
@@ -14,7 +14,6 @@
1414 import common.db.jdbc.Jdbc;
1515 import common.master.IntervalTimer.IntervalCache;
1616 import common.sql.QueryUtil;
17-
1817 import core.exception.PhysicalException;
1918 import core.exception.ThrowableUtil;
2019 import core.util.MapUtil;
@@ -106,8 +105,9 @@
106105 private List<Code> setCodeList(final String kbn) {
107106 try (Jdbc conn = JdbcSource.getConnection()) {
108107 String query = QueryUtil.getSqlFromFile("SEL_MS_CODE", this.getClass());
109- try (PreparedStatement psmt = QueryUtil.statementReadonly(
110- conn, query, Collections.singletonMap("SbCode", kbn))) {
108+ try (PreparedStatement psmt = QueryUtil.createStatement(
109+ query, Collections.singletonMap("SbCode", kbn),
110+ Jdbc.wrap(conn)::readonlyStatement)) {
111111
112112 List<Code> l = null;
113113 try (ResultSet rs = psmt.executeQuery()) {
--- trunk/framework/pjSvc/src/project/svc/auth/AuthenticationImpl.java (revision 90)
+++ trunk/framework/pjSvc/src/project/svc/auth/AuthenticationImpl.java (revision 91)
@@ -11,8 +11,6 @@
1111 import java.util.Map;
1212 import java.util.Objects;
1313
14-import project.common.CodecUtil;
15-import project.common.StringUtil;
1614 import common.db.JdbcSource;
1715 import common.db.jdbc.Jdbc;
1816 import common.sql.QueryUtil;
@@ -19,6 +17,8 @@
1917 import core.exception.PhysicalException;
2018 import core.exception.ThrowableUtil;
2119 import core.util.DateUtil;
20+import project.common.CodecUtil;
21+import project.common.StringUtil;
2222
2323 /**
2424 * 認証クラス
@@ -90,7 +90,8 @@
9090 SessionInfo m = getSessionKanriInfoWithLock(uid, conn);
9191 if (m == null) {
9292 String query = QueryUtil.getSqlFromFile("InsertSessionKanri", this.getClass());
93- try (PreparedStatement upsmt = QueryUtil.statementExecute(conn, query, param)) {
93+ try (PreparedStatement upsmt = QueryUtil.createStatement(
94+ query, param, Jdbc.wrap(conn)::prepareStatement)) {
9495 upsmt.executeUpdate();
9596 }
9697 m = new SessionInfo();
@@ -106,7 +107,8 @@
106107 param.put("LogoffSbt", Integer.valueOf(m.getLogoffType().value()));
107108
108109 String query = QueryUtil.getSqlFromFile("UpdateSessionKanri", this.getClass());
109- try (PreparedStatement upsmt = QueryUtil.statementExecute(conn, query, param)) {
110+ try (PreparedStatement upsmt = QueryUtil.createStatement(
111+ query, param, Jdbc.wrap(conn)::prepareStatement)) {
110112 upsmt.executeUpdate();
111113 }
112114 }
@@ -145,7 +147,8 @@
145147 param.put("LogoffSbt", Integer.valueOf(m.getLogoffType().value()));
146148
147149 String query = QueryUtil.getSqlFromFile("UpdateSessionKanri", this.getClass());
148- try (PreparedStatement psmt = QueryUtil.statementExecute(conn, query, param)) {
150+ try (PreparedStatement psmt = QueryUtil.createStatement(
151+ query, param, Jdbc.wrap(conn)::prepareStatement)) {
149152 psmt.executeUpdate();
150153 }
151154 conn.commit();
@@ -174,7 +177,8 @@
174177 param.put("ShoriDtm", DateUtil.toDateTime(now));
175178
176179 String query = QueryUtil.getSqlFromFile("UpdateShoriDtm", this.getClass());
177- try (PreparedStatement psmt = QueryUtil.statementExecute(conn, query, param)) {
180+ try (PreparedStatement psmt = QueryUtil.createStatement(
181+ query, param, Jdbc.wrap(conn)::prepareStatement)) {
178182 // 更新
179183 psmt.executeUpdate();
180184 }
@@ -272,8 +276,9 @@
272276 try (Jdbc conn = JdbcSource.getConnection()) {
273277 // ユーザ存在確認
274278 String query = QueryUtil.getSqlFromFile("SelectUserInfo", this.getClass());
275- try (PreparedStatement psmt = QueryUtil.statementReadonly(
276- conn, query, Collections.singletonMap("UserId", uid))) {
279+ try (PreparedStatement psmt = QueryUtil.createStatement(
280+ query, Collections.singletonMap("UserId", uid),
281+ Jdbc.wrap(conn)::readonlyStatement)) {
277282 try (ResultSet rs = psmt.executeQuery()) {
278283 if (!rs.next()) {
279284 return false;
@@ -286,7 +291,8 @@
286291 param.put("PassWd", CodecUtil.toMd5String(pwd));
287292
288293 // パスワード確認
289- try (PreparedStatement psmt = QueryUtil.statementExecute(conn, query, param)) {
294+ try (PreparedStatement psmt = QueryUtil.createStatement(
295+ query, param, Jdbc.wrap(conn)::prepareStatement)) {
290296 try (ResultSet rs = psmt.executeQuery()) {
291297 return rs.next();
292298 }
@@ -331,7 +337,8 @@
331337 param.put("Ticket", val);
332338
333339 String query = QueryUtil.getSqlFromFile("UpdateTicket", this.getClass());
334- try (PreparedStatement psmt = QueryUtil.statementExecute(conn, query, param)) {
340+ try (PreparedStatement psmt = QueryUtil.createStatement(
341+ query, param, Jdbc.wrap(conn)::prepareStatement)) {
335342 int cnt = psmt.executeUpdate();
336343 if (cnt == 1) {
337344 conn.commit();
@@ -354,8 +361,9 @@
354361 if (!Objects.toString(uid, "").isEmpty()) {
355362 try (Connection conn = JdbcSource.getConnection()) {
356363 String query = QueryUtil.getSqlFromFile("SelectSessionKanri", this.getClass());
357- try (PreparedStatement psmt = QueryUtil.statementReadonly(
358- conn, query, Collections.singletonMap("UserId", uid))) {
364+ try (PreparedStatement psmt = QueryUtil.createStatement(
365+ query, Collections.singletonMap("UserId", uid),
366+ Jdbc.wrap(conn)::readonlyStatement)) {
359367 try (ResultSet rs = psmt.executeQuery()) {
360368 if (rs.next()) {
361369 return toSessionInfo(rs);
@@ -380,8 +388,9 @@
380388 private SessionInfo getSessionKanriInfoWithLock(final String uid, final Connection conn) {
381389 if (!Objects.toString(uid, "").isEmpty()) {
382390 String query = QueryUtil.getSqlFromFile("SelectSessionKanriForUpdate", this.getClass());
383- try (PreparedStatement psmt = QueryUtil.statementReadonly(
384- conn, query, Collections.singletonMap("UserId", uid))) {
391+ try (PreparedStatement psmt = QueryUtil.createStatement(
392+ query, Collections.singletonMap("UserId", uid),
393+ Jdbc.wrap(conn)::readonlyStatement)) {
385394 try (ResultSet rs = psmt.executeQuery()) {
386395 if (rs.next()) {
387396 toSessionInfo(rs);