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:com.mycompany.capstone.dao.StatusValueDaoDbImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public void delete(StatusValue statusValue) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

From source file:com.webfileanalyzer.service.impl.FilesServiceImpl.java

@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
@Override
public void delete(Files dbFile) {
    clearCache();
    filesDAO.delete(dbFile);
}

From source file:at.ac.tuwien.ifs.tita.dao.test.util.NativeSqlExecutorDao.java

/** {@inheritDoc} */
@Override//from  w  w w  . ja va2  s .  co m
@Transactional(propagation = Propagation.REQUIRED)
public void executeSqlFile(Object class1) throws Exception {
    List<String> statements = null;
    statements = parser.readSqlFile(class1);

    for (String stm : statements) {
        executeSql(stm);
    }

}

From source file:org.openhie.openempi.service.SaltManagerService.java

/**
 * Deletes a salt from the EMPI. The system locates the salt record using the salt identifiers as search criteria. If the record is not
 * found an unchecked exception is thrown to notify the caller that this record does not exist in the system. If the record is found, the record
 * is voided from the system rather than deleted to preserve a history.
 *  //w ww.  j a  v  a2s.c om
 * @param saltId: identifier of the Salt entity to be deleted
 */
@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public void deleteSalt(long saltId) throws ApplicationException;

From source file:com.google.ie.business.service.impl.BadWordServiceImpl.java

@Override
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
public BadWord saveBadWord(BadWord badWord) {
    badWord = badWordDao.saveBadWord(badWord);
    /*//from ww w. j  av a 2  s . c  o  m
     * Index the entity.Create an EntityIndex object for the entity to be
     * indexed and then queue the job of indexing to task queue
     */
    EntityIndex entityIndex = entityIndexService.createEntityIndex(badWord.getKey());
    getIndexQueueUpdater().indexEntity(entityIndex.getKey());

    return badWord;
}

From source file:com.tsg.techsupportmvc.dao.KnowledgeBaseDaoDbImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public KnowledgeBaseArticle addArticle(KnowledgeBaseArticle article) {

    jdbcTemplate.update(SQL_INSERT_ARTICLE, article.getUserId_FK(), article.getTitle(),
            article.getSubmittedDate(), article.getArticleBody());

    article.setArticleId(jdbcTemplate.queryForObject("SELECT LAST_INSERT_ID()", Integer.class));

    return article;
}

From source file:com.oak_yoga_studio.service.impl.SectionServiceImpl.java

@Transactional(propagation = Propagation.REQUIRED)
@Override//from   w  w  w.j a va 2s . c om
public List<Section> getSectionsByCourse(Course course) {

    try {
        return sectionDAO.getCourseSections(course);

    } catch (Exception e) {
        return null;
    }

}

From source file:com.mycompany.capstone.dao.HashtagDaoDbImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public Hashtag getById(int id) {
    return jdbcTemplate.queryForObject(SQL_GET_HASHTAG_BY_ID, new HashtagMapper(), id);
}

From source file:uk.ac.ebi.intact.editor.services.misc.MyNotesService.java

@Transactional(value = "jamiTransactionManager", propagation = Propagation.REQUIRED)
public void saveNotes(User user, String rawNotes)
        throws SynchronizerException, FinderException, PersisterException {

    Preference pref = user.getPreference(UserAdminController.RAW_NOTES);
    pref.setValue(rawNotes);/*from w w  w  .j ava 2s . c  o  m*/

    updateIntactObject(user, getIntactDao().getUserDao());
}

From source file:com.bsb.cms.moss.service.impl.auth.SysRoleServiceImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public int deleteById(Long sysRoleId) {
    // longDAO.delete("SYS_ROLE.deleteByPrimaryKey", sysRoleId);
    // return longDAO.delete("SYS_ROLE_MODEL.deleteByRoleId", sysRoleId);
    return 1;// TODO
}