Package no.ugland.utransprod.dao.hibernate

Source Code of no.ugland.utransprod.dao.hibernate.OrdchgrLineVDAOHibernate

package no.ugland.utransprod.dao.hibernate;

import java.util.List;

import no.ugland.utransprod.dao.OrdchgrLineVDAO;
import no.ugland.utransprod.model.OrdchgrLineV;

import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateCallback;

public class OrdchgrLineVDAOHibernate extends BaseDAOHibernate<OrdchgrLineV> implements OrdchgrLineVDAO {
    /**
     * Konstrukt�r
     */
    public OrdchgrLineVDAOHibernate() {
        super(OrdchgrLineV.class);
    }

    @SuppressWarnings("unchecked")
  public List<OrdchgrLineV> getLines(final Integer ordNo, final List<Integer> lnNos) {
        return (List<OrdchgrLineV>) getHibernateTemplate().execute(new HibernateCallback() {

            public Object doInHibernate(final Session session) {

                return session.createCriteria(OrdchgrLineV.class).add(Restrictions.eq("ordchgrLineVPK.ordNo", ordNo)).add(
                        Restrictions.in("ordchgrLineVPK.lnNo", lnNos)).list();
            }
        });
    }

}
TOP

Related Classes of no.ugland.utransprod.dao.hibernate.OrdchgrLineVDAOHibernate

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.