/*
To load all the properties
329578
protected Object getAllValues(BackedSession sess) {
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[GET_ALL_VALUES]);
        }

        Connection conn = getConnection(false);
        String id = sess.getId();

        if (conn == null) {
            if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[GET_ALL_VALUES], null);
            }
            return null;
        }

        long startTime = System.currentTimeMillis();
        long readSize = 0;

        PreparedStatement s = null;
        ResultSet rs = null;
        Hashtable h = new Hashtable();
        try {
            s = conn.prepareStatement(findProps);
            s.setString(1, id);
            s.setString(2, id);
            s.setString(3, getAppName());
            rs = s.executeQuery();

            if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[GET_ALL_VALUES], "querying database for properties");
            }

            while (rs.next()) {

                // start PM36949: If an attribute is already in appDataRemovals or appDataChanges, then the attribute was already retrieved from the db.  Skip retrieval from the db here.
                if (sess.appDataRemovals != null && sess.appDataRemovals.containsKey(rs.getString(DatabaseHashMap.propCol))) { //

                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[GET_ALL_VALUES], "Found property: "
                                                                                                                      + rs.getString(DatabaseHashMap.propCol)
                                                                                                                      + " in appDataRemovals, skipping db query for this prop");
                    }
                    continue;

                } else if (sess.appDataChanges != null && sess.appDataChanges.containsKey(rs.getString(DatabaseHashMap.propCol))) {

                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[GET_ALL_VALUES], "Found property: "
                                                                                                                      + rs.getString(DatabaseHashMap.propCol)
                                                                                                                      + " in appDataChanges, skipping db query for this prop");
                    }
                    continue;
                } // end PM36949

                byte[] b = rs.getBytes(smallCol);
                if (b == null) {
                    b = rs.getBytes(medCol);
                }
                if (b == null) {
                    b = rs.getBytes(lgCol);
                }

                ByteArrayInputStream bais = new ByteArrayInputStream(b);
                BufferedInputStream bis = new BufferedInputStream(bais);
                Object obj = null;
                try {
                    obj = ((DatabaseStore) getIStore()).getLoader().loadObject(bis);
                    readSize += b.length;
                } catch (ClassNotFoundException ce) {
                    com.ibm.ws.ffdc.FFDCFilter.processException(ce, "com.ibm.ws.session.store.db.DatabaseHashMapMR.getAllValues", "864", sess);
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "DatabaseHashMapMR.getSwappableListenersErr");
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "CommonMessage.sessionid", id);
                    LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "CommonMessage.exception", ce);
                }

                bis.close();
                bais.close();

                if (obj != null) {
                    if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                        LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[GET_ALL_VALUES],
                                                            "put prop in mSwappableData: " + rs.getString(DatabaseHashMap.propCol));
                    }
                    h.put(rs.getString(propCol), obj);
                }
            }
            SessionStatistics pmiStats = _iStore.getSessionStatistics();
            if (pmiStats != null) {
                pmiStats.readTimes(readSize, System.currentTimeMillis() - startTime);
            }
        } catch (SQLException se) {
            com.ibm.ws.ffdc.FFDCFilter.processException(se, "com.ibm.ws.session.store.db.DatabaseHashMapMR.getAllValues", "885", sess);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "DatabaseHashMapMR.checkListErr");
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "CommonMessage.object", sess.toString());
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "CommonMessage.exception", se);
        } catch (Exception e) {
            com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.session.store.db.DatabaseHashMapMR.getAllValues", "892", sess);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "DatabaseHashMapMR.checkListErr");
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "CommonMessage.object", sess.toString());
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[GET_ALL_VALUES], "CommonMessage.exception", e);
        } finally {
            if (rs != null)
                closeResultSet(rs);
            if (s != null)
                closeStatement(s);
            closeConnection(conn);
        }
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[GET_ALL_VALUES], h);
        }
        return h;
    }
940197
private function loadKeyProperties()
    {
        $this->keyProperties = array();
        foreach( $this->dataTypes as $name => $dataType ) {
            if( $dataType->isPrimaryKey() ) {
                $this->keyProperties[] = $name;
            }
        }
    }
834685
private static void loadClientProperties(String propertiesPath, String clazzName,
            Map<?, Map<String, String>> clientProperties, Map<String, Map<String, String>> entityConfigurations)
    {

        InputStream inputStream = PropertyReader.class.getClassLoader().getResourceAsStream(propertiesPath);
        clientProperties = JsonUtil.readJson(inputStream, Map.class);

        if (clientProperties != null)
        {
            if (clientProperties.get("all") != null)
            {
                entityConfigurations.put(clazzName, clientProperties.get("all"));
            }
            else
            {

                Iterator iter = clientProperties.keySet().iterator();

                while (iter.hasNext())
                {
                    Object key = iter.next();
                    if (((String) key).indexOf(',') > 0)
                    {
                        StringTokenizer tokenizer = new StringTokenizer((String) key, ",");
                        while (tokenizer.hasMoreElements())
                        {
                            String token = tokenizer.nextToken();
                            entityConfigurations.put(token, clientProperties.get(key));
                        }
                    }
                    else
                    {
                        entityConfigurations.put((String) key, clientProperties.get(key));
                    }
                }
            }
        }

    }
1280514
public static void loadProperties (String path, ClassLoader loader, Properties target)
        throws IOException
    {
        InputStream in = getStream(path, loader);
        if (in == null) {
            throw new FileNotFoundException(path);
        }
        target.load(in);
        in.close();
    }
50917
private String loadStringProperty(String propertyKey) {
		String propValue = prop.getProperty(propertyKey);
		if (propValue != null) {
			propValue = propValue.trim();
		}
		return propValue;
	}
26389
private static Properties loadSecretProperties() throws IOException {
        Properties properties = new Properties();
        InputStream propertiesStream = Server.class.getClassLoader().getResourceAsStream("secrets.properties");
        if (propertiesStream == null) {
            // Fallback to file access in the case of running from certain IDEs.
            File buildPropertiesFile = new File("src/main/resources/secrets.properties");
            if (buildPropertiesFile.exists()) {
                properties.load(new FileReader(buildPropertiesFile));
            } else {
                buildPropertiesFile = new File("samples/servlet-sample/src/main/resources/secrets.properties");
                if (buildPropertiesFile.exists()) {
                    properties.load(new FileReader(buildPropertiesFile));
                } else {
                    throw new IllegalStateException("Could not find secrets.properties");
                }
            }
        } else {
            properties.load(propertiesStream);
        }
        return properties;
    }
551945
private static void loadLocalProps() {
        if (null == localProps) {
            localProps = new Properties();
        }

        try {
            InputStream resourceAsStream;
            final String localPropsEnv = System.getenv("LATKE_LOCAL_PROPS");
            if (StringUtils.isNotBlank(localPropsEnv)) {
                LOGGER.debug("Loading local.properties from env var [$LATKE_LOCAL_PROPS=" + localPropsEnv + "]");
                resourceAsStream = new FileInputStream(localPropsEnv);
            } else {
                LOGGER.debug("Loading local.properties from classpath [/local.properties]");
                resourceAsStream = Latkes.class.getResourceAsStream("/local.properties");
            }

            if (null != resourceAsStream) {
                localProps.load(resourceAsStream);
                LOGGER.debug("Loaded local.properties");
            }
        } catch (final Exception e) {
            LOGGER.log(Level.DEBUG, "Loads local.properties failed, ignored");
        }
    }
1305873
function() {

            var data = {};
            var properties = this.__getPropertiesParam();

            for (var property in properties) {
                data[property] = this.__processData(this.__getPropertyValue(property));
            }

            return data;
        }
1017540
private synchronized static void loadAll() throws DaoManagerException {
		if (setImpl ==null) {
			long implLastModifiedTime=impl.getLastModified();
				
			if (lastModified<implLastModifiedTime){
				Map<String,PropertyDescriptor> staticValues=impl.getAll();
				// to avoid reading while cleaning
				synchronized (cache) {
					cache.clear();
					cache.putAll(staticValues);
				}
				lastModified=System.currentTimeMillis();
				notifyPropertiesChangedListers(lastModified);	
			}
		} else {
			long implLastModifiedTime=impl.getLastModified();
			long setImplLastModifiedTime=setImpl.getLastModified();
		
			if (lastModified<implLastModifiedTime || lastModified<setImplLastModifiedTime){
				Map<String,PropertyDescriptor> staticValues=impl.getAll();
				Map<String,PropertyDescriptor> dynamicValues=setImpl.getAll();
				// to avoid reading while cleaning
				synchronized (cache) {
					cache.clear();
					cache.putAll(staticValues);
					cache.putAll(dynamicValues);
				}
				lastModified=System.currentTimeMillis();
				notifyPropertiesChangedListers(lastModified);
			}
		}
	}
863645
private String[] propertiesReader() {
        InputStream inputstream = null;
        try {
            inputstream = Runtime.getRuntime().exec("getprop").getInputStream();
        } catch (IOException e) {
            Log.e(TAG, "Error reading properties", e);
        }
        if (inputstream == null) {
            return new String[0];
        }

        String allProperties = "";
        try {
            allProperties = new Scanner(inputstream).useDelimiter("\\A").next();
        } catch (NoSuchElementException e) {
            Log.e(TAG, "Error reading properties", e);
        }
        return allProperties.split("\n");
    }
1145600
private static void loadLatkeProps() {
        if (null == latkeProps) {
            latkeProps = new Properties();
        }

        try {
            InputStream resourceAsStream;
            final String latkePropsEnv = System.getenv("LATKE_PROPS");
            if (StringUtils.isNotBlank(latkePropsEnv)) {
                LOGGER.debug("Loading latke.properties from env var [$LATKE_PROPS=" + latkePropsEnv + "]");
                resourceAsStream = new FileInputStream(latkePropsEnv);
            } else {
                LOGGER.debug("Loading latke.properties from classpath [/latke.properties]");
                resourceAsStream = Latkes.class.getResourceAsStream("/latke.properties");
            }

            if (null != resourceAsStream) {
                latkeProps.load(resourceAsStream);
                LOGGER.debug("Loaded latke.properties");
            }
        } catch (final Exception e) {
            LOGGER.log(Level.ERROR, "Loads latke.properties failed", e);

            throw new RuntimeException("Loads latke.properties failed");
        }
    }
1199586
private Properties loadProperties() {

    props = new Properties();

    try {
      InputStream in = VersionProperties.class.getResourceAsStream("/META-INF/version.properties");
      props.load(in);
      in.close();
    }
    catch (Exception e) {
      // failed to load version properties. go with defaults
      props.put("vendor", "Mobicents");
      props.put("version", "UN.DEFINED");
    }

    return props;
  }
143473
private void loadPropertiesQueitly()
	{
		try
		{
			properties = PropertiesFileExtensions.loadProperties(this,
				EmailConstants.PROPERTIES_FILENAME);
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
	}
409351
protected void loadQueryProperties(String propertyFilename) throws IOException {

        Properties properties = new Properties();
        properties.load(getClass().getClassLoader().getResourceAsStream(propertyFilename));
        @SuppressWarnings("unchecked")
        Enumeration<String> propertyNames = (Enumeration<String>)properties.propertyNames();
        while (propertyNames.hasMoreElements()) {
            String propertyName = propertyNames.nextElement();
            m_queries.put(propertyName, properties.getProperty(propertyName));
        }
    }
1158343
@Override
    public void loadFromProperties(Properties props) {
        String strValue = props.getProperty(container.getSimpleName() + "." + name);
        if (strValue == null)
            return;

        try {
            long value = Long.parseLong(strValue);
            set(value);
        } catch (NumberFormatException nfe) {
        }
    }
368341
private void load() throws IOException
   {
      if (PrivilegedFileHelper.exists(storage))
      {
         InputStream in = PrivilegedFileHelper.fileInputStream(storage);
         try
         {
            Properties props = new Properties();
            log.debug("loading namespace mappings...");
            props.load(in);

            // read mappings from properties
            Iterator<Object> iter = props.keySet().iterator();
            while (iter.hasNext())
            {
               String prefix = (String)iter.next();
               String uri = props.getProperty(prefix);
               log.debug(prefix + " -> " + uri);
               prefixToURI.put(prefix, uri);
               uriToPrefix.put(uri, prefix);
            }
            prefixCount = props.size();
            log.debug("namespace mappings loaded.");
         }
         finally
         {
            in.close();
         }
      }
   }
72846
function (properties) {
		properties = properties || {};
		_.forEach(properties, function (property, name) {
			this.initProperty(name, property);
		}, this);
	}