Package org.springframework.orm.hibernate3

Examples of org.springframework.orm.hibernate3.SessionFactoryUtils


    super(TakstolAllV.class);
  }

  public List<TakstolInterface> findProductionByPeriode(final Periode periode) {
    return (List<TakstolInterface>) getHibernateTemplate().execute(
        new HibernateCallback() {

          public Object doInHibernate(final Session session) {
            Query query = session
                .createQuery("select takstolAllV1 from TakstolAllV takstolAllV1 where "
                    + "exists (select 1 from TakstolAllV takstolAllV2 where takstolAllV1.orderId = takstolAllV2.orderId and "
View Full Code Here


  }

  public List<TakstolAllV> findAllNotProduced() {
    // TODO Auto-generated method stub
    return (List<TakstolAllV>) getHibernateTemplate().execute(
        new HibernateCallback() {

          public Object doInHibernate(Session session) {
            return session.createCriteria(TakstolAllV.class).add(Restrictions.eq("isDefault", 0)).add(
                Restrictions.isNull("produced")).add(
                Restrictions.eq("sent", 0)).add(Restrictions.eq("probability", 100)).list();
View Full Code Here

     *      java.lang.Integer)
     */
    public final NokkelProduksjonV findByWeek(final Integer year,
            final Integer week) {
        return (NokkelProduksjonV) getHibernateTemplate().execute(
                new HibernateCallback() {

                    @SuppressWarnings("unchecked")
                    public Object doInHibernate(final Session session) {
                        List<NokkelProduksjonV> list = session.createCriteria(
                                NokkelProduksjonV.class).add(
View Full Code Here

     *      java.lang.String)
     */
    public final NokkelProduksjonV aggreagateYearWeek(
            final YearWeek currentYearWeek, final String productArea) {
        return (NokkelProduksjonV) getHibernateTemplate().execute(
                new HibernateCallback() {

                    @SuppressWarnings("unchecked")
                    public Object doInHibernate(final Session session) {
                        NokkelProduksjonV nokkelProduksjonV = null;
                        List<Object> list = session
View Full Code Here

    @SuppressWarnings("unchecked")
    public final List<NokkelProduksjonV> findByYearWeekProductArea(
            final Integer year, final Integer weekFrom, final Integer weekTo,
            final String productAreaName) {
        return (List<NokkelProduksjonV>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(final Session session) {

                        return session
                                .createQuery(
View Full Code Here

    @SuppressWarnings("unchecked")
    public final List<NokkelProduksjonV> findBetweenYearWeek(
            final YearWeek fromYearWeek, final YearWeek toYearWeek,
            final String productArea) {
        return (List<NokkelProduksjonV>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(final Session session) {
                        String query = "select nokkelProduksjonV "
                                + "from NokkelProduksjonV nokkelProduksjonV "
                                + "where "
View Full Code Here

    @SuppressWarnings("unchecked")
    public final List<NokkelProduksjonV> findByYearWeekProductAreaGroup(
            final Integer year, final Integer weekFrom, final Integer weekTo,
            final String productAreaGroupName) {
        return (List<NokkelProduksjonV>) getHibernateTemplate().execute(
                new HibernateCallback() {

                    public Object doInHibernate(final Session session) {

                        return session
                                .createQuery(
View Full Code Here

   *      java.lang.Integer)
   */
  public TransportSumV findYearAndWeek(final Integer currentYear,
      final Integer currentWeek) {
    return (TransportSumV) getHibernateTemplate().execute(
        new HibernateCallback() {

          @SuppressWarnings("unchecked")
          public Object doInHibernate(Session session)
              throws HibernateException {
            String sql = "select new TransportSumV(sum(transportSumV.orderCount), "
View Full Code Here

   */
  public TransportSumV findYearAndWeekByProductAreaGroup(
      final Integer currentYear, final Integer currentWeek,
      final ProductAreaGroup productAreaGroup) {
    return (TransportSumV) getHibernateTemplate().execute(
        new HibernateCallback() {

          @SuppressWarnings("unchecked")
          public Object doInHibernate(Session session)
              throws HibernateException {
            List<TransportSumV> list = session.createCriteria(
View Full Code Here

    super(TakstoltegnerV.class);
  }

  public Collection<TakstoltegnerV> findByPeriode(final Periode periode) {
    return (Collection<TakstoltegnerV>) getHibernateTemplate().execute(
        new HibernateCallback() {

          public Object doInHibernate(Session session) {
            Date startDate = Util.getFirstDateInWeek(
                periode.getYear(), periode.getWeek());
            Date enddate = Util.getLastDateInWeek(
View Full Code Here

TOP

Related Classes of org.springframework.orm.hibernate3.SessionFactoryUtils

Copyright © 2018 www.massapicom. 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.