Example usage for org.springframework.transaction.annotation Propagation SUPPORTS

List of usage examples for org.springframework.transaction.annotation Propagation SUPPORTS

Introduction

In this page you can find the example usage for org.springframework.transaction.annotation Propagation SUPPORTS.

Prototype

Propagation SUPPORTS

To view the source code for org.springframework.transaction.annotation Propagation SUPPORTS.

Click Source Link

Document

Support a current transaction, execute non-transactionally if none exists.

Usage

From source file:cs544.wamp_blog_engine.dao.impl.TagDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//from w  ww. j  a v  a  2  s  . c o m
public Tag getTag(int id) {
    Tag tag = (Tag) sf.getCurrentSession().get(Tag.class, id);
    return tag;
}

From source file:cs544.wamp_blog_engine.dao.impl.BlogDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//from   w ww.j a  v a  2  s .  c o m
public Blog getBlog(int blogid) {
    Blog blog = (Blog) sf.getCurrentSession().get(Blog.class, blogid);
    return blog;
}

From source file:com.oak_yoga_studio.dao.impl.OrderDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//ww  w . j  a  va  2 s . c o m
public List<Order> getAllOrders() {

    Query query = sf.getCurrentSession().createQuery("from Order_table");
    List<Order> orders = query.list();

    return orders;
}

From source file:cs544.wamp_blog_engine.dao.impl.RatingDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//  ww w.ja  v  a  2s.  c  om
public Rating getBlog(int id) {
    Rating rating = (Rating) sf.getCurrentSession().get(Rating.class, id);
    return rating;
}

From source file:cs544.wamp_blog_engine.dao.impl.UserDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//w ww. j a v a 2 s.  com
public User getUser(int userid) {
    User user = (User) sf.getCurrentSession().get(User.class, userid);
    return user;
}

From source file:com.oak_yoga_studio.dao.impl.AddressDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//from   w w  w  .  j  a  va  2 s.  c o  m
public List<Address> getAllAddresses() {
    Query q = sf.getCurrentSession().createQuery("from Address");
    List<Address> ads = q.list();

    return ads;
}

From source file:cs544.wamp_blog_engine.dao.impl.LoginHistoryDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override/*from w w w  .  j a v  a  2  s.  co m*/
public LoginHistory getLoginHistory(int id) {
    LoginHistory history = (LoginHistory) sf.getCurrentSession().get(LoginHistory.class, id);
    return history;
}

From source file:cs544.wamp_blog_engine.dao.impl.CommentDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//from   ww  w . j  av  a  2 s .  c  om
public Comment getComment(int commentid) {
    Comment comment = (Comment) sf.getCurrentSession().get(Comment.class, commentid);
    return comment;
}

From source file:com.oak_yoga_studio.dao.impl.CustomerDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//w ww  .  ja  v a 2s  . co  m
public Customer getCustomer(int id) {

    Customer customer = (Customer) sf.getCurrentSession().get(Customer.class, id);
    return customer;

}

From source file:com.oak_yoga_studio.dao.impl.WaiverDAOImpl.java

@Transactional(propagation = Propagation.SUPPORTS)
@Override//from   ww w. ja va  2  s  .co  m
public List<Waiver> getAllWaivers() {

    List<Waiver> waivers = new ArrayList<Waiver>();

    Query query = sf.getCurrentSession().createQuery("from Waiver");
    waivers = query.list();

    return waivers;
}