Example usage for org.hibernate.criterion Restrictions ge

List of usage examples for org.hibernate.criterion Restrictions ge

Introduction

In this page you can find the example usage for org.hibernate.criterion Restrictions ge.

Prototype

public static SimpleExpression ge(String propertyName, Object value) 

Source Link

Document

Apply a "greater than or equal" constraint to the named property

Usage

From source file:com.mycompany.CRMFly.hibernateAccess.ProjectsDAOImpl.java

public List<Projects> getProjectsForEmployeeOnDate(Long id, Date date) {
    org.hibernate.Session sess = sessionFactory.getCurrentSession();
    sess.enableFetchProfile("projects-with-employees");
    return sess.createCriteria(Projects.class).add(Restrictions.le("begin_date", date))
            .add(Restrictions.ge("end_date", date)).createCriteria("participants")
            .add(Restrictions.eq("id", id)).list();
}

From source file:com.mycompany.rosterms.dao.impl.ContactPersonDetailsDAOIMPL.java

@Override
public ContactPersonDetails getByContactPersonDetailId(int cpdId) {
    // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    Criteria c = sessionFactory.getCurrentSession().createCriteria(ContactPersonDetails.class);
    c.add(Restrictions.ge("cpdId", cpdId));
    return (ContactPersonDetails) c.uniqueResult();
}

From source file:com.mycompany.rosterms.dao.impl.EducationDetailsDAOIMPL.java

@Override
public EducationDetails getByEducationDetailId(int edId) {
    // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    Criteria c = sessionFactory.getCurrentSession().createCriteria(EducationDetails.class);
    c.add(Restrictions.ge("edId", edId));
    return (EducationDetails) c.uniqueResult();
}

From source file:com.mycompany.rosterms.dao.impl.ExpectedRemunerationDAOIMPL.java

@Override
public ExpectedRemuneration getByExpectedRemunerationId(int erId) {
    //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    Criteria c = sessionFactory.getCurrentSession().createCriteria(ExpectedRemuneration.class);
    c.add(Restrictions.ge("erId", erId));
    return (ExpectedRemuneration) c.uniqueResult();
}

From source file:com.mycompany.rosterms.dao.impl.ExpertiseDetailsDAOIMPL.java

@Override
public ExpertiseDetails getByExpertiseDetailId(int edId) {
    // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    Criteria c = sessionFactory.getCurrentSession().createCriteria(ExpertiseDetails.class);
    c.add(Restrictions.ge("edId", edId));
    return (ExpertiseDetails) c.uniqueResult();
}

From source file:com.mycompany.rosterms.dao.impl.GeneralInformationIndividualDAOIMPL.java

@Override
public GeneralInformationIndividual getByGeneralInformationIndividualId(int giiId) {
    // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    Criteria c = sessionFactory.getCurrentSession().createCriteria(GeneralInformationIndividual.class);
    c.add(Restrictions.ge("giiId", giiId));
    return (GeneralInformationIndividual) c.uniqueResult();
}

From source file:com.mycompany.rosterms.dao.impl.GeneralInformationOrganizationDAOIMPL.java

@Override
public GeneralInformationOrganization getByGeneralInformationOrganizationId(int gioId) {
    //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    Criteria c = sessionFactory.getCurrentSession().createCriteria(GeneralInformationOrganization.class);
    c.add(Restrictions.ge("gioId", gioId));
    return (GeneralInformationOrganization) c.uniqueResult();
}

From source file:com.mycompany.rosterms.dao.impl.OfficeAddressDetailsDAOIMPL.java

@Override
public OfficeAddressDetails getByOfficeAddressDetailId(int oadId) {
    //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    Criteria c = sessionFactory.getCurrentSession().createCriteria(OfficeAddressDetails.class);
    c.add(Restrictions.ge("oadId", oadId));
    return (OfficeAddressDetails) c.uniqueResult();
}

From source file:com.mycompany.rosterms.dao.impl.PerivousWorkWithUsDAOIMPL.java

@Override
public PerivousWorkWithUs getByPerivousWorkWithUsId(int pwuId) {
    Criteria c = sessionFactory.getCurrentSession().createCriteria(PerivousWorkWithUs.class);
    c.add(Restrictions.ge("pwuId", pwuId));
    return (PerivousWorkWithUs) c.uniqueResult();
    // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

From source file:com.mycompany.rosterms.dao.impl.ReferenceRecommendationDAOIMPL.java

@Override
public ReferenceRecommendation getByReferenceRecommendationId(int rrId) {
    Criteria c = sessionFactory.getCurrentSession().createCriteria(ReferenceRecommendation.class);
    c.add(Restrictions.ge("rrId", rrId));
    return (ReferenceRecommendation) c.uniqueResult();
    // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}