Example usage for org.springframework.transaction.annotation Isolation REPEATABLE_READ

List of usage examples for org.springframework.transaction.annotation Isolation REPEATABLE_READ

Introduction

In this page you can find the example usage for org.springframework.transaction.annotation Isolation REPEATABLE_READ.

Prototype

Isolation REPEATABLE_READ

To view the source code for org.springframework.transaction.annotation Isolation REPEATABLE_READ.

Click Source Link

Document

A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur.

Usage

From source file:org.brekka.pegasus.core.services.impl.CertificateAuthenticationServiceImpl.java

@Override
@Transactional(isolation = Isolation.REPEATABLE_READ)
public void setEnabled(DigitalCertificate certificate, boolean enabled) {
    DigitalCertificate managed = digitalCertificateDAO.retrieveById(certificate.getId());
    managed.setActive(Boolean.valueOf(enabled));
    digitalCertificateDAO.update(managed);
}

From source file:com.inkubator.sms.gateway.service.impl.SmsActivityServiceImpl.java

@Override
@Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50)
public List<SmsActivity> getAllData() throws Exception {
    return this.smsActivityDao.getAllData();
}

From source file:org.brekka.pegasus.core.services.impl.MemberServiceImpl.java

@Override
@Transactional(isolation = Isolation.REPEATABLE_READ)
public void resetMember(final Member member) {
    Member managedMember = this.memberDAO.retrieveById(member.getId());

    // Clear all profiles for the member
    this.profileService.deleteFor(managedMember);

    // Delete the vault
    Vault vault = managedMember.getDefaultVault();
    if (vault != null) {
        this.vaultService.deleteVault(vault);
        managedMember.setDefaultVault(null);
    }//  w w w  . j  a v  a2  s.  com

    // Update
    this.memberDAO.update(managedMember);
}

From source file:org.brekka.pegasus.core.services.impl.VaultServiceImpl.java

@Override
@Transactional(isolation = Isolation.REPEATABLE_READ)
public void changePassword(final Vault defaultVault, final String oldPassword, final String newPassword) {
    UUID principalId = defaultVault.getPrincipalId();
    phalanxService.changePassword(new IdentityPrincipal(principalId), oldPassword, newPassword);
}

From source file:com.inkubator.hrm.service.impl.PayTempOvertimeServiceImpl.java

@Override
@Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 30)
public Long getTotalData() throws Exception {
    return payTempOvertimeDao.getTotalData();
}

From source file:org.brekka.pegasus.core.services.impl.VaultServiceImpl.java

@Override
@Transactional(isolation = Isolation.REPEATABLE_READ)
public void changePassword(final Vault defaultVault, final String password) {
    Vault managed = vaultDAO.retrieveById(defaultVault.getId());
    // Replace the principal. The old principal will just be orphaned.
    Principal principal = phalanxService.createPrincipal(password);
    managed.setPrincipalId(principal.getId());
    vaultDAO.update(managed);/*  w  w  w. j  ava 2 s  .  c om*/
    defaultVault.setPrincipalId(managed.getPrincipalId());
}

From source file:org.brekka.pegasus.core.services.impl.MemberServiceImpl.java

@Override
@Transactional(isolation = Isolation.REPEATABLE_READ)
public void updateStatus(final UUID actorId, final ActorStatus status) {
    Actor managed = this.actorDAO.retrieveById(actorId);
    managed.setStatus(status);/*from  w  ww. j a  v  a2 s.c  om*/
    this.actorDAO.update(managed);
}

From source file:com.inkubator.sms.gateway.service.impl.RoleServiceImpl.java

@Override
@Transactional(readOnly = false, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50)
public List<Role> getAllByTextFullService(String parameter, int minResult, int maxResult, Order order) {
    //        System.out.println("muahahahah");
    return roleDao.getAllByFullTextService(parameter, minResult, maxResult, order);
}

From source file:com.inkubator.hrm.service.impl.ApprovalDefinitionServiceImpl.java

@Override
@Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, timeout = 50)
public List<ApprovalDefinition> getByParam(ApprovalDefinitionSearchParameter searchParameter, int firstResult,
        int maxResults, Order order) throws Exception {
    return this.approvalDefinitionDao.getByParam(searchParameter, firstResult, maxResults, order);
}

From source file:com.inkubator.hrm.service.impl.PositionServiceImpl.java

@Override
@Transactional(readOnly = true, isolation = Isolation.REPEATABLE_READ, propagation = Propagation.SUPPORTS, rollbackFor = Exception.class)
public List<Position> getByParam(PositionSearchParameter searchParameter, int firstResult, int maxResults,
        Order order) throws Exception {
    return positionDao.getByParam(searchParameter, firstResult, maxResults, order);
}