org.hibernate.hql.internal.QueryExecutionRequestException Java Examples

The following examples show how to use org.hibernate.hql.internal.QueryExecutionRequestException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactiveQuery.java    From hibernate-reactive with GNU Lesser General Public License v2.1 5 votes vote down vote up
static <T> T convertQueryException(T result, Throwable e,
								   AbstractProducedQuery<?> query) {
	if ( e instanceof QueryExecutionRequestException) {
		throw new IllegalStateException( e );
	}
	if ( e instanceof TypeMismatchException) {
		throw new IllegalStateException( e );
	}
	if ( e instanceof HibernateException) {
		throw query.getProducer().getExceptionConverter()
				.convert( (HibernateException) e, query.getLockOptions() );
	}
	return CompletionStages.returnOrRethrow( e, result );
}
 
Example #2
Source File: ReactiveQueryTranslatorImpl.java    From hibernate-reactive with GNU Lesser General Public License v2.1 4 votes vote down vote up
private void errorIfSelect() throws HibernateException {
	if ( !getSqlAST().needsExecutor() ) {
		throw new QueryExecutionRequestException( "Not supported for select queries", getQueryString() );
	}
}
 
Example #3
Source File: QueryTranslatorImpl.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private void errorIfDML() throws HibernateException {
	if ( sqlAst.needsExecutor() ) {
		throw new QueryExecutionRequestException( "Not supported for DML operations", hql );
	}
}
 
Example #4
Source File: QueryTranslatorImpl.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private void errorIfSelect() throws HibernateException {
	if ( !sqlAst.needsExecutor() ) {
		throw new QueryExecutionRequestException( "Not supported for select queries", hql );
	}
}