Class ColumnMapping.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public ColumnMapping build()
        Description copied from interface: Builder
        Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.
        Specified by:
        build in interface Builder<ColumnMapping>
        Returns:
        the configured instance.
      • setLiteral

        public ColumnMapping.Builder setLiteral​(java.lang.String literal)
        Literal value to use for populating a column. This is generally useful for functions, stored procedures, etc. No escaping will be done on this value.
        Returns:
        this.
      • setParameter

        public ColumnMapping.Builder setParameter​(java.lang.String parameter)
        Parameter value to use for populating a column, MUST contain a single parameter marker '?'. This is generally useful for functions, stored procedures, etc. No escaping will be done on this value.
        Returns:
        this.
      • setSource

        public ColumnMapping.Builder setSource​(java.lang.String source)
        Source name. Useful when combined with a MapMessage depending on the appender.
        Returns:
        this.
      • setType

        public ColumnMapping.Builder setType​(java.lang.Class<?> type)
        Class to convert value to before storing in database. If the type is compatible with 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.
        Returns:
        this.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object