Class GeneralTransactionMapper
- java.lang.Object
-
- io.nem.sdk.infrastructure.okhttp.mappers.GeneralTransactionMapper
-
- All Implemented Interfaces:
TransactionMapper
public class GeneralTransactionMapper extends java.lang.Object implements TransactionMapper
Entry point for the transaction mapping. This mapper should support all the known transactions. It's basically a delegator to the specificTransactionMapperregistered in this object.
-
-
Constructor Summary
Constructors Constructor Description GeneralTransactionMapper(io.nem.sdk.model.transaction.JsonHelper jsonHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.nem.sdk.model.transaction.JsonHelpergetJsonHelper()io.nem.sdk.model.transaction.TransactionTypegetTransactionType()The type of transactions this mapper supports.io.nem.sdk.openapi.okhttp_gson.model.TransactionInfoDTOmap(io.nem.sdk.model.transaction.Transaction transaction)It maps an transaction to an DTO transaction.io.nem.sdk.model.transaction.Transactionmap(io.nem.sdk.openapi.okhttp_gson.model.EmbeddedTransactionInfoDTO transactionInfoDTO)It maps an embedded transaction included in an aggregate transaction.io.nem.sdk.model.transaction.Transactionmap(io.nem.sdk.openapi.okhttp_gson.model.TransactionInfoDTO transactionInfoDTO)It maps a general transaction included in a top level json response.io.nem.sdk.openapi.okhttp_gson.model.EmbeddedTransactionInfoDTOmapToEmbedded(io.nem.sdk.model.transaction.Transaction transaction)It maps an inner transaction to an embedded DTO transaction.
-
-
-
Method Detail
-
map
public io.nem.sdk.model.transaction.Transaction map(io.nem.sdk.openapi.okhttp_gson.model.EmbeddedTransactionInfoDTO transactionInfoDTO)
Description copied from interface:TransactionMapperIt maps an embedded transaction included in an aggregate transaction.- Specified by:
mapin interfaceTransactionMapper- Parameters:
transactionInfoDTO- the embedded transaction- Returns:
- the
Transaction
-
map
public io.nem.sdk.model.transaction.Transaction map(io.nem.sdk.openapi.okhttp_gson.model.TransactionInfoDTO transactionInfoDTO)
Description copied from interface:TransactionMapperIt maps a general transaction included in a top level json response.- Specified by:
mapin interfaceTransactionMapper- Parameters:
transactionInfoDTO- the the general transaction- Returns:
- the
Transaction
-
mapToEmbedded
public io.nem.sdk.openapi.okhttp_gson.model.EmbeddedTransactionInfoDTO mapToEmbedded(io.nem.sdk.model.transaction.Transaction transaction)
Description copied from interface:TransactionMapperIt maps an inner transaction to an embedded DTO transaction.- Specified by:
mapToEmbeddedin interfaceTransactionMapper- Parameters:
transaction- the transaction.- Returns:
- the
EmbeddedTransactionInfoDTO
-
map
public io.nem.sdk.openapi.okhttp_gson.model.TransactionInfoDTO map(io.nem.sdk.model.transaction.Transaction transaction)
Description copied from interface:TransactionMapperIt maps an transaction to an DTO transaction.- Specified by:
mapin interfaceTransactionMapper- Parameters:
transaction- the the general transaction- Returns:
- the
TransactionInfoDTO
-
getTransactionType
public io.nem.sdk.model.transaction.TransactionType getTransactionType()
Description copied from interface:TransactionMapperThe type of transactions this mapper supports.- Specified by:
getTransactionTypein interfaceTransactionMapper- Returns:
- the supported transaction type or null if supports all.
-
getJsonHelper
public io.nem.sdk.model.transaction.JsonHelper getJsonHelper()
-
-