Cleaned up code
This commit is contained in:
parent
e88169147c
commit
e58d96b58a
@ -40,6 +40,7 @@ public class TableFactory {
|
||||
|
||||
/**
|
||||
* Gets a storage medium from the list
|
||||
*
|
||||
* @param storageClass The class of the storage medium you want to get
|
||||
* @return the storage medium
|
||||
*/
|
||||
|
@ -135,9 +135,7 @@ public class DataBaseSelection {
|
||||
messageBuilder.append((added.get()) ? ", " : "").append(v);
|
||||
added.set(true);
|
||||
});
|
||||
StackTraceElement[] st = Thread.currentThread().getStackTrace();
|
||||
StackTraceElement stack = st[st.length - 1];
|
||||
LOG.debug("DEBUG <" + stack.getFileName() + ":" + stack.getLineNumber() + "> Statement: " + messageBuilder);
|
||||
LOG.debug("Statement: " + messageBuilder);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -167,11 +167,13 @@ public class UpdateManager {
|
||||
sb.append("UPDATE ").append(tableName);
|
||||
if (!setList.isEmpty()) sb.append(" SET ");
|
||||
AtomicBoolean used = new AtomicBoolean(false);
|
||||
|
||||
setList.forEach((str, obj) -> {
|
||||
if (used.get()) sb.append(", ");
|
||||
sb.append(str).append(" = ?");
|
||||
used.set(true);
|
||||
});
|
||||
|
||||
if (!whereList.isEmpty()) sb.append(" WHERE ");
|
||||
AtomicBoolean used2 = new AtomicBoolean(false);
|
||||
whereList.forEach((str, obj) -> {
|
||||
|
Reference in New Issue
Block a user