Class ResultWriterOptions.Builder
java.lang.Object
com.inductiveautomation.historian.common.model.options.ResultWriterOptions.Builder
- Enclosing class:
- ResultWriterOptions
A builder class for constructing instances of
ResultWriterOptions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHeaderAlias(String header, String alias) Adds a header alias to the query result.addHeaderAliases(Map<String, String> aliases) Adds multiple header aliases to the query result.build()Builds and returns a newResultWriterOptionsinstance.objectType(ResultWriterOptions.ObjectType objectType) Sets the object type for the query result.objectType(String resultType) Sets the object type for the query result using a string.resultFormat(ResultWriterOptions.ResultFormat resultFormat) Sets the format of the query result.resultFormat(String resultFormat) Sets the format of the query result using a string.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
objectType
Sets the object type for the query result.- Parameters:
objectType- TheResultWriterOptions.ObjectTypeto set.- Returns:
- This
Builderinstance for method chaining.
-
objectType
Sets the object type for the query result using a string.- Parameters:
resultType- The string representation of the object type.- Returns:
- This
Builderinstance for method chaining.
-
resultFormat
Sets the format of the query result.- Parameters:
resultFormat- TheResultWriterOptions.ResultFormatto set.- Returns:
- This
Builderinstance for method chaining.
-
resultFormat
Sets the format of the query result using a string.- Parameters:
resultFormat- The string representation of the result format.- Returns:
- This
Builderinstance for method chaining.
-
addHeaderAlias
Adds a header alias to the query result.- Parameters:
header- The original header name.alias- The alias for the header.- Returns:
- This
Builderinstance for method chaining.
-
addHeaderAliases
Adds multiple header aliases to the query result.- Parameters:
aliases- AMapof header names to aliases.- Returns:
- This
Builderinstance for method chaining.
-
build
Builds and returns a newResultWriterOptionsinstance.- Returns:
- A new
ResultWriterOptions. - Throws:
IllegalArgumentException- if the object type is RAW and the result format is not NONE.
-