Examples of QueryParameters


Examples of org.hibernate.engine.QueryParameters

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

Examples of org.hibernate.engine.QueryParameters

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

Examples of org.hibernate.engine.QueryParameters

    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

Examples of org.hibernate.engine.QueryParameters

    Serializable[] ids = new Serializable[]{id};
    try {
      doQueryAndInitializeNonLazyCollections(
          session,
          new QueryParameters( new Type[]{type}, ids, ids ),
          true
        );
    }
    catch ( SQLException sqle ) {
      throw JDBCExceptionHelper.convert(
View Full Code Here

Examples of org.hibernate.engine.QueryParameters

    Type[] idTypes = new Type[ids.length];
    Arrays.fill( idTypes, type );
    try {
      doQueryAndInitializeNonLazyCollections(
          session,
          new QueryParameters( idTypes, ids, ids ),
          true
        );
    }
    catch ( SQLException sqle ) {
      throw JDBCExceptionHelper.convert(
View Full Code Here

Examples of org.hibernate.engine.QueryParameters

    Type[] idTypes = new Type[ids.length];
    Arrays.fill( idTypes, type );
    try {
      doQueryAndInitializeNonLazyCollections( session,
          new QueryParameters( parameterTypes, parameterValues, namedParameters, ids ),
          true
        );
    }
    catch ( SQLException sqle ) {
      throw JDBCExceptionHelper.convert(
View Full Code Here

Examples of org.hibernate.engine.QueryParameters

  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

Examples of org.hibernate.engine.QueryParameters

  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

Examples of org.hibernate.engine.QueryParameters

    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

Examples of org.hibernate.engine.QueryParameters

  /**
   * Retrieve a list of persistent objects using a hibernate query
   */
  public List find(String query) throws HibernateException {
    return list( query, new QueryParameters() );
  }
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.