本文整理匯總了Java中org.springframework.transaction.annotation.Isolation.REPEATABLE_READ屬性的典型用法代碼示例。如果您正苦於以下問題:Java Isolation.REPEATABLE_READ屬性的具體用法?Java Isolation.REPEATABLE_READ怎麽用?Java Isolation.REPEATABLE_READ使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.springframework.transaction.annotation.Isolation
的用法示例。
在下文中一共展示了Isolation.REPEATABLE_READ屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: likeInterpretation
@Transactional( isolation = Isolation.REPEATABLE_READ )
public boolean likeInterpretation( int id )
{
Interpretation interpretation = getInterpretation( id );
if ( interpretation == null )
{
return false;
}
User user = currentUserService.getCurrentUser();
if ( user == null )
{
return false;
}
return interpretation.like( user );
}
示例2: unlikeInterpretation
@Transactional( isolation = Isolation.REPEATABLE_READ )
public boolean unlikeInterpretation( int id )
{
Interpretation interpretation = getInterpretation( id );
if ( interpretation == null )
{
return false;
}
User user = currentUserService.getCurrentUser();
if ( user == null )
{
return false;
}
return interpretation.unlike( user );
}
示例3: updateKombinationsberechnung
@org.springframework.transaction.annotation.Transactional(isolation = Isolation.REPEATABLE_READ)
public void updateKombinationsberechnung(EntityManager entityManager, Kombinationsberechnung kombinationsberechnung) {
try {
kombinationsberechnungDao.saveOrUpdate(entityManager, kombinationsberechnung);
} catch (Exception e) {
log.error("Could npt update Combinatoric Calculation", e);
}
}
示例4: saveUser
/**
* 保存用戶
* @param user
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.REPEATABLE_READ)
@Override
public Integer saveUser(UserBean user){
return this.userMapper.saveUser(user);
}