public class BinaryObjectBuilderImpl extends Object implements BinaryObjectBuilder
| Constructor and Description |
|---|
BinaryObjectBuilderImpl(BinaryContext ctx,
int typeId,
String typeName) |
BinaryObjectBuilderImpl(BinaryContext ctx,
String clsName) |
BinaryObjectBuilderImpl(BinaryObjectImpl obj) |
| Modifier and Type | Method and Description |
|---|---|
void |
affinityFieldName(String affFieldName)
Set known affinity key field name.
|
BinaryObject |
build()
Builds binary object.
|
<T> T |
getField(String name)
Returns value assigned to the specified field.
|
BinaryObjectBuilderImpl |
removeField(String name)
Removes field from binary object.
|
BinaryObjectBuilder |
setField(String name,
@Nullable BinaryObjectBuilder builder)
Sets field value.
|
BinaryObjectBuilder |
setField(String name,
Object val0)
Sets field value.
|
<T> BinaryObjectBuilder |
setField(String name,
T val,
Class<? super T> type)
Sets field value with value type specification.
|
int |
typeId() |
static BinaryObjectBuilderImpl |
wrap(BinaryObject obj)
Creates builder initialized by specified binary object.
|
public BinaryObjectBuilderImpl(BinaryContext ctx, String clsName)
clsName - Class name.ctx - Binary context.public BinaryObjectBuilderImpl(BinaryContext ctx, int typeId, String typeName)
typeName - Type name.ctx - Context.typeId - Type id.public BinaryObjectBuilderImpl(BinaryObjectImpl obj)
obj - Object to wrap.public BinaryObject build()
build in interface BinaryObjectBuilderpublic <T> T getField(String name)
BinaryObjectBuilder will be returned,
which can be modified.
Collections and maps returned from this method are modifiable.
getField in interface BinaryObjectBuildername - Field name.public BinaryObjectBuilder setField(String name, Object val0)
setField in interface BinaryObjectBuildername - Field name.val0 - Field value (cannot be null).BinaryObject.type()public <T> BinaryObjectBuilder setField(String name, @Nullable T val, Class<? super T> type)
Field type is needed for proper metadata update.
setField in interface BinaryObjectBuildername - Field name.val - Field value.type - Field type.BinaryObject.type()public BinaryObjectBuilder setField(String name, @Nullable @Nullable BinaryObjectBuilder builder)
This method should be used if field is binary object.
setField in interface BinaryObjectBuildername - Field name.builder - Builder for object field.public BinaryObjectBuilderImpl removeField(String name)
removeField in interface BinaryObjectBuildername - Field name.this instance for chaining.public static BinaryObjectBuilderImpl wrap(BinaryObject obj)
obj - Binary object to initialize builder.public int typeId()
public void affinityFieldName(String affFieldName)
affFieldName - Affinity key field name.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020