code: public void transactionWrite(TransactionWriteRequest transactionWriteRequest) {
          for (TransactionWriteRequest.TransactionWriteOperation transactionWriteOperation : transactionWriteRequest.getTransactionWriteOperations()) {
              if (!model.targetType().equals(transactionWriteOperation.getObject().getClass())) {
                  throw new DynamoDBMappingException("Input object is of the classType: " + transactionWriteOperation.getObject().getClass()
                                                             + " but tableMapper is declared with classType: " + model.targetType());
              }
          }
          mapper.transactionWrite(transactionWriteRequest);
      }
docs: Transactionally writes objects specified by transactionWriteRequest by calling
  {@link com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#transactionWrite(TransactionWriteRequest)} API.
  @param transactionWriteRequest List of objects to write
  @see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#transactionWrite(TransactionWriteRequest)