All Downloads are FREE. Search and download functionalities are using the official Maven repository.

util.EDatabaseType Maven / Gradle / Ivy

The newest version!
package util;

import clients.mongodb.DBMongoClient;
import clients.mysql.DBMysqlClient;
import com.github.simondan.definition.database.IDatabaseClient;

/**
 * Listet alle verfügbaren Datenbank-Typen auf
 *
 * @author Simon Danner, 25.05.2016.
 */
public enum EDatabaseType
{
  MONGO_DB, MYSQL;

  public static IDatabaseClient getClientFromType(EDatabaseType pType)
  {
    switch (pType)
    {
      case MONGO_DB:
        return new DBMongoClient();
      case MYSQL:
        return new DBMysqlClient();
      default:
        throw new RuntimeException("Database-Type: " + pType.name() + " not supported.");
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy