Package org.hibernate.engine

Examples of org.hibernate.engine.QueryParameters


  public List find(String query) throws HibernateException {
    return list( query, new QueryParameters() );
  }

  public List find(String query, Object value, Type type) throws HibernateException {
    return list( query, new QueryParameters(type, value) );
  }
View Full Code Here


  public List find(String query, Object value, Type type) throws HibernateException {
    return list( query, new QueryParameters(type, value) );
  }

  public List find(String query, Object[] values, Type[] types) throws HibernateException {
    return list( query, new QueryParameters(types, values) );
  }
View Full Code Here

        }
        return result;
    }

  public Iterator iterate(String query) throws HibernateException {
    return iterate( query, new QueryParameters() );
  }
View Full Code Here

  public Iterator iterate(String query) throws HibernateException {
    return iterate( query, new QueryParameters() );
  }

  public Iterator iterate(String query, Object value, Type type) throws HibernateException {
    return iterate( query, new QueryParameters(type, value) );
  }
View Full Code Here

  public Iterator iterate(String query, Object value, Type type) throws HibernateException {
    return iterate( query, new QueryParameters(type, value) );
  }

  public Iterator iterate(String query, Object[] values, Type[] types) throws HibernateException {
    return iterate( query, new QueryParameters(types, values) );
  }
View Full Code Here

  private Serializable getProxyIdentifier(Object proxy) {
    return ( (HibernateProxy) proxy ).getHibernateLazyInitializer().getIdentifier();
  }

  public Collection filter(Object collection, String filter) throws HibernateException {
    return listFilter( collection, filter, new QueryParameters( new Type[1], new Object[1] ) );
  }
View Full Code Here

  public Collection filter(Object collection, String filter) throws HibernateException {
    return listFilter( collection, filter, new QueryParameters( new Type[1], new Object[1] ) );
  }

  public Collection filter(Object collection, String filter, Object value, Type type) throws HibernateException {
    return listFilter( collection, filter, new QueryParameters( new Type[]{null, type}, new Object[]{null, value} ) );
  }
View Full Code Here

  throws HibernateException {
    Object[] vals = new Object[values.length + 1];
    Type[] typs = new Type[types.length + 1];
    System.arraycopy( values, 0, vals, 1, values.length );
    System.arraycopy( types, 0, typs, 1, types.length );
    return listFilter( collection, filter, new QueryParameters( typs, vals ) );
  }
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

      queryParameters.traceParameters( session.getFactory() );
    }
    boolean hasLimit = queryParameters.getRowSelection() != null &&
                       queryParameters.getRowSelection().definesLimits();
    boolean needsLimit = hasLimit && translators.length > 1;
    QueryParameters queryParametersToUse;
    if ( needsLimit ) {
      log.warn( "firstResult/maxResults specified on polymorphic query; applying in memory!" );
      RowSelection selection = new RowSelection();
      selection.setFetchSize( queryParameters.getRowSelection().getFetchSize() );
      selection.setTimeout( queryParameters.getRowSelection().getTimeout() );
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.