Class ImmutablePreparedQuery.Builder

  • Enclosing class:
    ImmutablePreparedQuery

    @NotThreadSafe
    public static final class ImmutablePreparedQuery.Builder
    extends java.lang.Object
    Builds instances of type 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.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder from​(PreparedQuery instance)
        Fill a builder with attribute values from the provided PreparedQuery instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • template

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder template​(Template template)
        Initializes the optional value template to template.
        Parameters:
        template - The value for template
        Returns:
        this builder for chained invocation
      • template

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder template​(java.util.Optional<? extends Template> template)
        Initializes the optional value template to template.
        Parameters:
        template - The value for template
        Returns:
        this builder for use in a chained invocation
      • name

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder name​(java.lang.String name)
        Initializes the value for the name attribute.
        Parameters:
        name - The value for name
        Returns:
        this builder for use in a chained invocation
      • session

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder session​(java.lang.String session)
        Initializes the optional value session to session.
        Parameters:
        session - The value for session
        Returns:
        this builder for chained invocation
      • session

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder session​(java.util.Optional<java.lang.String> session)
        Initializes the optional value session to session.
        Parameters:
        session - The value for session
        Returns:
        this builder for use in a chained invocation
      • token

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder token​(java.lang.String token)
        Initializes the optional value token to token.
        Parameters:
        token - The value for token
        Returns:
        this builder for chained invocation
      • token

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder token​(java.util.Optional<java.lang.String> token)
        Initializes the optional value token to token.
        Parameters:
        token - The value for token
        Returns:
        this builder for use in a chained invocation
      • service

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder service​(ServiceQuery service)
        Initializes the value for the service attribute.
        Parameters:
        service - The value for service
        Returns:
        this builder for use in a chained invocation
      • dns

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder dns​(DnsQuery dns)
        Initializes the optional value dns to dns.
        Parameters:
        dns - The value for dns
        Returns:
        this builder for chained invocation
      • dns

        @CanIgnoreReturnValue
        public final ImmutablePreparedQuery.Builder dns​(java.util.Optional<? extends DnsQuery> dns)
        Initializes the optional value dns to dns.
        Parameters:
        dns - The value for dns
        Returns:
        this builder for use in a chained invocation