Example usage for org.hibernate FlushMode AUTO

List of usage examples for org.hibernate FlushMode AUTO

Introduction

In this page you can find the example usage for org.hibernate FlushMode AUTO.

Prototype

FlushMode AUTO

To view the source code for org.hibernate FlushMode AUTO.

Click Source Link

Document

The Session is sometimes flushed before query execution in order to ensure that queries never return stale state.

Usage

From source file:in.pleasecome.tohich_hunter.checkin.DAO.ConversationDAOImpl.java

@Override
@Transactional(readOnly = false)/*from  w  w w.  j  a v a 2s  .  c  o m*/
public void add(Conversation conversation) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().save(conversation);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.ConversationDAOImpl.java

@Override
@Transactional(readOnly = false)/*from  www  .ja va2  s  . com*/
public void edit(Conversation conversation) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().update(conversation);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.ConversationDAOImpl.java

@Override
@Transactional(readOnly = false)//  w  ww.  j  a v a 2s .com
public void delete(Conversation conversation) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().delete(conversation);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.MessageDAOImpl.java

@Override
@Transactional(readOnly = false)/*from   w  ww  .  jav a  2s.  com*/
public void add(Message message) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().save(message);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.MessageDAOImpl.java

@Override
@Transactional(readOnly = false)//from   w  w  w .ja va2 s .c  o m
public void edit(Message message) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().update(message);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.MessageDAOImpl.java

@Override
@Transactional(readOnly = false)//from  www.  j  a v a 2 s  .c  o  m
public void delete(Message message) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().delete(message);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.NoteDAOImpl.java

@Override
@Transactional(readOnly = false)//  w w  w .  j  av a  2s . c  o m
public void add(Note note) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().save(note);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.NoteDAOImpl.java

@Override
@Transactional(readOnly = false)/*  w w w.  j a  v a  2s. c om*/
public void edit(Note note) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().save(note);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.NoteDAOImpl.java

@Override
@Transactional(readOnly = false)//from   w  w  w. jav a 2 s.c  om
public void delete(Note note) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().save(note);
}

From source file:in.pleasecome.tohich_hunter.checkin.DAO.TownDAOImpl.java

@Override
@Transactional(readOnly = false)/*ww w.  j  a v a 2  s .c om*/
public synchronized void add(Town town) {
    getHibernateTemplate().getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO);
    getHibernateTemplate().save(town);
}