class MergedSqlConfig
extends java.lang.Object
MergedSqlConfig
encapsulates the merged @SqlConfig
attributes declared locally via Sql.config()
and globally as a class-level annotation.
Explicit local configuration attributes override global configuration attributes.
SqlConfig
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
blockCommentEndDelimiter |
private java.lang.String |
blockCommentStartDelimiter |
private java.lang.String |
commentPrefix |
private java.lang.String |
dataSource |
private java.lang.String |
encoding |
private SqlConfig.ErrorMode |
errorMode |
private java.lang.String |
separator |
private java.lang.String |
transactionManager |
private SqlConfig.TransactionMode |
transactionMode |
Constructor and Description |
---|
MergedSqlConfig(SqlConfig localSqlConfig,
java.lang.Class<?> testClass)
Construct a
MergedSqlConfig instance by merging the configuration
from the supplied local (potentially method-level) @SqlConfig annotation
with class-level configuration discovered on the supplied testClass . |
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
getBlockCommentEndDelimiter() |
(package private) java.lang.String |
getBlockCommentStartDelimiter() |
(package private) java.lang.String |
getCommentPrefix() |
(package private) java.lang.String |
getDataSource() |
(package private) java.lang.String |
getEncoding() |
private static <E extends java.lang.Enum<?>> |
getEnum(AnnotationAttributes attributes,
java.lang.String attributeName,
E inheritedOrDefaultValue,
E defaultValue) |
(package private) SqlConfig.ErrorMode |
getErrorMode() |
(package private) java.lang.String |
getSeparator() |
private static java.lang.String |
getString(AnnotationAttributes attributes,
java.lang.String attributeName,
java.lang.String defaultValue) |
(package private) java.lang.String |
getTransactionManager() |
(package private) SqlConfig.TransactionMode |
getTransactionMode() |
java.lang.String |
toString()
Provide a String representation of the merged SQL script configuration.
|
private final java.lang.String dataSource
private final java.lang.String transactionManager
private final SqlConfig.TransactionMode transactionMode
private final java.lang.String encoding
private final java.lang.String separator
private final java.lang.String commentPrefix
private final java.lang.String blockCommentStartDelimiter
private final java.lang.String blockCommentEndDelimiter
private final SqlConfig.ErrorMode errorMode
MergedSqlConfig(SqlConfig localSqlConfig, java.lang.Class<?> testClass)
MergedSqlConfig
instance by merging the configuration
from the supplied local (potentially method-level) @SqlConfig
annotation
with class-level configuration discovered on the supplied testClass
.
Local configuration overrides class-level configuration.
If the test class is not annotated with @SqlConfig
, no merging
takes place and the local configuration is used "as is".
java.lang.String getDataSource()
SqlConfig.dataSource()
java.lang.String getTransactionManager()
SqlConfig.transactionManager()
SqlConfig.TransactionMode getTransactionMode()
SqlConfig.transactionMode()
java.lang.String getEncoding()
SqlConfig.encoding()
java.lang.String getSeparator()
SqlConfig.separator()
java.lang.String getCommentPrefix()
SqlConfig.commentPrefix()
java.lang.String getBlockCommentStartDelimiter()
SqlConfig.blockCommentStartDelimiter()
java.lang.String getBlockCommentEndDelimiter()
SqlConfig.blockCommentEndDelimiter()
SqlConfig.ErrorMode getErrorMode()
SqlConfig.errorMode()
public java.lang.String toString()
toString
in class java.lang.Object
private static <E extends java.lang.Enum<?>> E getEnum(AnnotationAttributes attributes, java.lang.String attributeName, E inheritedOrDefaultValue, E defaultValue)
private static java.lang.String getString(AnnotationAttributes attributes, java.lang.String attributeName, java.lang.String defaultValue)