org.catools.etl.dao.CEtlStatusDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of etl Show documentation
Show all versions of etl Show documentation
The base ETL to be used in other CATools project as a base contract.
package org.catools.etl.dao;
import org.catools.etl.model.CEtlStatus;
import org.hibernate.annotations.QueryHints;
import org.slf4j.Logger;
public class CEtlStatusDao extends CEtlBaseDao {
public static CEtlStatus getStatusById(Logger logger, String id) {
return find(logger, CEtlStatus.class, id);
}
public static void mergeStatus(Logger logger, CEtlStatus status) {
merge(logger, status);
}
public static CEtlStatus getStatusByName(Logger logger, String name) {
return getTransactionResult(logger, session -> {
return session.createNamedQuery("getStatusByName", CEtlStatus.class)
.setParameter("name", name)
.setHint(QueryHints.CACHEABLE, true)
.getResultStream()
.findFirst()
.orElse(null);
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy