@Override
@SuppressWarnings({ "unchecked" })
public TypedQuery<X> setLockMode(javax.persistence.LockModeType lockModeType) {
if (! getEntityManager().isTransactionInProgress()) {
throw new TransactionRequiredException( "no transaction is in progress" );
}
if ( ! canApplyLockModes() ) {
throw new IllegalStateException( "Not a JPAQL/Criteria query" );
}
this.jpaLockMode = lockModeType;