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

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

Introduction

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

Prototype

Propagation REQUIRED

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

Click Source Link

Document

Support a current transaction, create a new one if none exists.

Usage

From source file:org.fits.proweb.business.NewsComponent.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public News getNews(String title) {
    return newsDao.getNews(title);
}

From source file:service.crud.Impl.crudBerryImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public berry remove(berry entity) {
    return null;
}

From source file:com.mycompany.property.Services.Crud.FarmCrudServiceImpl.java

@Transactional(propagation = Propagation.REQUIRED)
public Farm remove(Farm entity) {

    return null;

}

From source file:com.mycompany.property.Services.Crud.BondCrudServiceImpl.java

@Transactional(propagation = Propagation.REQUIRED)
public Bond remove(Bond entity) {

    return null;

}

From source file:dao.DAOToken.java

/**
 * /*from w  w  w .j  ava  2 s  .  c  o  m*/
 * @param _token 
 */
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = exceptionsDAO.GuardarTokenException.class)
public void guardarToken(Token _token) {
    em.persist(_token);
}

From source file:service.crud.Impl.crudHmMovesImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public hmMoves remove(hmMoves entity) {
    return null;
}

From source file:service.crud.Impl.crudPotionsImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public potions remove(potions entity) {
    return null;
}

From source file:service.crud.Impl.crudTmMovesImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public tmMoves remove(tmMoves entity) {
    return null;
}

From source file:uk.org.funcube.fcdw.server.processor.AbstractProcessor.java

@Transactional(readOnly = true, propagation = Propagation.REQUIRED)
protected List<EpochEntity> getEpoch(long satelliteId) {
    List<EpochEntity> epochList = epochDao.findBySatelliteId(satelliteId);
    return epochList;
}

From source file:com.milos.neo4j.dao.impl.UserDAOImpl.java

@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
@Override/*from  w  ww .java2 s  .  c  o  m*/
public void updateUser(String username, String firstname, String lastname, String password, String age,
        String gender, String image, String email, String cityName) {
    String query = "MATCH (u:User)-[r1:LIVES_IN_CITY]->(c1:City),(c2:City)\n"
            + "WHERE u.username = {username} and c2.name={cityName}\n" + "CREATE (u)-[r2:LIVES_IN_CITY]->(c2)\n"
            + "SET r2=r1,  u.firstname = {firstname}, u.lastname = {lastname}, u.password = {password}, "
            + "u.age ={age}, u.gender = {gender}, u.userImage = {userImage}, u.email = {email}\n"
            + "delete r1\n" + "return u";
    Map<String, String> params = new HashMap<>();
    params.put("username", username);
    params.put("firstname", firstname);
    params.put("lastname", lastname);
    params.put("password", password);
    params.put("age", age);
    params.put("gender", gender);
    params.put("userImage", image);
    params.put("email", email);
    params.put("cityName", cityName);

    session.query(query, params, false);
}