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

io.robe.admin.hibernate.dao.QuartzTriggerDao Maven / Gradle / Ivy

There is a newer version: 0.5.0.0-1039
Show newest version
package io.robe.admin.hibernate.dao;

import javax.inject.Inject;
import io.robe.admin.quartz.hibernate.TriggerEntity;
import io.robe.hibernate.dao.BaseDao;
import org.hibernate.Criteria;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;

import java.util.List;

public class QuartzTriggerDao extends BaseDao {
    /**
     * Constructor with session factory injection by guice
     *
     * @param sessionFactory injected session factory
     */
    @Inject
    public QuartzTriggerDao(SessionFactory sessionFactory) {
        super(sessionFactory);
    }


    public List findByJobOid(String jobOid) {
        Criteria criteria = currentSession().createCriteria(TriggerEntity.class);
        criteria.add(Restrictions.eq("jobOid", jobOid));
        return list(criteria);

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy