Package org.hibernate.engine.spi

Examples of org.hibernate.engine.spi.NamedQueryDefinitionBuilder


        .setQueryReturns( nativeSqlQuery.getQueryReturns() );
    return builder.createNamedQueryDefinition();
  }

  private NamedQueryDefinition extractHqlQueryDefinition(org.hibernate.Query hqlQuery, String name) {
    final NamedQueryDefinitionBuilder builder = new NamedQueryDefinitionBuilder( name );
    fillInNamedQueryBuilder( builder, hqlQuery );
    // LockOptions only valid for HQL/JPQL queries...
    builder.setLockOptions( hqlQuery.getLockOptions().makeCopy() );
    return builder.createNamedQueryDefinition();
  }
View Full Code Here


    Attribute cacheModeAtt = queryElem.attribute( "cache-mode" );
    String cacheMode = cacheModeAtt == null ? null : cacheModeAtt.getValue();
    Attribute cmAtt = queryElem.attribute( "comment" );
    String comment = cmAtt == null ? null : cmAtt.getValue();

    NamedQueryDefinition namedQuery = new NamedQueryDefinitionBuilder().setName( queryName )
        .setQuery( query )
        .setCacheable( cacheable )
        .setCacheRegion( region )
        .setTimeout( timeout )
        .setFetchSize( fetchSize )
View Full Code Here

TOP

Related Classes of org.hibernate.engine.spi.NamedQueryDefinitionBuilder

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.