Codota Logo
DbConfiguration
Code IndexAdd Codota to your IDE (free)

How to use
DbConfiguration
in
org.javalite.activejdbc.connection_config

Best Java code snippets using org.javalite.activejdbc.connection_config.DbConfiguration (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: javalite/activejdbc

/**
 * Provides a list of all connection wrappers corresponding to a current environment.
 *
 * @return  a list of all connection wrappers corresponding to a current environment.
 */
public static List<ConnectionSpecWrapper> getConnectionSpecWrappers() {
  return getConnectionSpecWrappers(Configuration.getEnv());
}
origin: javalite/activejdbc

private void createJndiWrapper(String env, String jndiName) {
  ConnectionSpecWrapper wrapper = new ConnectionSpecWrapper();
  wrapper.setEnvironment(env);
  ConnectionJndiSpec connectionSpec = new ConnectionJndiSpec(jndiName);
  wrapper.setConnectionSpec(connectionSpec);
  addConnectionWrapper(wrapper, false);
}
origin: javalite/activejdbc

public static void clearConnectionWrappers() {
  clearConnectionWrappers(Configuration.getEnv());
}
origin: javalite/activejdbc

String jndiName = env + "." + "jndi";
if (props.containsKey(jndiName)) {
  createJndiWrapper(env, props.getProperty(jndiName));
} else {
  String driver = props.getProperty(env + ".driver");
  String password = props.getProperty(env + ".password");
  String url = props.getProperty(env + ".url");
  checkProps(driver, userName, password, url, env);
  createJdbcWrapper(env, driver, url, userName, password);
origin: org.javalite/activejdbc

String jndiName = env + "." + "jndi";
if (props.containsKey(jndiName)) {
  createJndiWrapper(env, props.getProperty(jndiName));
} else {
  String driver = props.getProperty(env + ".driver");
  String password = props.getProperty(env + ".password");
  String url = props.getProperty(env + ".url");
  checkProps(driver, userName, password, url, env);
  createJdbcWrapper(env, driver, url, userName, password);
origin: javalite/activejdbc

  public List<ConnectionSpecWrapper> getTestConnectionWrappers() {
    List<ConnectionSpecWrapper> allConnections = getConnectionSpecWrappers();
    List<ConnectionSpecWrapper> result = new LinkedList<>();

    for (ConnectionSpecWrapper connectionWrapper : allConnections) {
      if (connectionWrapper.isTesting())
        result.add(connectionWrapper);
    }

    return result;
  }
}
origin: javalite/activejdbc

private void createJdbcWrapper(String env, String driver, String url, String userName, String password) {
  ConnectionSpecWrapper wrapper = new ConnectionSpecWrapper();
  if(env.equals("test")){
    wrapper.setEnvironment("development");
    wrapper.setTesting(true);
  } else if(env.endsWith(".test")) {
    wrapper.setEnvironment(env.split("\\.")[0]);
    wrapper.setTesting(true);
  }else{
    wrapper.setEnvironment(env);
  }
  ConnectionJdbcSpec connectionSpec = new ConnectionJdbcSpec(driver, url, userName, password);
  wrapper.setConnectionSpec(connectionSpec);
  addConnectionWrapper(wrapper, false);
}
origin: javalite/activeweb

public static void clearConnectionWrappers() {
  DbConfiguration.clearConnectionWrappers();
}
origin: javalite/activeweb

  private static List<ConnectionSpecWrapper> getTestConnectionWrappers() {
    List<ConnectionSpecWrapper> allConnections = DbConfiguration.getConnectionSpecWrappers();
    List<ConnectionSpecWrapper> result = new LinkedList<>();

    for (ConnectionSpecWrapper connectionWrapper : allConnections) {
      if (connectionWrapper.isTesting())
        result.add(connectionWrapper);
    }

    return result;
  }
}
origin: javalite/activeweb

ConnectionBuilder(String environment) {
  connectionWrapper = new ConnectionSpecWrapper();
  connectionWrapper.setEnvironment(environment);
  DbConfiguration.addConnectionWrapper(connectionWrapper, false);
}
origin: org.javalite/activejdbc

public static void clearConnectionWrappers() {
  clearConnectionWrappers(Configuration.getEnv());
}
origin: org.javalite/activejdbc

  public List<ConnectionSpecWrapper> getTestConnectionWrappers() {
    List<ConnectionSpecWrapper> allConnections = getConnectionSpecWrappers();
    List<ConnectionSpecWrapper> result = new LinkedList<>();

    for (ConnectionSpecWrapper connectionWrapper : allConnections) {
      if (connectionWrapper.isTesting())
        result.add(connectionWrapper);
    }

    return result;
  }
}
origin: javalite/activeweb

ConnectionBuilder(String environment, boolean override) {
  connectionWrapper = new ConnectionSpecWrapper();
  connectionWrapper.setEnvironment(environment);
  DbConfiguration.addConnectionWrapper(connectionWrapper, override);
}
origin: org.javalite/activejdbc

/**
 * Provides a list of all connection wrappers corresponding to a current environment.
 *
 * @return  a list of all connection wrappers corresponding to a current environment.
 */
public static List<ConnectionSpecWrapper> getConnectionSpecWrappers() {
  return getConnectionSpecWrappers(Configuration.getEnv());
}
origin: org.javalite/activejdbc

private void createJndiWrapper(String env, String jndiName) {
  ConnectionSpecWrapper wrapper = new ConnectionSpecWrapper();
  wrapper.setEnvironment(env);
  ConnectionJndiSpec connectionSpec = new ConnectionJndiSpec(jndiName);
  wrapper.setConnectionSpec(connectionSpec);
  addConnectionWrapper(wrapper, false);
}
origin: javalite/activeweb

  /**
   * Returns all connections which correspond dbName  of this filter and not for testing
   * 
   * @return all connections which correspond dbName  of this filter and not for testing.
   */
  private List<ConnectionSpecWrapper> getConnectionWrappers() {
    List<ConnectionSpecWrapper> allConnections = DbConfiguration.getConnectionSpecWrappers();
    List<ConnectionSpecWrapper> result = new LinkedList<>();

    for (ConnectionSpecWrapper connectionWrapper : allConnections) {
      if (!connectionWrapper.isTesting() && (dbName == null || dbName.equals(connectionWrapper.getDbName())))
        result.add(connectionWrapper);
    }
    return result;
  }    
}
origin: org.javalite/activejdbc

private void createJdbcWrapper(String env, String driver, String url, String userName, String password) {
  ConnectionSpecWrapper wrapper = new ConnectionSpecWrapper();
  if(env.equals("test")){
    wrapper.setEnvironment("development");
    wrapper.setTesting(true);
  } else if(env.endsWith(".test")) {
    wrapper.setEnvironment(env.split("\\.")[0]);
    wrapper.setTesting(true);
  }else{
    wrapper.setEnvironment(env);
  }
  ConnectionJdbcSpec connectionSpec = new ConnectionJdbcSpec(driver, url, userName, password);
  wrapper.setConnectionSpec(connectionSpec);
  addConnectionWrapper(wrapper, false);
}
org.javalite.activejdbc.connection_configDbConfiguration

Most used methods

  • getConnectionSpecWrappers
    Provides a list of all connection wrappers corresponding to a given environment.
  • addConnectionWrapper
  • clearConnectionWrappers
  • checkProps
  • createJdbcWrapper
  • createJndiWrapper

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • runOnUiThread (Activity)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now