Interface DynamicMessageBuilder


  • @Deprecated
    @NotThreadSafe
    public interface DynamicMessageBuilder
    Deprecated.
    Interface to hide away the annoying details of building a Dynamic Message from a descriptor. TODO (yhatem) if we want to keep using this API, we can now heavily simplify it, because we can easily deduce the descriptor of a nested field using the fields _name_ instead of, somewhat incorrectly, using the descriptor name (the struct reference), since that's an internal representation. See usages of this this API in some tests such as SimpleDirectAccessInsertionTests for more information.
    • Method Detail

      • getFieldNames

        java.util.Set<java.lang.String> getFieldNames()
        Deprecated.
      • getFieldType

        java.lang.String getFieldType​(java.lang.String fieldName)
                               throws java.sql.SQLException
        Deprecated.
        Get the type for the specified field, or throw an error if the field doesn't exist.
        Parameters:
        fieldName - the name of the field to get the type for
        Returns:
        the string name of the type that the field is.
        Throws:
        java.sql.SQLException - with ErrorCode.INVALID_PARAMETER if the field does not exist.
      • isPrimitive

        boolean isPrimitive​(int fieldNumber)
                     throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • setField

        DynamicMessageBuilder setField​(java.lang.String fieldName,
                                       java.lang.Object value)
                                throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • setField

        DynamicMessageBuilder setField​(int fieldNumber,
                                       java.lang.Object value)
                                throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • addRepeatedField

        DynamicMessageBuilder addRepeatedField​(java.lang.String fieldName,
                                               java.lang.Object value)
                                        throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • addRepeatedField

        DynamicMessageBuilder addRepeatedField​(int fieldNumber,
                                               java.lang.Object value)
                                        throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • addRepeatedFields

        DynamicMessageBuilder addRepeatedFields​(java.lang.String fieldName,
                                                java.lang.Iterable<? extends java.lang.Object> value,
                                                boolean isNullableArray)
                                         throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • addRepeatedFields

        DynamicMessageBuilder addRepeatedFields​(java.lang.String fieldName,
                                                java.lang.Iterable<? extends java.lang.Object> value)
                                         throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • addRepeatedFields

        DynamicMessageBuilder addRepeatedFields​(int fieldNumber,
                                                java.lang.Iterable<? extends java.lang.Object> value)
                                         throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • build

        Message build()
        Deprecated.
      • convertMessage

        <T extends MessageMessage convertMessage​(T m)
                                            throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • getNestedMessageBuilder

        DynamicMessageBuilder getNestedMessageBuilder​(java.lang.String fieldName)
                                               throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException
      • getNestedMessageBuilder

        DynamicMessageBuilder getNestedMessageBuilder​(int fieldNumber)
                                               throws java.sql.SQLException
        Deprecated.
        Throws:
        java.sql.SQLException