Class 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 specific TransactionMapper registered 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.JsonHelper getJsonHelper()  
      io.nem.sdk.model.transaction.TransactionType getTransactionType()
      The type of transactions this mapper supports.
      io.nem.sdk.openapi.okhttp_gson.model.TransactionInfoDTO map​(io.nem.sdk.model.transaction.Transaction transaction)
      It maps an transaction to an DTO transaction.
      io.nem.sdk.model.transaction.Transaction map​(io.nem.sdk.openapi.okhttp_gson.model.EmbeddedTransactionInfoDTO transactionInfoDTO)
      It maps an embedded transaction included in an aggregate transaction.
      io.nem.sdk.model.transaction.Transaction map​(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.EmbeddedTransactionInfoDTO mapToEmbedded​(io.nem.sdk.model.transaction.Transaction transaction)
      It maps an inner transaction to an embedded DTO transaction.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeneralTransactionMapper

        public GeneralTransactionMapper​(io.nem.sdk.model.transaction.JsonHelper jsonHelper)
    • Method Detail

      • map

        public io.nem.sdk.model.transaction.Transaction map​(io.nem.sdk.openapi.okhttp_gson.model.EmbeddedTransactionInfoDTO transactionInfoDTO)
        Description copied from interface: TransactionMapper
        It maps an embedded transaction included in an aggregate transaction.
        Specified by:
        map in interface TransactionMapper
        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: TransactionMapper
        It maps a general transaction included in a top level json response.
        Specified by:
        map in interface TransactionMapper
        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: TransactionMapper
        It maps an inner transaction to an embedded DTO transaction.
        Specified by:
        mapToEmbedded in interface TransactionMapper
        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: TransactionMapper
        It maps an transaction to an DTO transaction.
        Specified by:
        map in interface TransactionMapper
        Parameters:
        transaction - the the general transaction
        Returns:
        the TransactionInfoDTO
      • getTransactionType

        public io.nem.sdk.model.transaction.TransactionType getTransactionType()
        Description copied from interface: TransactionMapper
        The type of transactions this mapper supports.
        Specified by:
        getTransactionType in interface TransactionMapper
        Returns:
        the supported transaction type or null if supports all.
      • getJsonHelper

        public io.nem.sdk.model.transaction.JsonHelper getJsonHelper()