Package org.hibernate.cache.spi

Examples of org.hibernate.cache.spi.QueryKey


      final Set<Serializable> querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here


      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

        if (querySpaces == null || querySpaces.size() == 0) LOG.trace("Unexpected querySpaces is "
                                                                      + (querySpaces == null ? querySpaces : "empty"));
        else LOG.trace("querySpaces is " + querySpaces.toString());

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

      final Set querySpaces,
      final Type[] resultTypes) {

    QueryCache queryCache = factory.getQueryCache( queryParameters.getCacheRegion() );

    QueryKey key = generateQueryKey( session, queryParameters );

    if ( querySpaces == null || querySpaces.size() == 0 )
      LOG.tracev( "Unexpected querySpaces is {0}", ( querySpaces == null ? querySpaces : "empty" ) );
    else {
      LOG.tracev( "querySpaces is {0}", querySpaces );
    }

    List result = getResultFromQueryCache(
        session,
        queryParameters,
        querySpaces,
        resultTypes,
        queryCache,
        key
      );

    if ( result == null ) {
      result = doList( session, queryParameters, key.getResultTransformer() );

      putResultInQueryCache(
          session,
          queryParameters,
          resultTypes,
          queryCache,
          key,
          result
      );
    }

    ResultTransformer resolvedTransformer = resolveResultTransformer( queryParameters.getResultTransformer() );
    if ( resolvedTransformer != null ) {
      result = (
          areResultSetRowsTransformedImmediately() ?
              key.getResultTransformer().retransformResults(
                  result,
                  getResultRowAliases(),
                  queryParameters.getResultTransformer(),
                  includeInResultRow()
              ) :
              key.getResultTransformer().untransformToTuples(
                  result
              )
      );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.cache.spi.QueryKey

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.