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

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

Introduction

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

Prototype

Isolation READ_COMMITTED

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

Click Source Link

Document

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

Usage

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

@Override
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30)
public Long getTotalApprovalDefinitionByParam(ApprovalDefinitionSearchParameter searchParameter)
        throws Exception {
    return this.approvalDefinitionDao.getTotalApprovalDefinitionByParam(searchParameter);
}

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

@Override
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30)
public Integer getTotalByFullTextService(String parameter) throws Exception {
    return this.phoneBookDao.getTotalByFullTextService(parameter);
}

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

@Override
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, rollbackFor = Exception.class)
public Long getTotalPositionByParam(PositionSearchParameter searchParameter) throws Exception {
    return this.positionDao.getTotalPositionByParam(searchParameter);
}

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

@Override
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30)
public Integer getTotalByFullTextService(String parameter) throws Exception {
    return this.groupPhoneDao.getTotalByFullTextService(parameter);
}

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

@Override
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30)
public Long getTotalDepartmentByParam(DepartmentSearchParameter searchParameter) throws Exception {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

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

@Override
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30)
public TempAttendanceRealization getEntiyByPK(Long id) {
    return this.tempAttendanceRealizationDao.getEntiyByPK(id);
}

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

@Override
@Transactional(readOnly = false, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void save(SystemLetterReference systemLetterReference) throws Exception {
    //Uncomment below if u have unik code
    //long totalDuplicates = systemLetterReferenceDao.getTotalByCode(systemLetterReference.getCode());
    //if (totalDuplicates > 0) {
    //throw new BussinessException("systemLetterReference.error_duplicate_code")
    //}//from   w  ww  .  j a v a 2s.  c  om
    systemLetterReference.setId(Long.parseLong(RandomNumberUtil.getRandomNumber(12)));
    systemLetterReference.setCreatedBy(UserInfoUtil.getUserName());
    systemLetterReference.setCreatedOn(new Date());
    systemLetterReferenceDao.save(systemLetterReference);
}

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

@Override
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30)
public Long getTotalHrmRoleByParam(HrmRoleSearchParameter searchParameter) throws Exception {
    return this.hrmRoleDao.getTotalHrmRoleByParam(searchParameter);
}

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

@Override
@Transactional(readOnly = false, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void sendSms(SmsSendModel ssm) throws Exception {
    ModemDefinition modemDefinition = this.modemDefinitionDao.getEntiyByPK(ssm.getModemId());
    double hargaPerSms = modemDefinition.getPricePerSms();
    List<String> toLoop = ssm.getListPhone();
    for (String toLoop1 : toLoop) {
        final SMSSend smss = new SMSSend();
        smss.setPricePerSms(hargaPerSms);
        smss.setContent(ssm.getSmsContent());
        smss.setFrom("System");
        smss.setDestination(toLoop1);/*from w w w  .j  a v a 2s  .co m*/
        smss.setModemId(modemDefinition.getModemId());
        this.jmsTemplateSMS.send(new MessageCreator() {
            @Override
            public Message createMessage(Session session) throws JMSException {
                return session.createTextMessage(jsonConverter.getJson(smss));
            }
        });

        //            OutboundMessage msg = new OutboundMessage(toLoop1, ssm.getSmsContent());
        //            org.smslib.Service.getInstance().sendMessage(msg, modemDefinition.getModemId());
    }
    //        OutboundMessage msg = new OutboundMessage("+6287887051607", "Test UP");
    //        org.smslib.Service.getInstance().sendMessage(msg);

}

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

@Override
@Transactional(readOnly = false, propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
public void updateAndPushMessage(LoginHistory entity) throws Exception {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}