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 newResultWriterOptions
instance.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.ObjectType
to set.- Returns:
- This
Builder
instance 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
Builder
instance for method chaining.
-
resultFormat
Sets the format of the query result.- Parameters:
resultFormat
- TheResultWriterOptions.ResultFormat
to set.- Returns:
- This
Builder
instance 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
Builder
instance 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
Builder
instance for method chaining.
-
addHeaderAliases
Adds multiple header aliases to the query result.- Parameters:
aliases
- AMap
of header names to aliases.- Returns:
- This
Builder
instance for method chaining.
-
build
Builds and returns a newResultWriterOptions
instance.- Returns:
- A new
ResultWriterOptions
. - Throws:
IllegalArgumentException
- if the object type is RAW and the result format is not NONE.
-