Java Code Examples for org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification#getQuerySpaces()

The following examples show how to use org.hibernate.engine.query.spi.sql.NativeSQLQuerySpecification#getQuerySpaces() . 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: ReactiveSessionImpl.java    From hibernate-reactive with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public CompletionStage<Integer> executeReactiveUpdate(NativeSQLQuerySpecification specification,
													  QueryParameters parameters) {
	checkOpenOrWaitingForAutoClose();
	pulseTransactionCoordinator();
	parameters.validateParameters();

	ReactiveNativeSQLQueryPlan reactivePlan = //getNativeQueryPlan( specification );
			new ReactiveNativeSQLQueryPlan(
					specification.getQueryString(),
					new SQLCustomQuery(
							specification.getQueryString(),
							specification.getQueryReturns(),
							specification.getQuerySpaces(),
							getFactory()
					) );
	return reactiveAutoFlushIfRequired( reactivePlan.getCustomQuery().getQuerySpaces() )
			.thenCompose( v -> reactivePlan.performExecuteReactiveUpdate( parameters, this ) )
			.whenComplete( (count, x) -> {
				afterOperation( x == null );
				delayedAfterCompletion();
			} );
}
 
Example 2
Source File: NativeQueryInterpreterStandardImpl.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NativeSQLQueryPlan createQueryPlan(
		NativeSQLQuerySpecification specification,
		SessionFactoryImplementor sessionFactory) {
	CustomQuery customQuery = new SQLCustomQuery(
			specification.getQueryString(),
			specification.getQueryReturns(),
			specification.getQuerySpaces(),
			sessionFactory
	);

	return new NativeSQLQueryPlan( specification.getQueryString(), customQuery );
}