/** * Load settings specified in properties files. */ public void loadSettings(PropertiesWrapper properties) { active = properties.getBoolean("docstore.active", active); url = properties.get("docstore.url", url); persist = properties.getEnum(DocStoreMode.class, "docstore.persist", persist); bulkBatchSize = properties.getInt("docstore.bulkBatchSize", bulkBatchSize); generateMapping = properties.getBoolean("docstore.generateMapping", generateMapping); dropCreate = properties.getBoolean("docstore.dropCreate", dropCreate); create = properties.getBoolean("docstore.create", create); mappingPath = properties.get("docstore.mappingPath", mappingPath); mappingSuffix = properties.get("docstore.mappingSuffix", mappingSuffix); pathToResources = properties.get("docstore.pathToResources", pathToResources); } }
/** * Load the settings from the properties file. */ public void loadSettings(PropertiesWrapper p) { queryTuning = p.getBoolean("autoTune.queryTuning", queryTuning); queryTuningAddVersion = p.getBoolean("autoTune.queryTuningAddVersion", queryTuningAddVersion); queryTuningFile = p.get("autoTune.queryTuningFile", queryTuningFile); skipGarbageCollectionOnShutdown = p.getBoolean("autoTune.skipGarbageCollectionOnShutdown", skipGarbageCollectionOnShutdown); skipProfileReportingOnShutdown = p.getBoolean("autoTune.skipProfileReportingOnShutdown", skipProfileReportingOnShutdown); mode = p.getEnum(AutoTuneMode.class, "autoTune.mode", mode); profiling = p.getBoolean("autoTune.profiling", profiling); profilingBase = p.getInt("autoTune.profilingBase", profilingBase); profilingRate = p.getDouble("autoTune.profilingRate", profilingRate); profilingFile = p.get("autoTune.profilingFile", profilingFile); profilingUpdateFrequency = p.getInt("autoTune.profilingUpdateFrequency", profilingUpdateFrequency); } }
/** * Load the settings from the PropertiesWrapper. */ public void loadSettings(PropertiesWrapper properties, String serverName) { migrationPath = properties.get("migration.migrationPath", migrationPath); modelPath = properties.get("migration.modelPath", modelPath); applyPrefix = properties.get("migration.applyPrefix", applyPrefix); applySuffix = properties.get("migration.applySuffix", applySuffix); modelSuffix = properties.get("migration.modelSuffix", modelSuffix); includeGeneratedFileComment = properties.getBoolean("migration.includeGeneratedFileComment", includeGeneratedFileComment); generatePendingDrop = properties.get("migration.generatePendingDrop", generatePendingDrop); platform = properties.getEnum(Platform.class, "migration.platform", platform); generate = properties.getBoolean("migration.generate", generate); version = properties.get("migration.version", version); name = properties.get("migration.name", name); runMigration = properties.getBoolean("migration.run", runMigration); metaTable = properties.get("migration.metaTable", metaTable); runPlaceholders = properties.get("migration.placeholders", runPlaceholders); String adminUser = properties.get("datasource." + serverName + ".username", dbUsername); adminUser = properties.get("datasource." + serverName + ".adminusername", adminUser); dbUsername = properties.get("migration.dbusername", adminUser); String adminPwd = properties.get("datasource." + serverName + ".password", dbPassword); adminPwd = properties.get("datasource." + serverName + ".adminpassword", adminPwd); dbPassword = properties.get("migration.dbpassword", adminPwd); }
persistBatch = p.getEnum(PersistBatch.class, "persistBatch", persistBatch); persistBatchOnCascade = p.getEnum(PersistBatch.class, "persistBatchOnCascade", persistBatchOnCascade); databasePlatformName = p.get("databasePlatformName", databasePlatformName); DbUuid dbUuid = p.getEnum(DbUuid.class, "dbuuid", null); if (dbUuid != null) { dbTypeConfig.setDbUuid(dbUuid); queryBatchSize = p.getInt("queryBatchSize", queryBatchSize); jsonInclude = p.getEnum(JsonConfig.Include.class, "jsonInclude", jsonInclude); String jsonDateTimeFormat = p.get("jsonDateTime", null); if (jsonDateTimeFormat != null) {