Package io.ebean.config
Class DatabaseConfig
- java.lang.Object
-
- io.ebean.config.ServerConfig
-
- io.ebean.config.DatabaseConfig
-
public class DatabaseConfig extends ServerConfig
The configuration used for creating a Database.Used to programmatically construct an Database and optionally register it with the DB singleton.
If you just use DB thout this programmatic configuration Ebean will read the application.properties file and take the configuration from there. This usually includes searching the class path and automatically registering any entity classes and listeners etc.
DatabaseConfig config = new DatabaseConfig(); // read the ebean.properties and load // those settings into this serverConfig object config.loadFromProperties(); // explicitly register the entity beans to avoid classpath scanning config.addClass(Customer.class); config.addClass(User.class); Database db = DatabaseFactory.create(config);
Note that ServerConfigProvider provides a standard Java ServiceLoader mechanism that can be used to apply configuration to the DatabaseConfig.
- Author:
- emcgreal, rbygrave
- See Also:
DatabaseFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.ebean.config.ServerConfig
ServerConfig.UuidVersion
-
-
Constructor Summary
Constructors Constructor Description DatabaseConfig()
-
Method Summary
-
Methods inherited from class io.ebean.config.ServerConfig
add, add, add, add, add, add, add, addAll, addClass, addCustomMapping, addCustomMapping, addMappingLocation, addPackage, addServerConfigStartup, appliedPersistBatchOnCascade, getAsOfSysPeriod, getAsOfViewSuffix, getAutoTuneConfig, getBackgroundExecutorSchedulePoolSize, getBackgroundExecutorShutdownSecs, getBulkTableEventListeners, getCacheMaxIdleTime, getCacheMaxSize, getCacheMaxTimeToLive, getChangeLogListener, getChangeLogPrepare, getChangeLogRegister, getClasses, getClassLoadConfig, getClock, getCollectQueryPlanThresholdMicros, getConstraintNaming, getContainerConfig, getCurrentTenantProvider, getCurrentUserProvider, getDatabaseBooleanFalse, getDatabaseBooleanTrue, getDatabasePlatform, getDatabasePlatformName, getDatabaseSequenceBatchSize, getDataSource, getDataSourceConfig, getDataSourceJndiName, getDataTimeZone, getDbEncrypt, getDbSchema, getDdlInitSql, getDdlSeedSql, getDefaultEnumType, getDocStoreConfig, getDumpMetricsOptions, getEnabledL2Regions, getEncryptDeployManager, getEncryptKeyManager, getEncryptor, getExternalTransactionManager, getFindControllers, getGeometrySRID, getHistoryTableSuffix, getIdGenerators, getIdType, getJdbcFetchSizeFindEach, getJdbcFetchSizeFindList, getJodaLocalTimeMode, getJsonDate, getJsonDateTime, getJsonFactory, getJsonInclude, getLazyLoadBatchSize, getMappingLocations, getMaxCallStack, getMigrationConfig, getName, getNamingConvention, getObjectMapper, getPackages, getPersistBatch, getPersistBatchOnCascade, getPersistBatchSize, getPersistControllers, getPersistenceContextScope, getPersistListeners, getPlatformConfig, getPostConstructListeners, getPostLoaders, getProfilingConfig, getProperties, getQueryAdapters, getQueryBatchSize, getQueryCacheMaxIdleTime, getQueryCacheMaxSize, getQueryCacheMaxTimeToLive, getQueryPlanTTLSeconds, getReadAuditLogger, getReadAuditPrepare, getReadOnlyDataSource, getReadOnlyDataSourceConfig, getResourceDirectory, getServerCachePlugin, getServerConfigStartupListeners, getServiceObject, getServiceObject, getSlowQueryListener, getSlowQueryMillis, getTenantCatalogProvider, getTenantDataSourceProvider, getTenantMode, getTenantPartitionColumn, getTenantSchemaProvider, getUuidStateFile, getUuidVersion, isAllQuotedIdentifiers, isAutoLoadModuleInfo, isAutoReadOnlyDataSource, isChangeLogAsync, isChangeLogIncludeInserts, isCollectQueryPlans, isDbOffline, isDdlCreateOnly, isDdlExtra, isDdlGenerate, isDdlRun, isDefaultOrderById, isDefaultServer, isDisableClasspathSearch, isDisableL2Cache, isDisableLazyLoading, isDocStoreOnly, isDumpMetricsOnShutdown, isDurationWithNanos, isEagerFetchLobs, isExpressionEqualsWithNullAsNoop, isExpressionNativeIlike, isIdGeneratorAutomatic, isLocalOnlyL2Cache, isLocalTimeWithNanos, isNotifyL2CacheInForeground, isRegister, isSkipCacheAfterWrite, isTransactionRollbackOnChecked, isUpdateAllPropertiesInBatch, isUseJavaxValidationNotNull, isUseJtaTransactionManager, loadFromProperties, loadFromProperties, newPlatformConfig, putServiceObject, putServiceObject, runDbMigration, service, serviceLoad, setAllQuotedIdentifiers, setAsOfSysPeriod, setAsOfViewSuffix, setAutoReadOnlyDataSource, setAutoTuneConfig, setBackgroundExecutorSchedulePoolSize, setBackgroundExecutorShutdownSecs, setCacheMaxIdleTime, setCacheMaxSize, setCacheMaxTimeToLive, setChangeLogAsync, setChangeLogIncludeInserts, setChangeLogListener, setChangeLogPrepare, setChangeLogRegister, setClasses, setClassLoadConfig, setClock, setCollectQueryPlans, setCollectQueryPlanThresholdMicros, setConstraintNaming, setContainerConfig, setCurrentTenantProvider, setCurrentUserProvider, setDatabaseBooleanFalse, setDatabaseBooleanTrue, setDatabasePlatform, setDatabasePlatformName, setDatabaseSequenceBatch, setDatabaseSequenceBatchSize, setDataSource, setDataSourceConfig, setDataSourceJndiName, setDataTimeZone, setDbEncrypt, setDbOffline, setDbSchema, setDbUuid, setDdlCreateOnly, setDdlExtra, setDdlGenerate, setDdlInitSql, setDdlRun, setDdlSeedSql, setDefaultEnumType, setDefaultOrderById, setDefaultServer, setDisableClasspathSearch, setDisableL2Cache, setDisableLazyLoading, setDocStoreConfig, setDocStoreOnly, setDumpMetricsOnShutdown, setDumpMetricsOptions, setDurationWithNanos, setEagerFetchLobs, setEnabledL2Regions, setEncryptDeployManager, setEncryptKeyManager, setEncryptor, setExpressionEqualsWithNullAsNoop, setExpressionNativeIlike, setExternalTransactionManager, setFindControllers, setGeometrySRID, setHistoryTableSuffix, setIdGeneratorAutomatic, setIdGenerators, setIdType, setJdbcFetchSizeFindEach, setJdbcFetchSizeFindList, setJodaLocalTimeMode, setJsonDate, setJsonDateTime, setJsonFactory, setJsonInclude, setLazyLoadBatchSize, setLoadModuleInfo, setLocalOnlyL2Cache, setLocalTimeWithNanos, setMappingLocations, setMaxCallStack, setMigrationConfig, setName, setNamingConvention, setNotifyL2CacheInForeground, setObjectMapper, setPackages, setPersistBatch, setPersistBatching, setPersistBatchOnCascade, setPersistBatchSize, setPersistControllers, setPersistenceContextScope, setPersistListeners, setPlatformConfig, setPostConstructListeners, setPostLoaders, setProfilingConfig, setQueryAdapters, setQueryBatchSize, setQueryCacheMaxIdleTime, setQueryCacheMaxSize, setQueryCacheMaxTimeToLive, setQueryPlanTTLSeconds, setReadAuditLogger, setReadAuditPrepare, setReadOnlyDataSource, setReadOnlyDataSourceConfig, setRegister, setResourceDirectory, setRunMigration, setServerCachePlugin, setSkipCacheAfterWrite, setSlowQueryListener, setSlowQueryMillis, setTenantCatalogProvider, setTenantDataSourceProvider, setTenantMode, setTenantPartitionColumn, setTenantSchemaProvider, setTransactionRollbackOnChecked, setUpdateAllPropertiesInBatch, setUseJavaxValidationNotNull, setUseJtaTransactionManager, setUuidStateFile, setUuidVersion
-
-
-
-
Constructor Detail
-
DatabaseConfig
public DatabaseConfig()
-
-