Package io.micronaut.data.jdbc.config
Class DataJdbcConfiguration
java.lang.Object
io.micronaut.data.jdbc.config.DataJdbcConfiguration
- All Implemented Interfaces:
io.micronaut.core.naming.Named
,io.micronaut.core.util.Toggleable
@EachProperty(value="datasources",
primary="default")
public class DataJdbcConfiguration
extends Object
implements io.micronaut.core.naming.Named, io.micronaut.core.util.Toggleable
Configuration for Data JDBC.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull String
getName()
@Nullable String
boolean
boolean
boolean
void
setAllowConnectionPerOperation
(boolean allowConnectionPerOperation) void
setBatchGenerate
(boolean batchGenerate) void
setDialect
(Dialect dialect) Sets the dialect.void
setEnabled
(boolean enabled) Sets an indicator telling whether data source is enabled.void
setPackages
(List<String> packages) Sets the packages to include use for the purposes of schema generation.void
setSchemaGenerate
(SchemaGenerate schemaGenerate) Sets the schema generation strategy.void
setSchemaGenerateName
(@Nullable String schemaGenerateName) void
setSchemaGenerateNames
(@Nullable List<String> schemaGenerateNames)
-
Field Details
-
PREFIX
The prefix to use.- See Also:
-
-
Constructor Details
-
DataJdbcConfiguration
The configuration.- Parameters:
name
- The configuration name
-
-
Method Details
-
getSchemaGenerate
- Returns:
- The schema generation strategy.
-
setSchemaGenerate
Sets the schema generation strategy.- Parameters:
schemaGenerate
- The schema generation strategy.
-
isBatchGenerate
public boolean isBatchGenerate()- Returns:
- Whether to generate tables in batch.
-
setBatchGenerate
public void setBatchGenerate(boolean batchGenerate) - Parameters:
batchGenerate
- Whether to generate tables in batch.
-
getPackages
- Returns:
- The packages to include use for the purposes of schema generation.
-
setPackages
Sets the packages to include use for the purposes of schema generation.- Parameters:
packages
- The packages
-
getDialect
- Returns:
- The dialect to use.
-
setDialect
Sets the dialect.- Parameters:
dialect
- The dialect
-
getName
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
-
isAllowConnectionPerOperation
public boolean isAllowConnectionPerOperation()- Returns:
- true if property is set
-
setAllowConnectionPerOperation
public void setAllowConnectionPerOperation(boolean allowConnectionPerOperation) - Parameters:
allowConnectionPerOperation
- The property
-
getSchemaGenerateName
- Returns:
- The schema name that should be used for generating
-
setSchemaGenerateName
- Parameters:
schemaGenerateName
- The schema name that should be used for generating
-
getSchemaGenerateNames
- Returns:
- The schema names that should be used for generating
-
setSchemaGenerateNames
- Parameters:
schemaGenerateNames
- The schema names that should be used for generating
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets an indicator telling whether data source is enabled.- Parameters:
enabled
- an indicator telling whether data source is enabled
-