lib/src/main/java/edu/utexas/tacc/tapis/files/lib/dao/transfers/FileTransfersDAO.java
public TransferTask updateTransferTask(@NotNull TransferTask task) throws DAOException {
        RowProcessor rowProcessor = new TransferTaskRowProcessor();
        try (Connection connection = HikariConnectionPool.getConnection()) {
            BeanHandler<TransferTask> handler = new BeanHandler<>(TransferTask.class, rowProcessor);
            String stmt = FileTransfersDAOStatements.UPDATE_TRANSFER_TASK;
            QueryRunner runner = new QueryRunner();
            Timestamp startTime = null;
            Timestamp endTime = null;
            if (task.getStartTime() != null) {
                startTime = Timestamp.from(task.getStartTime());
            }
            if (task.getEndTime() != null) {
                endTime = Timestamp.from(task.getEndTime());
            }
            TransferTask updatedTask = runner.query(connection, stmt, handler,
                task.getStatus().name(),
                startTime,
                endTime,
                task.getErrorMessage(),
                task.getId());
            return updatedTask;
        } catch (SQLException ex) {
          throw new DAOException(Utils.getMsg("FILES_TXFR_DAO_ERR1", task.getTenantId(), task.getUsername(),
                  "updateTransferTask", task.getId(), task.getUuid(), ex.getMessage()), ex);
        }
    }
/**
     * This method is used to increment the total size of the transfer. As the directory
     * is recursively walked, we will add the size of the files to the current total.
     *
     * @param task
     */
This method is used to increment the total size of the transfer. As the directory
is recursively walked, we will add the size of the files to the current total.

@param task
This method is used to increment the total size of the transfer . As the directory is recursively walked we will add the size of the files to the current total . @param task
public TransferTask updateTransferTask(@NotNull TransferTask task) throws DAOException {
        RowProcessor rowProcessor = new TransferTaskRowProcessor();
        try (Connection connection = HikariConnectionPool.getConnection()) {
            BeanHandler<TransferTask> handler = new BeanHandler<>(TransferTask.class, rowProcessor);
            String stmt = FileTransfersDAOStatements.UPDATE_TRANSFER_TASK;
            QueryRunner runner = new QueryRunner();
            Timestamp startTime = null;
            Timestamp endTime = null;
            if (task.getStartTime() != null) {
                startTime = Timestamp.from(task.getStartTime());
            }
            if (task.getEndTime() != null) {
                endTime = Timestamp.from(task.getEndTime());
            }
            TransferTask updatedTask = runner.query(connection, stmt, handler,
                task.getStatus().name(),
                startTime,
                endTime,
                task.getErrorMessage(),
                task.getId());
            return updatedTask;
        } catch (SQLException ex) {
          throw new DAOException(Utils.getMsg("FILES_TXFR_DAO_ERR1", task.getTenantId(), task.getUsername(),
                  "updateTransferTask", task.getId(), task.getUuid(), ex.getMessage()), ex);
        }
    }
public TransferTask updateTransferTask ( @ NotNull TransferTask task ) throws DAOException { RowProcessor rowProcessor = new TransferTaskRowProcessor ( ) ; try ( Connection connection = HikariConnectionPool . getConnection ( ) ) { BeanHandler < TransferTask > handler = new BeanHandler < > ( TransferTask . class , rowProcessor ) ; String stmt = FileTransfersDAOStatements . UPDATE_TRANSFER_TASK ; QueryRunner runner = new QueryRunner ( ) ; Timestamp startTime = null ; Timestamp endTime = null ; if ( task . getStartTime ( ) != null ) { startTime = Timestamp . from ( task . getStartTime ( ) ) ; } if ( task . getEndTime ( ) != null ) { endTime = Timestamp . from ( task . getEndTime ( ) ) ; } TransferTask updatedTask = runner . query ( connection , stmt , handler , task . getStatus ( ) . name ( ) , startTime , endTime , task . getErrorMessage ( ) , task . getId ( ) ) ; return updatedTask ; } catch ( SQLException ex ) { throw new DAOException ( Utils . getMsg ( "FILES_TXFR_DAO_ERR1" , task . getTenantId ( ) , task . getUsername ( ) , "updateTransferTask" , task . getId ( ) , task . getUuid ( ) , ex . getMessage ( ) ) , ex ) ; } }
This method is used to increment the total size of the transfer.
This method is used to increment the total size of the transfer .