All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.catools.etl.dao.CEtlProjectDao Maven / Gradle / Ivy

There is a newer version: 0.1.25
Show newest version
package org.catools.etl.dao;

import org.slf4j.Logger;
import org.catools.etl.model.CEtlProject;
import org.catools.etl.model.CEtlProjects;
import org.hibernate.annotations.QueryHints;

public class CEtlProjectDao extends CEtlBaseDao {
    public static void mergeProject(Logger logger, CEtlProject project) {
        persist(logger, project);
    }

    public static CEtlProject getProjectById(Logger logger, String id) {
        return find(logger, CEtlProject.class, id);
    }

    public static CEtlProjects getProjects(Logger logger) {
        return getTransactionResult(logger, session -> {
            return new CEtlProjects(session.createQuery("From CEtlProject", CEtlProject.class).setHint(QueryHints.CACHEABLE, true).getResultList());
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy