Package org.hibernate.engine

Examples of org.hibernate.engine.QueryParameters


    before();

    Map namedParams = getNamedParams();
    NativeSQLQuerySpecification spec = generateQuerySpecification( namedParams );

    QueryParameters qp = getQueryParameters( namedParams );
    qp.setScrollMode( scrollMode );

    try {
      return getSession().scroll( spec, qp );
    }
    finally {
View Full Code Here


  public Iterator iterate() throws HibernateException {
    throw new UnsupportedOperationException("SQL queries do not currently support iteration");
  }

  public QueryParameters getQueryParameters(Map namedParams) {
    QueryParameters qp = super.getQueryParameters(namedParams);
    qp.setCallable(callable);
    qp.setAutoDiscoverScalarTypes(autodiscovertypes);
    return qp;
  }
View Full Code Here

    before();

    Map namedParams = getNamedParams();
    NativeSQLQuerySpecification spec = generateQuerySpecification( namedParams );

    QueryParameters qp = getQueryParameters( namedParams );
    qp.setScrollMode( scrollMode );

    try {
      return getSession().scroll( spec, qp );
    }
    finally {
View Full Code Here

  public Iterator iterate() throws HibernateException {
    throw new UnsupportedOperationException("SQL queries do not currently support iteration");
  }

  public QueryParameters getQueryParameters(Map namedParams) {
    QueryParameters qp = super.getQueryParameters(namedParams);
    qp.setCallable(callable);
    qp.setAutoDiscoverScalarTypes(autodiscovertypes);
    return qp;
  }
View Full Code Here

  }
 
  public ScrollableResults scroll(SessionImplementor session, ScrollMode scrollMode)
  throws HibernateException {
    QueryParameters qp = translator.getQueryParameters();
    qp.setScrollMode(scrollMode);
    return scroll(qp, resultTypes, null, session);
  }
View Full Code Here

    errorIfDML();
    QueryNode query = ( QueryNode ) sqlAst;
    boolean hasLimit = queryParameters.getRowSelection() != null && queryParameters.getRowSelection().definesLimits();
    boolean needsDistincting = ( query.getSelectClause().isDistinct() || hasLimit ) && containsCollectionFetches();

    QueryParameters queryParametersToUse;
    if ( hasLimit && containsCollectionFetches() ) {
      log.warn( "firstResult/maxResults specified with collection fetch; applying in memory!" );
      RowSelection selection = new RowSelection();
      selection.setFetchSize( queryParameters.getRowSelection().getFetchSize() );
      selection.setTimeout( queryParameters.getRowSelection().getTimeout() );
View Full Code Here

      if ( lm != null ) {
        lockModes.put( getSQLAlias( subcriteria ), lm );
      }
    }

    return new QueryParameters(
        typeArray,
            valueArray,
            lockModes,
            selection,
            rootCriteria.getCacheable(),
View Full Code Here

    List result;
    try {
      result = doQueryAndInitializeNonLazyCollections(
          session,
          new QueryParameters(
              new Type[] { identifierType },
              new Object[] { id },
              optionalObject,
              optionalEntityName,
              optionalIdentifier
View Full Code Here

    List result;
    try {
      result = doQueryAndInitializeNonLazyCollections(
          session,
          new QueryParameters(
              new Type[] { keyType, indexType },
              new Object[] { key, index }
            ),
          false
        );
View Full Code Here

    Arrays.fill( types, idType );
    List result;
    try {
      result = doQueryAndInitializeNonLazyCollections(
          session,
          new QueryParameters( types, ids, optionalObject, optionalEntityName, optionalId ),
          false
        );
    }
    catch ( SQLException sqle ) {
      throw JDBCExceptionHelper.convert(
View Full Code Here

TOP

Related Classes of org.hibernate.engine.QueryParameters

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.