public List<OutgoingDraftTransactionWrapper> getAllInState(
      com.bitdubai.fermat_ccp_plugin.layer.crypto_transaction.outgoing_draft.developer.bitdubai
              .version_1.enums.TransactionState
          transactionState)
      throws CantLoadTableToMemoryException, InvalidParameterException {
    DatabaseTable transactionTable =
        this.database.getTable(OutgoingDraftTransactionDatabaseConstants.OUTGOING_DRAFT_TABLE_NAME);
    transactionTable.addStringFilter(
        OutgoingDraftTransactionDatabaseConstants.OUTGOING_DRAFT_TRANSACTION_STATUS_COLUMN_NAME,
        transactionState.getCode(),
        DatabaseFilterType.EQUAL);
    transactionTable.loadToMemory();
    List<DatabaseTableRecord> records = transactionTable.getRecords();
    transactionTable.clearAllFilters();

    return mapConvertToBT(records);
  }
  private void setToState(
      OutgoingDraftTransactionWrapper bitcoinTransaction,
      com.bitdubai.fermat_ccp_plugin.layer.crypto_transaction.outgoing_draft.developer.bitdubai
              .version_1.enums.TransactionState
          status)
      throws CantUpdateRecordException,
          com.bitdubai.fermat_ccp_plugin.layer.crypto_transaction.outgoing_draft.developer.bitdubai
              .version_1.exceptions.OutgoingIntraActorInconsistentTableStateException,
          CantLoadTableToMemoryException {
    DatabaseTable transactionTable =
        this.database.getTable(OutgoingDraftTransactionDatabaseConstants.OUTGOING_DRAFT_TABLE_NAME);
    DatabaseTableRecord recordToUpdate = getByPrimaryKey(bitcoinTransaction.getRequestId());

    recordToUpdate.setStringValue(
        OutgoingDraftTransactionDatabaseConstants.OUTGOING_DRAFT_TRANSACTION_STATUS_COLUMN_NAME,
        status.getCode());

    transactionTable.addStringFilter(
        OutgoingDraftTransactionDatabaseConstants.OUTGOING_DRAFT_TRANSACTION_ID_COLUMN_NAME,
        bitcoinTransaction.getRequestId().toString(),
        DatabaseFilterType.EQUAL);
    transactionTable.updateRecord(recordToUpdate);
  }