Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.PropertiesConfiguration.containsKey()


    compositeConfig.addConfiguration(propConfig);
   
   
    Properties properties = new Properties();
    if ("Hibernate".equals(propConfig.getString(Property.PERSISTENCE_PROVIDER))) {
      if (propConfig.containsKey(Property.DATASOURCE))
        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
View Full Code Here


   
    Properties properties = new Properties();
    if ("Hibernate".equals(propConfig.getString(Property.PERSISTENCE_PROVIDER))) {
      if (propConfig.containsKey(Property.DATASOURCE))
        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
      if (propConfig.containsKey(Property.HIBERNATE_DIALECT))
        properties.put("hibernate.dialect",propConfig.getString(Property.HIBERNATE_DIALECT));
View Full Code Here

    if ("Hibernate".equals(propConfig.getString(Property.PERSISTENCE_PROVIDER))) {
      if (propConfig.containsKey(Property.DATASOURCE))
        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
      if (propConfig.containsKey(Property.HIBERNATE_DIALECT))
        properties.put("hibernate.dialect",propConfig.getString(Property.HIBERNATE_DIALECT));
    }
    // initialize the entityManagerFactory.
View Full Code Here

        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
      if (propConfig.containsKey(Property.HIBERNATE_DIALECT))
        properties.put("hibernate.dialect",propConfig.getString(Property.HIBERNATE_DIALECT));
    }
    // initialize the entityManagerFactory.
    PersistenceManager.initializeEntityManagerFactory(propConfig.getString(Property.JUDDI_PERSISTENCEUNIT_NAME), properties);
    // Properties from the persistence layer
View Full Code Here

    compositeConfig.addConfiguration(propConfig);
   
   
    Properties properties = new Properties();
    if ("Hibernate".equals(propConfig.getString(Property.PERSISTENCE_PROVIDER))) {
      if (propConfig.containsKey(Property.DATASOURCE))
        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
View Full Code Here

   
    Properties properties = new Properties();
    if ("Hibernate".equals(propConfig.getString(Property.PERSISTENCE_PROVIDER))) {
      if (propConfig.containsKey(Property.DATASOURCE))
        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
      if (propConfig.containsKey(Property.HIBERNATE_DIALECT))
        properties.put("hibernate.dialect",propConfig.getString(Property.HIBERNATE_DIALECT));
View Full Code Here

    if ("Hibernate".equals(propConfig.getString(Property.PERSISTENCE_PROVIDER))) {
      if (propConfig.containsKey(Property.DATASOURCE))
        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
      if (propConfig.containsKey(Property.HIBERNATE_DIALECT))
        properties.put("hibernate.dialect",propConfig.getString(Property.HIBERNATE_DIALECT));
    }
    // initialize the entityManagerFactory.
View Full Code Here

        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
      if (propConfig.containsKey(Property.HIBERNATE_DIALECT))
        properties.put("hibernate.dialect",propConfig.getString(Property.HIBERNATE_DIALECT));
    }
    // initialize the entityManagerFactory.
    PersistenceManager.initializeEntityManagerFactory(propConfig.getString(Property.JUDDI_PERSISTENCEUNIT_NAME), properties);
    // Properties from the persistence layer
View Full Code Here

        * Merge in system properties overrides
        */
       Iterator<Object> systemKeysIter = System.getProperties().keySet().iterator();
       while (systemKeysIter.hasNext()) {
           String key = systemKeysIter.next().toString();
           if (configuration.containsKey(key) || key.startsWith("widget.")) {
               String setting = configuration.getString(key);
               String override = System.getProperty(key);
               if ((override != null) && (override.length() > 0) && !override.equals(setting)) {
                   configuration.setProperty(key, override);
                   if (setting != null) {
View Full Code Here

      List<String> backends = new ArrayList<String>();
      if (numPreferredNodes > 0) {
        /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred
         * nodes. */
        if (!conf.containsKey(BACKENDS)) {
          LOG.fatal("Missing configuration backend list, which is needed to randomly select " +
                    "preferred nodes (num_preferred_nodes set to " + numPreferredNodes + ")");
        }
        for (String node : conf.getStringArray(BACKENDS)) {
          backends.add(node);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.