Skip to content

Commit

Permalink
#13309 - Create an UpsertCommandFactory object
Browse files Browse the repository at this point in the history
  • Loading branch information
acurionedotcms committed Jan 11, 2018
1 parent c00d1c6 commit 2c11bfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down

0 comments on commit 2c11bfe

Please sign in to comment.