List of usage examples for javax.persistence TypedQuery setLockMode
TypedQuery<X> setLockMode(LockModeType lockMode);
From source file:org.springframework.data.jpa.repository.support.SimpleJpaRepository.java
private TypedQuery<T> applyRepositoryMethodMetadata(TypedQuery<T> query) { if (crudMethodMetadata == null) { return query; }/*from ww w .java 2 s . co m*/ LockModeType type = crudMethodMetadata.getLockModeType(); TypedQuery<T> toReturn = type == null ? query : query.setLockMode(type); for (Entry<String, Object> hint : crudMethodMetadata.getQueryHints().entrySet()) { query.setHint(hint.getKey(), hint.getValue()); } return toReturn; }