Examples of HibernateTemplate


Examples of org.springframework.orm.hibernate3.HibernateTemplate

      throw new ImpossibileLeggereCausaleMovimentoLegaleException();
    }
  }

  public long staccaNumeroMovimentoLegale() throws ImpossibileGenerareChiaveMovimentoLegaleException {
    HibernateTemplate hibernateTemplate = getHibernateTemplate();
    Long execute = 0l;
    try {
      execute = (Long) hibernateTemplate.execute(new HibernateCallback() {
        public Object doInHibernate(Session session) {
          BigDecimal nextVal = (BigDecimal) session.createSQLQuery("select movleg_num.nextval from DUAL")
              .uniqueResult();
          return nextVal.longValue();
        }
View Full Code Here

Examples of org.springframework.orm.hibernate4.HibernateTemplate

  protected void setUp() throws Exception {
    DataSource dataSource = getDataSource();
    populateDataBase(dataSource);
    jdbcTemplate = new JdbcTemplate(dataSource);
    sessionFactory = getSessionFactory(dataSource);
    hibernateTemplate = new HibernateTemplate(sessionFactory);
    hibernateTemplate.setCheckWriteOperations(false);
    HibernateTransactionManager tm = new HibernateTransactionManager(sessionFactory);
    hibernateListener = new HibernateFlowExecutionListener(sessionFactory, tm);
  }
View Full Code Here
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.