@NotThreadSafe public static final class ImmutablePreparedQuery.Builder extends Object
ImmutablePreparedQuery.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutablePreparedQuery |
build()
Builds a new
ImmutablePreparedQuery. |
ImmutablePreparedQuery.Builder |
dns(DnsQuery dns)
Initializes the optional value
dns to dns. |
ImmutablePreparedQuery.Builder |
dns(Optional<? extends DnsQuery> dns)
Initializes the optional value
dns to dns. |
ImmutablePreparedQuery.Builder |
from(PreparedQuery instance)
Fill a builder with attribute values from the provided
PreparedQuery instance. |
ImmutablePreparedQuery.Builder |
name(String name)
Initializes the value for the
name attribute. |
ImmutablePreparedQuery.Builder |
service(ServiceQuery service)
Initializes the value for the
service attribute. |
ImmutablePreparedQuery.Builder |
session(Optional<String> session)
Initializes the optional value
session to session. |
ImmutablePreparedQuery.Builder |
session(String session)
Initializes the optional value
session to session. |
ImmutablePreparedQuery.Builder |
template(Optional<? extends Template> template)
Initializes the optional value
template to template. |
ImmutablePreparedQuery.Builder |
template(Template template)
Initializes the optional value
template to template. |
ImmutablePreparedQuery.Builder |
token(Optional<String> token)
Initializes the optional value
token to token. |
ImmutablePreparedQuery.Builder |
token(String token)
Initializes the optional value
token to token. |
@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder from(PreparedQuery instance)
PreparedQuery instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder template(Template template)
template to template.template - The value for templatethis builder for chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder template(Optional<? extends Template> template)
template to template.template - The value for templatethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder session(String session)
session to session.session - The value for sessionthis builder for chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder session(Optional<String> session)
session to session.session - The value for sessionthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder token(String token)
token to token.token - The value for tokenthis builder for chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder token(Optional<String> token)
token to token.token - The value for tokenthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder service(ServiceQuery service)
service attribute.service - The value for servicethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder dns(DnsQuery dns)
dns to dns.dns - The value for dnsthis builder for chained invocation@CanIgnoreReturnValue public final ImmutablePreparedQuery.Builder dns(Optional<? extends DnsQuery> dns)
dns to dns.dns - The value for dnsthis builder for use in a chained invocationpublic ImmutablePreparedQuery build()
ImmutablePreparedQuery.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.