org.hibernate.loader.custom.sql.SQLCustomQuery Java Examples

The following examples show how to use org.hibernate.loader.custom.sql.SQLCustomQuery. 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 );
}
 
Example #3
Source File: NativeSQLQueryPlan.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public NativeSQLQueryPlan(
		NativeSQLQuerySpecification specification,
		SessionFactoryImplementor factory) {
	this.sourceQuery = specification.getQueryString();

	customQuery = new SQLCustomQuery(
			specification.getQueryString(),
			specification.getQueryReturns(),
			specification.getQuerySpaces(),
			factory );
}
 
Example #4
Source File: NativeSQLQueryPlan.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public SQLCustomQuery getCustomQuery() {
	return customQuery;
}