From 2c11bfeb7759edd72756bff8335a44d7337ca030 Mon Sep 17 00:00:00 2001 From: Andre Curione Date: Thu, 11 Jan 2018 14:10:14 -0600 Subject: [PATCH] #13309 - Create an UpsertCommandFactory object --- .../main/java/com/dotmarketing/db/commands/UpsertCommand.java | 4 ---- .../com/dotmarketing/db/commands/UpsertCommandFactory.java | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dotCMS/src/main/java/com/dotmarketing/db/commands/UpsertCommand.java b/dotCMS/src/main/java/com/dotmarketing/db/commands/UpsertCommand.java index 627ffae0f804..cbe0ad402038 100644 --- a/dotCMS/src/main/java/com/dotmarketing/db/commands/UpsertCommand.java +++ b/dotCMS/src/main/java/com/dotmarketing/db/commands/UpsertCommand.java @@ -3,15 +3,11 @@ import com.dotcms.system.SimpleMapAppContext; import com.dotmarketing.common.db.DotConnect; import com.dotmarketing.common.util.SQLUtil; -import com.dotmarketing.db.DbConnectionFactory; -import com.dotmarketing.db.DbType; import com.dotmarketing.exception.DotDataException; import com.liferay.util.StringUtil; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; /** * Generic UpsertCommand that can be used to Generate and execute Native SQL Upsert Queries diff --git a/dotCMS/src/main/java/com/dotmarketing/db/commands/UpsertCommandFactory.java b/dotCMS/src/main/java/com/dotmarketing/db/commands/UpsertCommandFactory.java index 092619d0ffb7..f91dbff5909f 100644 --- a/dotCMS/src/main/java/com/dotmarketing/db/commands/UpsertCommandFactory.java +++ b/dotCMS/src/main/java/com/dotmarketing/db/commands/UpsertCommandFactory.java @@ -24,6 +24,9 @@ public class UpsertCommandFactory { commandMap.put(DbType.ORACLE, new OracleUpsertCommand()); } + //Hide the constructor + private UpsertCommandFactory() { } + public static UpsertCommand getInstance() { return commandMap.get(DbType.getDbType(DbConnectionFactory.getDBType())); }