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:het.springapp.service.impl.UserDetailsServiceImpl.java

@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
private UserDetailsAdapter buildUserForAuthentication(User user) {
    String userId = user.getUserId();
    String password = user.getPassword();
    user = userDao.login(userId, password);
    return new UserDetailsAdapter(user);
}

From source file:com.crm.earnify.services.IGenericEarnifyServiceImpl.java

@Override
@Transactional(propagation = Propagation.REQUIRED)
public void saveOrUpdate(E p_entity_to_save_or_update) {
    this.i_generic_dao.saveOrUpdate(p_entity_to_save_or_update);
}

From source file:com.karriem.tp2.immutable_domain_model_assignment.Service.Crud.PatientsCrud.Impl.GeneralPatientCrudServiceImpl.java

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

    return null;
}

From source file:com.healthcit.analytics.businessdelegate.ReportTemplateManager.java

@Transactional(readOnly = true, propagation = Propagation.REQUIRED)
public JSONObject getReportById(Long id) {
    ReportTemplate reportTemplate = reportTemplateDao.getReportTemplateById(id);

    return JSONObject.fromObject(reportTemplate);
}

From source file:DataBaseAcessLayer.TransactionDAOImpl.java

@Override
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
public void addTransaction(Transaction transaction) {
    org.hibernate.classic.Session session = hibernateTemplate.getSessionFactory().getCurrentSession();
    session.saveOrUpdate(transaction);/*w w w. ja va  2  s  .  c o  m*/

    System.out.println(transaction.toString());
}

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

/**
 * Adds a salt record to the KeyServer.//from ww w .  j a  v a2s  . co m
 * 
 * @return The added Salt entity
 */
@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public Salt addSalt() throws ApplicationException;

From source file:com.karriem.tp2.immutable_domain_model_assignment.Service.Crud.SuppliersCrud.Impl.MedicalSuppliersCrudServiceImpl.java

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

    return null;
}

From source file:com.karriem.tp2.immutable_domain_model_assignment.Service.Crud.SuppliersCrud.Impl.GeneralSuppliersCrudServiceImpl.java

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

    return null;
}

From source file:uk.co.parso.barebones.TestServiceImpl.java

@RequestMapping("test")
@ResponseStatus(HttpStatus.OK)//from   ww w .j  a  va  2s.  c o m
@Transactional(readOnly = false, isolation = Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
@Override
public void test() {
    logger.debug("TEST");
    Test test = testRepo.selectForUpdate(1L);
    Test test2 = testRepo.selectForUpdate(2L);
    test.setName("test" + (new Date()).getTime());
    test.setName("test2" + (new Date()).getTime());
}

From source file:com.karriem.tp2.immutable_domain_model_assignment.Service.Crud.EquipmentCrud.Impl.GeneralEquipmentCrudServiceImpl.java

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

    return null;
}