Commit af4c858f by Samir Sadykhov

форматирование кода

parent 3660d6d3
...@@ -29,12 +29,12 @@ public class DocumentDAO { ...@@ -29,12 +29,12 @@ public class DocumentDAO {
// Получаем docID и formula // Получаем docID и formula
try (PreparedStatement ps = con.prepareStatement( try (PreparedStatement ps = con.prepareStatement(
"SELECT rg.docID, nt.formula " + "SELECT rg.docID, nt.formula " +
"FROM register_docs rg " + "FROM register_docs rg " +
"LEFT JOIN object_folders of ON rg.docID = of.objectID " + "LEFT JOIN object_folders of ON rg.docID = of.objectID " +
"LEFT JOIN registers r ON r.registerID = rg.registerID " + "LEFT JOIN registers r ON r.registerID = rg.registerID " +
"LEFT JOIN number_templates nt ON nt.templateID = r.templateID " + "LEFT JOIN number_templates nt ON nt.templateID = r.templateID " +
"WHERE of.folderid = ? AND of.object_type = '1024'" "WHERE of.folderid = ? AND of.object_type = '1024'"
)) { )) {
ps.setString(1, documentID); ps.setString(1, documentID);
...@@ -60,7 +60,7 @@ public class DocumentDAO { ...@@ -60,7 +60,7 @@ public class DocumentDAO {
// update user_mask // update user_mask
try (PreparedStatement ps = con.prepareStatement( try (PreparedStatement ps = con.prepareStatement(
"UPDATE register_docs SET user_mask = ? WHERE docID = ?" "UPDATE register_docs SET user_mask = ? WHERE docID = ?"
)) { )) {
ps.setString(1, numberTemplate); ps.setString(1, numberTemplate);
...@@ -70,7 +70,7 @@ public class DocumentDAO { ...@@ -70,7 +70,7 @@ public class DocumentDAO {
// delete old inputs // delete old inputs
try (PreparedStatement ps = con.prepareStatement( try (PreparedStatement ps = con.prepareStatement(
"DELETE FROM doc_number_input WHERE docID = ?" "DELETE FROM doc_number_input WHERE docID = ?"
)) { )) {
ps.setString(1, docID); ps.setString(1, docID);
...@@ -79,7 +79,7 @@ public class DocumentDAO { ...@@ -79,7 +79,7 @@ public class DocumentDAO {
// парсим formula // парсим formula
StringBuilder sql = new StringBuilder( StringBuilder sql = new StringBuilder(
"INSERT INTO doc_number_input(number, docID, value) VALUES " "INSERT INTO doc_number_input(number, docID, value) VALUES "
); );
List<String> values = new ArrayList<>(); List<String> values = new ArrayList<>();
...@@ -143,18 +143,18 @@ public class DocumentDAO { ...@@ -143,18 +143,18 @@ public class DocumentDAO {
try { try {
con.rollback(); con.rollback();
} catch (Exception ignored) {} } catch (Exception ignored) {}
} }
throw e; throw e;
} finally { } finally {
if (con != null) { if (con != null) {
try { try {
con.setAutoCommit(true); con.setAutoCommit(true);
} catch (Exception ignored) {} } catch (Exception ignored) {}
ConnectionPool.close(con); ConnectionPool.close(con);
}
}
} }
} }
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment