Package io.nem.symbol.catapult.builders
Class EmbeddedAccountMetadataTransactionBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.EmbeddedTransactionHeaderBuilder
-
- io.nem.symbol.catapult.builders.EmbeddedTransactionBuilder
-
- io.nem.symbol.catapult.builders.EmbeddedAccountMetadataTransactionBuilder
-
- All Implemented Interfaces:
Serializer
public class EmbeddedAccountMetadataTransactionBuilder extends EmbeddedTransactionBuilder implements Serializer
Binary layout for an embedded account metadata transaction
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEmbeddedAccountMetadataTransactionBuilder(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, KeyDto targetPublicKey, long scopedMetadataKey, short valueSizeDelta, java.nio.ByteBuffer value)Constructor.protectedEmbeddedAccountMetadataTransactionBuilder(java.io.DataInputStream stream)Constructor - Creates an object from stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EmbeddedAccountMetadataTransactionBuildercreate(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, KeyDto targetPublicKey, long scopedMetadataKey, short valueSizeDelta, java.nio.ByteBuffer value)Creates an instance of EmbeddedAccountMetadataTransactionBuilder.AccountMetadataTransactionBodyBuildergetBody()Gets the body builder of the object.longgetScopedMetadataKey()Gets metadata key scoped to source, target and type.intgetSize()Gets the size of the object.KeyDtogetTargetPublicKey()Gets metadata target public key.java.nio.ByteBuffergetValue()Gets difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).shortgetValueSizeDelta()Gets change in value size in bytes.static EmbeddedAccountMetadataTransactionBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of EmbeddedAccountMetadataTransactionBuilder from a stream.byte[]serialize()Serializes an object to bytes.-
Methods inherited from class io.nem.symbol.catapult.builders.EmbeddedTransactionBuilder
create, getEntityBody_Reserved1, getNetwork, getSignerPublicKey, getType, getVersion
-
Methods inherited from class io.nem.symbol.catapult.builders.EmbeddedTransactionHeaderBuilder
create, getEmbeddedTransactionHeader_Reserved1, getStreamSize
-
-
-
-
Constructor Detail
-
EmbeddedAccountMetadataTransactionBuilder
protected EmbeddedAccountMetadataTransactionBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
EmbeddedAccountMetadataTransactionBuilder
protected EmbeddedAccountMetadataTransactionBuilder(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, KeyDto targetPublicKey, long scopedMetadataKey, short valueSizeDelta, java.nio.ByteBuffer value)
Constructor.- Parameters:
signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.targetPublicKey- Metadata target public key.scopedMetadataKey- Metadata key scoped to source, target and type.valueSizeDelta- Change in value size in bytes.value- Difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).
-
-
Method Detail
-
loadFromBinary
public static EmbeddedAccountMetadataTransactionBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of EmbeddedAccountMetadataTransactionBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of EmbeddedAccountMetadataTransactionBuilder.
-
create
public static EmbeddedAccountMetadataTransactionBuilder create(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, KeyDto targetPublicKey, long scopedMetadataKey, short valueSizeDelta, java.nio.ByteBuffer value)
Creates an instance of EmbeddedAccountMetadataTransactionBuilder.- Parameters:
signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.targetPublicKey- Metadata target public key.scopedMetadataKey- Metadata key scoped to source, target and type.valueSizeDelta- Change in value size in bytes.value- Difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).- Returns:
- Instance of EmbeddedAccountMetadataTransactionBuilder.
-
getTargetPublicKey
public KeyDto getTargetPublicKey()
Gets metadata target public key.- Returns:
- Metadata target public key.
-
getScopedMetadataKey
public long getScopedMetadataKey()
Gets metadata key scoped to source, target and type.- Returns:
- Metadata key scoped to source, target and type.
-
getValueSizeDelta
public short getValueSizeDelta()
Gets change in value size in bytes.- Returns:
- Change in value size in bytes.
-
getValue
public java.nio.ByteBuffer getValue()
Gets difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).- Returns:
- Difference between existing value and new value \note when there is no existing value, new value is same this value \note when there is an existing value, new value is calculated as xor(previous-value, value).
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Overrides:
getSizein classEmbeddedTransactionBuilder- Returns:
- Size in bytes.
-
getBody
public AccountMetadataTransactionBodyBuilder getBody()
Gets the body builder of the object.- Overrides:
getBodyin classEmbeddedTransactionBuilder- Returns:
- Body builder.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Overrides:
serializein classEmbeddedTransactionBuilder- Returns:
- Serialized bytes.
-
-