Class ResultWriterOptions.Builder
java.lang.Object
com.inductiveautomation.historian.common.model.options.ResultWriterOptions.Builder
- Enclosing class:
ResultWriterOptions
Builder for
ResultWriterOptions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHeaderAlias(String header, String alias) Adds a header alias.addHeaderAliases(Map<String, String> aliases) Adds several header aliases.build()Builds the options.columnNames(List<String> columnNames) Sets the column names by query-key position: entryinames thei-th key's column, and anullentry keeps that key's default header.jsonOutputShape(JsonOutputShape jsonOutputShape) Sets the JSON output shape.jsonOutputShape(String jsonOutputShape) Sets the JSON output shape by name.objectType(ResultWriterOptions.ObjectType objectType) Sets the object type.objectType(String resultType) Sets the object type by name.resultFormat(ResultWriterOptions.ResultFormat resultFormat) Sets the result format.resultFormat(String resultFormat) Sets the result format by name.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
objectType
Sets the object type.- Parameters:
objectType- the type.- Returns:
- this builder.
-
objectType
Sets the object type by name.- Parameters:
resultType- the type name.- Returns:
- this builder.
-
resultFormat
Sets the result format.- Parameters:
resultFormat- the format.- Returns:
- this builder.
-
resultFormat
Sets the result format by name.- Parameters:
resultFormat- the format name.- Returns:
- this builder.
-
jsonOutputShape
Sets the JSON output shape.- Parameters:
jsonOutputShape- the shape.- Returns:
- this builder.
-
jsonOutputShape
Sets the JSON output shape by name.- Parameters:
jsonOutputShape- the shape name.- Returns:
- this builder.
-
addHeaderAlias
Adds a header alias. Lookups ignore the header's case; the alias keeps its casing.- Parameters:
header- the original header name.alias- the alias shown in the result.- Returns:
- this builder.
-
addHeaderAliases
Adds several header aliases.- Parameters:
aliases- header names mapped to aliases.- Returns:
- this builder.
-
columnNames
Sets the column names by query-key position: entryinames thei-th key's column, and anullentry keeps that key's default header. Takes precedence overaddHeaderAlias(String, String), which cannot distinguish two keys that share a path.- Parameters:
columnNames- the names, in query-key order.- Returns:
- this builder.
-
build
Builds the options.- Returns:
- the new options.
- Throws:
IllegalArgumentException- if the object type is RAW and the result format is not NONE.
-