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 asSimpleDirectAccessInsertionTests
for more information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DynamicMessageBuilder
addRepeatedField(int fieldNumber, java.lang.Object value)
Deprecated.DynamicMessageBuilder
addRepeatedField(java.lang.String fieldName, java.lang.Object value)
Deprecated.DynamicMessageBuilder
addRepeatedFields(int fieldNumber, java.lang.Iterable<? extends java.lang.Object> value)
Deprecated.DynamicMessageBuilder
addRepeatedFields(java.lang.String fieldName, java.lang.Iterable<? extends java.lang.Object> value)
Deprecated.DynamicMessageBuilder
addRepeatedFields(java.lang.String fieldName, java.lang.Iterable<? extends java.lang.Object> value, boolean isNullableArray)
Deprecated.Message
build()
Deprecated.<T extends Message>
MessageconvertMessage(T m)
Deprecated.Descriptors.Descriptor
getDescriptor()
Deprecated.java.util.Set<java.lang.String>
getFieldNames()
Deprecated.java.lang.String
getFieldType(java.lang.String fieldName)
Deprecated.Get the type for the specified field, or throw an error if the field doesn't exist.DynamicMessageBuilder
getNestedMessageBuilder(int fieldNumber)
Deprecated.DynamicMessageBuilder
getNestedMessageBuilder(java.lang.String fieldName)
Deprecated.boolean
isPrimitive(int fieldNumber)
Deprecated.DynamicMessageBuilder
newBuilder()
Deprecated.DynamicMessageBuilder
setField(int fieldNumber, java.lang.Object value)
Deprecated.DynamicMessageBuilder
setField(java.lang.String fieldName, java.lang.Object value)
Deprecated.
-
-
-
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
- withErrorCode.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 Message> Message 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
-
getDescriptor
Descriptors.Descriptor getDescriptor()
Deprecated.
-
newBuilder
@Nonnull DynamicMessageBuilder newBuilder()
Deprecated.
-
-