Examples of NamedSQLQueryDefinition


Examples of org.hibernate.engine.spi.NamedSQLQueryDefinition

    if ( StringHelper.isEmpty( comment ) ) {
      comment = null;
    }

    boolean callable = getBoolean( hints, QueryHints.CALLABLE, name );
    NamedSQLQueryDefinition def;
    if ( StringHelper.isNotEmpty( resultSetMapping ) ) {
      def = new NamedSQLQueryDefinition(
          name,
          query, resultSetMapping, null, cacheable,
          cacheRegion, timeout, fetchSize,
          flushMode, cacheMode, readOnly, comment,
          null, callable
      );
    }
    else {
      AnnotationValue annotationValue = annotation.value( "resultClass" );
      if ( annotationValue == null ) {
        throw new NotYetImplementedException( "Pure native scalar queries are not yet supported" );
      }
      NativeSQLQueryRootReturn queryRoots[] = new NativeSQLQueryRootReturn[] {
          new NativeSQLQueryRootReturn(
              "alias1",
              annotationValue.asString(),
              new HashMap<String, String[]>(),
              LockMode.READ
          )
      };
      def = new NamedSQLQueryDefinition(
          name,
          query,
          queryRoots,
          null,
          cacheable,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.