// Path: src/main/java/com/fdflib/persistence/database/DatabaseUtil.java
// public class DatabaseUtil {
// 
//     private static org.slf4j.Logger fdfLog = LoggerFactory.getLogger(JdbcConnection.class);
// 
//     public enum DatabaseType {
//         MYSQL, POSTGRES, ORACLE, MSSQL, HSQL
//     }
// 
//     public enum DatabaseProtocol {
//         JDBC_MYSQL, JDBC_POSTGRES, JDBC_HSQL
//     }
// 
//     public enum DatabaseEncoding {
//         UTF8
//     }
// 
//     public static String returnDBConnectionString() {
//         String protocolString = "";
//         String encodingString = "";
//         String connection = "";
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_MYSQL) {
//             protocolString = "jdbc:mysql://";
// 
//             if(FdfSettings.DB_ENCODING == DatabaseUtil.DatabaseEncoding.UTF8) {
//                 if(FdfSettings.USE_SSL == true) {
//                     encodingString = "?characterEncoding=UTF-8&autoReconnect=true&useSSL=true";
//                 }
//                 else {
//                     encodingString = "?characterEncoding=UTF-8&autoReconnect=true&useSSL=false";
//                 }
//             }
//             else {
//                 if(FdfSettings.USE_SSL == true) {
//                     encodingString = "?autoReconnect=true&useSSL=true";
//                 }
//                 else {
//                     encodingString = "?autoReconnect=true&useSSL=false";
//                 }
//             }
// 
//             connection = protocolString + FdfSettings.DB_HOST + "/" + FdfSettings.DB_NAME + encodingString;
//         }
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_POSTGRES) {
//             protocolString = "jdbc:postgresql://";
// 
//             if(FdfSettings.DB_ENCODING == DatabaseUtil.DatabaseEncoding.UTF8) {
//                 encodingString = "?characterEncoding=UTF-8";
//             }
// 
//             connection = protocolString + FdfSettings.DB_HOST + "/" + FdfSettings.DB_NAME.toLowerCase()
//                     + encodingString;
//         }
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_HSQL) {
// 
//             if(FdfSettings.HSQL_DB_FILE) {
//                 protocolString = "jdbc:hsqldb:file:" + FdfSettings.HQSL_DB_FILE_LOCATION + FdfSettings.DB_NAME
//                         + ";sql.syntax_mys=true";
//             }
//             else {
//                 protocolString = "jdbc:hsqldb:mem:" + FdfSettings.DB_NAME + ";sql.syntax_mys=true";
//             }
// 
//             connection = protocolString;
//         }
// 
//         fdfLog.debug("Returning DB connection string: {}", connection);
//         return connection;
//     }
// 
//     public static String returnDBConnectionStringWithoutDatabase() {
//         String protocolString = "";
//         String encodingString = "";
//         String questionMark = "?";
//         String sslString ="";
//         String connection = "";
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_MYSQL) {
//             protocolString = "jdbc:mysql://";
// 
//             if(FdfSettings.DB_ENCODING == DatabaseUtil.DatabaseEncoding.UTF8) {
//                 if(FdfSettings.USE_SSL == true) {
//                     encodingString = "/?characterEncoding=UTF-8&autoReconnect=true&useSSL=true";
//                 }
//                 else {
//                     encodingString = "/?characterEncoding=UTF-8&autoReconnect=true&useSSL=false";
//                 }
//             }
//             else {
//                 if(FdfSettings.USE_SSL == true) {
//                     encodingString = "/?autoReconnect=true&useSSL=true";
//                 }
//                 else {
//                     encodingString = "/?autoReconnect=true&useSSL=false";
//                 }
//             }
// 
//             connection = protocolString + FdfSettings.DB_HOST + encodingString;
//         }
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_POSTGRES) {
//             protocolString = "jdbc:postgresql://";
// 
//             if(FdfSettings.DB_ENCODING == DatabaseUtil.DatabaseEncoding.UTF8) {
//                 encodingString = "/?characterEncoding=UTF-8";
//             }
// 
//             connection = protocolString + FdfSettings.DB_HOST + encodingString;
//         }
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_HSQL) {
//             if(FdfSettings.HSQL_DB_FILE) {
//                 protocolString = "jdbc:hsqldb:file:" + FdfSettings.HQSL_DB_FILE_LOCATION + FdfSettings.DB_NAME
//                         + ";sql.syntax_mys=true";
//             }
//             else {
//                 protocolString = "jdbc:hsqldb:mem:" + FdfSettings.DB_NAME + ";sql.syntax_mys=true";
//             }
// 
//             connection = protocolString;
//         }
// 
//         fdfLog.debug("Returning DB connection string: {}", connection);
//         return connection;
//     }
// }


import com.fdflib.persistence.database.DatabaseUtil;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadFactory;
/**
 * 4DFLib
 * Copyright (c) 2015-2016 Brian Gormanly
 * 4dflib.com
 *
 * 4DFLib is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.fdflib.util;



/**
 * Created by brian.gormanly on 5/19/15.
 */
public class FdfSettings {

    private static final FdfSettings INSTANCE = new FdfSettings();

    static Logger fdfLog = LoggerFactory.getLogger(FdfSettings.class);

    public List<Class> modelClasses = new ArrayList<>();
// Path: src/main/java/com/fdflib/persistence/database/DatabaseUtil.java
// public class DatabaseUtil {
// 
//     private static org.slf4j.Logger fdfLog = LoggerFactory.getLogger(JdbcConnection.class);
// 
//     public enum DatabaseType {
//         MYSQL, POSTGRES, ORACLE, MSSQL, HSQL
//     }
// 
//     public enum DatabaseProtocol {
//         JDBC_MYSQL, JDBC_POSTGRES, JDBC_HSQL
//     }
// 
//     public enum DatabaseEncoding {
//         UTF8
//     }
// 
//     public static String returnDBConnectionString() {
//         String protocolString = "";
//         String encodingString = "";
//         String connection = "";
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_MYSQL) {
//             protocolString = "jdbc:mysql://";
// 
//             if(FdfSettings.DB_ENCODING == DatabaseUtil.DatabaseEncoding.UTF8) {
//                 if(FdfSettings.USE_SSL == true) {
//                     encodingString = "?characterEncoding=UTF-8&autoReconnect=true&useSSL=true";
//                 }
//                 else {
//                     encodingString = "?characterEncoding=UTF-8&autoReconnect=true&useSSL=false";
//                 }
//             }
//             else {
//                 if(FdfSettings.USE_SSL == true) {
//                     encodingString = "?autoReconnect=true&useSSL=true";
//                 }
//                 else {
//                     encodingString = "?autoReconnect=true&useSSL=false";
//                 }
//             }
// 
//             connection = protocolString + FdfSettings.DB_HOST + "/" + FdfSettings.DB_NAME + encodingString;
//         }
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_POSTGRES) {
//             protocolString = "jdbc:postgresql://";
// 
//             if(FdfSettings.DB_ENCODING == DatabaseUtil.DatabaseEncoding.UTF8) {
//                 encodingString = "?characterEncoding=UTF-8";
//             }
// 
//             connection = protocolString + FdfSettings.DB_HOST + "/" + FdfSettings.DB_NAME.toLowerCase()
//                     + encodingString;
//         }
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_HSQL) {
// 
//             if(FdfSettings.HSQL_DB_FILE) {
//                 protocolString = "jdbc:hsqldb:file:" + FdfSettings.HQSL_DB_FILE_LOCATION + FdfSettings.DB_NAME
//                         + ";sql.syntax_mys=true";
//             }
//             else {
//                 protocolString = "jdbc:hsqldb:mem:" + FdfSettings.DB_NAME + ";sql.syntax_mys=true";
//             }
// 
//             connection = protocolString;
//         }
// 
//         fdfLog.debug("Returning DB connection string: {}", connection);
//         return connection;
//     }
// 
//     public static String returnDBConnectionStringWithoutDatabase() {
//         String protocolString = "";
//         String encodingString = "";
//         String questionMark = "?";
//         String sslString ="";
//         String connection = "";
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_MYSQL) {
//             protocolString = "jdbc:mysql://";
// 
//             if(FdfSettings.DB_ENCODING == DatabaseUtil.DatabaseEncoding.UTF8) {
//                 if(FdfSettings.USE_SSL == true) {
//                     encodingString = "/?characterEncoding=UTF-8&autoReconnect=true&useSSL=true";
//                 }
//                 else {
//                     encodingString = "/?characterEncoding=UTF-8&autoReconnect=true&useSSL=false";
//                 }
//             }
//             else {
//                 if(FdfSettings.USE_SSL == true) {
//                     encodingString = "/?autoReconnect=true&useSSL=true";
//                 }
//                 else {
//                     encodingString = "/?autoReconnect=true&useSSL=false";
//                 }
//             }
// 
//             connection = protocolString + FdfSettings.DB_HOST + encodingString;
//         }
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_POSTGRES) {
//             protocolString = "jdbc:postgresql://";
// 
//             if(FdfSettings.DB_ENCODING == DatabaseUtil.DatabaseEncoding.UTF8) {
//                 encodingString = "/?characterEncoding=UTF-8";
//             }
// 
//             connection = protocolString + FdfSettings.DB_HOST + encodingString;
//         }
// 
//         if(FdfSettings.DB_PROTOCOL == DatabaseUtil.DatabaseProtocol.JDBC_HSQL) {
//             if(FdfSettings.HSQL_DB_FILE) {
//                 protocolString = "jdbc:hsqldb:file:" + FdfSettings.HQSL_DB_FILE_LOCATION + FdfSettings.DB_NAME
//                         + ";sql.syntax_mys=true";
//             }
//             else {
//                 protocolString = "jdbc:hsqldb:mem:" + FdfSettings.DB_NAME + ";sql.syntax_mys=true";
//             }
// 
//             connection = protocolString;
//         }
// 
//         fdfLog.debug("Returning DB connection string: {}", connection);
//         return connection;
//     }
// }


// Path: src/main/java/com/fdflib/util/FdfSettings.java
import com.fdflib.persistence.database.DatabaseUtil;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadFactory;

/**
 * 4DFLib
 * Copyright (c) 2015-2016 Brian Gormanly
 * 4dflib.com
 *
 * 4DFLib is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.fdflib.util;



/**
 * Created by brian.gormanly on 5/19/15.
 */
public class FdfSettings {

    private static final FdfSettings INSTANCE = new FdfSettings();

    static Logger fdfLog = LoggerFactory.getLogger(FdfSettings.class);

    public List<Class> modelClasses = new ArrayList<>();
    public static DatabaseUtil.DatabaseType PERSISTENCE = DatabaseUtil.DatabaseType.HSQL;