Builder<ColumnMapping>
public static class ColumnMapping.Builder extends Object implements Builder<ColumnMapping>
ColumnMapping
.Constructor | Description |
---|---|
Builder() |
Modifier and Type | Method | Description |
---|---|---|
ColumnMapping |
build() |
Builds the object after all configuration has been set.
|
ColumnMapping.Builder |
setConfiguration(Configuration configuration) |
|
ColumnMapping.Builder |
setLayout(StringLayout layout) |
Layout of value to write to database (before type conversion).
|
ColumnMapping.Builder |
setLiteral(String literal) |
Literal value to use for populating a column.
|
ColumnMapping.Builder |
setName(String name) |
Column name.
|
ColumnMapping.Builder |
setParameter(String parameter) |
Parameter value to use for populating a column, MUST contain a single parameter marker '?'.
|
ColumnMapping.Builder |
setPattern(String pattern) |
Pattern to use as a
PatternLayout . |
ColumnMapping.Builder |
setSource(String source) |
Source name.
|
ColumnMapping.Builder |
setType(Class<?> type) |
Class to convert value to before storing in database.
|
String |
toString() |
public ColumnMapping build()
Builder
build
in interface Builder<ColumnMapping>
public ColumnMapping.Builder setConfiguration(Configuration configuration)
public ColumnMapping.Builder setLayout(StringLayout layout)
setType(Class)
is
a ReadOnlyStringMap
, ThreadContextMap
, or ThreadContextStack
.public ColumnMapping.Builder setLiteral(String literal)
public ColumnMapping.Builder setName(String name)
public ColumnMapping.Builder setParameter(String parameter)
public ColumnMapping.Builder setPattern(String pattern)
PatternLayout
. Convenient shorthand for setLayout(StringLayout)
with a
PatternLayout.public ColumnMapping.Builder setSource(String source)
MapMessage
depending on the
appender.public ColumnMapping.Builder setType(Class<?> type)
ThreadContextMap
or
ReadOnlyStringMap
, then the MDC will be used. If the type is compatible with ThreadContextStack
,
then the NDC will be used. If the type is compatible with Date
, then the event timestamp will be used.Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.