Package org.hibernate.loader.custom.sql

Examples of org.hibernate.loader.custom.sql.SQLQueryReturnProcessor


  public BackendCustomQuery(NativeSQLQuerySpecification spec, SessionFactoryImplementor factory) throws HibernateException {
    LOG.tracev( "Starting processing of NoSQL query [{0}]", spec.getQueryString() );

    this.spec = spec;

    SQLQueryReturnProcessor processor = new SQLQueryReturnProcessor(spec.getQueryReturns(), factory);
    processor.process();
    customQueryReturns = Collections.unmodifiableList( processor.generateCustomReturns( false ) );

    if ( spec.getQuerySpaces() != null ) {
      @SuppressWarnings("unchecked")
      Set<String> spaces = spec.getQuerySpaces();
      querySpaces = Collections.<String>unmodifiableSet( spaces );
View Full Code Here


      return false;
    }
  }

  private static CustomLoaderExtension buildSpecializedCustomLoader(final ResultContext context) {
    final SQLQueryReturnProcessor processor = new SQLQueryReturnProcessor(
        context.getQueryReturns(),
        context.getSession().getFactory()
    );
    processor.process();
    final List<org.hibernate.loader.custom.Return> customReturns = processor.generateCustomReturns( false );

    CustomQuery customQuery = new CustomQuery() {
      @Override
      public String getSQL() {
        return context.getSql();
View Full Code Here

        throw new MappingException( "Unknown SqlResultSetMapping [" + resultSetMappingName + "]" );
      }

      context.addQueryReturns( mapping.getQueryReturns() );

      final SQLQueryReturnProcessor processor =
          new SQLQueryReturnProcessor( mapping.getQueryReturns(), context.getSessionFactory() );
      final SQLQueryReturnProcessor.ResultAliasContext processResult = processor.process();
      context.addQuerySpaces( processResult.collectQuerySpaces() );
    }
  }
View Full Code Here

  public BackendCustomQuery(final String nosqlQuery, final NativeSQLQueryReturn[] queryReturns, final Collection<?> additionalQuerySpaces,
      final SessionFactoryImplementor factory) throws HibernateException {

    LOG.tracev( "Starting processing of NoSQL query [{0}]", nosqlQuery );

    SQLQueryReturnProcessor processor = new SQLQueryReturnProcessor(queryReturns, factory);
    processor.process();
    Collection<?> customReturns = processor.generateCustomReturns( false );
    customQueryReturns.addAll( customReturns );

    this.query = nosqlQuery;

    if ( additionalQuerySpaces != null ) {
View Full Code Here

TOP

Related Classes of org.hibernate.loader.custom.sql.SQLQueryReturnProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.