Top Description Methods
org.jooq

public Interface FormattingProvider

Known Direct Implementers
org.jooq.impl.CallbackFormattingProvider, org.jooq.impl.DefaultFormattingProvider
Imports
java.util.function.Supplier, .ToIntFunction, org.jooq.impl.CallbackFormattingProvider, .DefaultFormattingProvider, org.jetbrains.annotations.NotNull

An SPI that allows for overriding certain formatting defaults.

For convenience, consider extending DefaultFormattingProvider instead of implementing this interface. This will prevent compilation errors in future versions of jOOQ, when this interface might get new methods.

Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public @NotNull ChartFormat
chartFormat()

The ChartFormat to use when calling Formattable#formatChart() and related methods, defaulting to ChartFormat#DEFAULT.

public @NotNull CSVFormat
csvFormat()

The CSVFormat to use when calling Formattable#formatCSV() and related methods, defaulting to CSVFormat#DEFAULT.

public @NotNull JSONFormat
jsonFormatForRecords()

The JSONFormat to use when calling Formattable#formatJSON() and related methods on records, defaulting to JSONFormat#DEFAULT_FOR_RECORDS.

public @NotNull JSONFormat
jsonFormatForResults()

The JSONFormat to use when calling Formattable#formatJSON() and related methods on results, defaulting to JSONFormat#DEFAULT_FOR_RESULTS.

public static @NotNull CallbackFormattingProvider
onChartFormat(Supplier<? extends ChartFormat> newOnChartFormat)

Create an FormattingProvider with a chartFormat() implementation.

public static @NotNull CallbackFormattingProvider
onCsvFormat(Supplier<? extends CSVFormat> newOnCsvFormat)

Create an FormattingProvider with a csvFormat() implementation.

public static @NotNull CallbackFormattingProvider
onJsonFormatForRecords(Supplier<? extends JSONFormat> newOnJsonFormatForRecords)

Create an FormattingProvider with a jsonFormatForRecords() implementation.

public static @NotNull CallbackFormattingProvider
onJsonFormatForResults(Supplier<? extends JSONFormat> newOnJsonFormatForResults)

Create an FormattingProvider with a jsonFormatForResults() implementation.

public static @NotNull CallbackFormattingProvider
onTxtFormat(Supplier<? extends TXTFormat> newOnTxtFormat)

Create an FormattingProvider with a txtFormat() implementation.

public static @NotNull CallbackFormattingProvider
onWidth(ToIntFunction<? super String> newOnWidth)

Create an FormattingProvider with a width(String) implementation.

public static @NotNull CallbackFormattingProvider
onXmlFormatForRecords(Supplier<? extends XMLFormat> newOnXmlFormatForRecords)

Create an FormattingProvider with a xmlFormatForRecords() implementation.

public static @NotNull CallbackFormattingProvider
onXmlFormatForResults(Supplier<? extends XMLFormat> newOnXmlFormatForResults)

Create an FormattingProvider with a xmlFormatForResults() implementation.

public @NotNull TXTFormat
txtFormat()

The TXTFormat to use when calling Formattable#format() and related methods, defaulting to TXTFormat#DEFAULT.

public int
width(String string)

The formatting display width in a monospaced font, which may diverge from String#length() e.g. if the string contains a Character#isIdeographic(int) character.

public @NotNull XMLFormat
xmlFormatForRecords()

The XMLFormat to use when calling Formattable#formatXML() and related methods on records, defaulting to XMLFormat#DEFAULT_FOR_RECORDS.

public @NotNull XMLFormat
xmlFormatForResults()

The XMLFormat to use when calling Formattable#formatXML() and related methods on results, defaulting to XMLFormat#DEFAULT_FOR_RESULTS.

Method Detail

chartFormatback to summary
public @NotNull ChartFormat chartFormat()

The ChartFormat to use when calling Formattable#formatChart() and related methods, defaulting to ChartFormat#DEFAULT.

Annotations
@NotNull
csvFormatback to summary
public @NotNull CSVFormat csvFormat()

The CSVFormat to use when calling Formattable#formatCSV() and related methods, defaulting to CSVFormat#DEFAULT.

Annotations
@NotNull
jsonFormatForRecordsback to summary
public @NotNull JSONFormat jsonFormatForRecords()

The JSONFormat to use when calling Formattable#formatJSON() and related methods on records, defaulting to JSONFormat#DEFAULT_FOR_RECORDS.

Annotations
@NotNull
jsonFormatForResultsback to summary
public @NotNull JSONFormat jsonFormatForResults()

The JSONFormat to use when calling Formattable#formatJSON() and related methods on results, defaulting to JSONFormat#DEFAULT_FOR_RESULTS.

Annotations
@NotNull
onChartFormatback to summary
public static @NotNull CallbackFormattingProvider onChartFormat(Supplier<? extends ChartFormat> newOnChartFormat)

Create an FormattingProvider with a chartFormat() implementation.

Annotations
@NotNull
onCsvFormatback to summary
public static @NotNull CallbackFormattingProvider onCsvFormat(Supplier<? extends CSVFormat> newOnCsvFormat)

Create an FormattingProvider with a csvFormat() implementation.

Annotations
@NotNull
onJsonFormatForRecordsback to summary
public static @NotNull CallbackFormattingProvider onJsonFormatForRecords(Supplier<? extends JSONFormat> newOnJsonFormatForRecords)

Create an FormattingProvider with a jsonFormatForRecords() implementation.

Annotations
@NotNull
onJsonFormatForResultsback to summary
public static @NotNull CallbackFormattingProvider onJsonFormatForResults(Supplier<? extends JSONFormat> newOnJsonFormatForResults)

Create an FormattingProvider with a jsonFormatForResults() implementation.

Annotations
@NotNull
onTxtFormatback to summary
public static @NotNull CallbackFormattingProvider onTxtFormat(Supplier<? extends TXTFormat> newOnTxtFormat)

Create an FormattingProvider with a txtFormat() implementation.

Annotations
@NotNull
onWidthback to summary
public static @NotNull CallbackFormattingProvider onWidth(ToIntFunction<? super String> newOnWidth)

Create an FormattingProvider with a width(String) implementation.

Annotations
@NotNull
onXmlFormatForRecordsback to summary
public static @NotNull CallbackFormattingProvider onXmlFormatForRecords(Supplier<? extends XMLFormat> newOnXmlFormatForRecords)

Create an FormattingProvider with a xmlFormatForRecords() implementation.

Annotations
@NotNull
onXmlFormatForResultsback to summary
public static @NotNull CallbackFormattingProvider onXmlFormatForResults(Supplier<? extends XMLFormat> newOnXmlFormatForResults)

Create an FormattingProvider with a xmlFormatForResults() implementation.

Annotations
@NotNull
txtFormatback to summary
public @NotNull TXTFormat txtFormat()

The TXTFormat to use when calling Formattable#format() and related methods, defaulting to TXTFormat#DEFAULT.

Annotations
@NotNull
widthback to summary
public int width(String string)

The formatting display width in a monospaced font, which may diverge from String#length() e.g. if the string contains a Character#isIdeographic(int) character.

xmlFormatForRecordsback to summary
public @NotNull XMLFormat xmlFormatForRecords()

The XMLFormat to use when calling Formattable#formatXML() and related methods on records, defaulting to XMLFormat#DEFAULT_FOR_RECORDS.

Annotations
@NotNull
xmlFormatForResultsback to summary
public @NotNull XMLFormat xmlFormatForResults()

The XMLFormat to use when calling Formattable#formatXML() and related methods on results, defaulting to XMLFormat#DEFAULT_FOR_RESULTS.

Annotations
@NotNull