package org.wso2.security.tools.scanmanager.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.wso2.security.tools.scanmanager.controller.ScanController;
import org.wso2.security.tools.scanmanager.model.Log;
/**
 * The class {@code LogDAOImpl} is the DAO class that manage the persistence method implementations of the,
 * Scan logs.
 */
@Repository
public class LogDAOImpl implements LogDAO {
    private static final Logger logger = LoggerFactory.getLogger(LogDAOImpl.class);

    @Autowired
    private SessionFactory sessionFactory;

    @Override
    public boolean persist(Log log) {
        boolean status = true;
        try {
            Session currentSession = sessionFactory.getCurrentSession();
            currentSession.saveOrUpdate(log);
            logger.debug("log is successfully persists");
        } catch (Exception ex) {
            //needs to handle exception
            logger.error("Error occurred while persisting logs from DAO", ex);
            status = false;
        }
        return status;
    }
}

@@ -734,16 +734,101 @@
 ctory;%0A%0A
+    /**%0A     * Persist logs.%0A     *%0A     * @param Log %0A     * @return status%0A     */%0A
     @Ove

Update LogDAOImpl.java