Package org.hibernate.persister.entity

Examples of org.hibernate.persister.entity.OuterJoinLoadable


    if ( includeCollectionColumns ) {
//      buf.append( selectFragment( lhsAlias, "" ) )//ignore suffix for collection columns!
      buf.append( selectFragment( lhsAlias, collectionSuffix ) )
          .append( ", " );
    }
    OuterJoinLoadable ojl = ( OuterJoinLoadable ) getElementPersister();
    return buf.append( ojl.selectFragment( lhsAlias, entitySuffix ) )//use suffix for the entity columns
        .toString();
  }
View Full Code Here


      LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( factory, loadQueryInfluencers );

    this.oneToManyPersister = oneToManyPersister;

    final OuterJoinLoadable elementPersister = (OuterJoinLoadable) oneToManyPersister.getElementPersister();
    final String alias = generateRootAlias( oneToManyPersister.getRole() );

    walkEntityTree(elementPersister, alias);

    List allAssociations = new ArrayList();
View Full Code Here

    if ( includeCollectionColumns ) {
//      buf.append( selectFragment( lhsAlias, "" ) )//ignore suffix for collection columns!
      buf.append( selectFragment( lhsAlias, collectionSuffix ) )
          .append( ", " );
    }
    OuterJoinLoadable ojl = ( OuterJoinLoadable ) getElementPersister();
    return buf.append( ojl.selectFragment( lhsAlias, entitySuffix ) )//use suffix for the entity columns
        .toString();
  }
View Full Code Here

 
  protected abstract String toLeftSqlString(Criteria criteria, CriteriaQuery outerQuery);

  public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
    final SessionFactoryImplementor factory = criteriaQuery.getFactory();
    final OuterJoinLoadable persister =
        ( OuterJoinLoadable ) factory.getEntityPersister( criteriaImpl.getEntityOrClassName() );

    createAndSetInnerQuery( criteriaQuery, factory );
    criteriaImpl.setSession( deriveRootSession( criteria ) );
View Full Code Here

    if ( includeCollectionColumns ) {
//      buf.append( selectFragment( lhsAlias, "" ) )//ignore suffix for collection columns!
      buf.append( selectFragment( lhsAlias, collectionSuffix ) )
          .append( ", " );
    }
    OuterJoinLoadable ojl = ( OuterJoinLoadable ) getElementPersister();
    return buf.append( ojl.selectFragment( lhsAlias, entitySuffix ) )//use suffix for the entity columns
        .toString();
  }
View Full Code Here

    if ( includeCollectionColumns ) {
//      buf.append( selectFragment( lhsAlias, "" ) )//ignore suffix for collection columns!
      buf.append( selectFragment( lhsAlias, collectionSuffix ) )
          .append( ", " );
    }
    OuterJoinLoadable ojl = ( OuterJoinLoadable ) getElementPersister();
    return buf.append( ojl.selectFragment( lhsAlias, entitySuffix ) )//use suffix for the entity columns
        .toString();
  }
View Full Code Here

              true
          )
      );

      // add select fragments from the element entity table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      final OuterJoinLoadable elementPersister = (OuterJoinLoadable) queryableCollection.getElementPersister();
      selectStatementBuilder.appendSelectClauseFragment(
          elementPersister.selectFragment(
              elementTableAlias,
              aliases.getEntityElementAliases().getColumnAliases().getSuffix()
          )
      );

      // add SQL ORDER-BY fragments
      final String manyToManyOrdering = queryableCollection.getManyToManyOrderByString( elementTableAlias );
      if ( StringHelper.isNotEmpty( manyToManyOrdering ) ) {
        selectStatementBuilder.appendOrderByFragment( manyToManyOrdering );
      }

      final String ordering = queryableCollection.getSQLOrderByString( collectionTableAlias );
      if ( StringHelper.isNotEmpty( ordering ) ) {
        selectStatementBuilder.appendOrderByFragment( ordering );
      }

      readerCollector.add(
          new EntityReferenceInitializerImpl(
              (EntityReference) fetch.getElementGraph(),
              aliasResolutionContext.resolveEntityReferenceAliases( fetch.getElementGraph().getQuerySpaceUid() )
          )
      );
    }
    else {
      // select the "collection columns"
      selectStatementBuilder.appendSelectClauseFragment(
          queryableCollection.selectFragment(
              aliases.getElementTableAlias(),
              aliases.getCollectionColumnAliases().getSuffix()
          )
      );

      if ( fetch.getCollectionPersister().isOneToMany() ) {
        // if the collection elements are entities, select the entity columns as well
        final OuterJoinLoadable elementPersister = (OuterJoinLoadable) queryableCollection.getElementPersister();
        selectStatementBuilder.appendSelectClauseFragment(
            elementPersister.selectFragment(
                aliases.getElementTableAlias(),
                aliases.getEntityElementAliases().getColumnAliases().getSuffix()
            )
        );
        readerCollector.add(
View Full Code Here

    if ( includeCollectionColumns ) {
//      buf.append( selectFragment( lhsAlias, "" ) )//ignore suffix for collection columns!
      buf.append( selectFragment( lhsAlias, collectionSuffix ) )
          .append( ", " );
    }
    OuterJoinLoadable ojl = ( OuterJoinLoadable ) getElementPersister();
    return buf.append( ojl.selectFragment( lhsAlias, entitySuffix ) )//use suffix for the entity columns
        .toString();
  }
View Full Code Here

      LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( factory, loadQueryInfluencers );

    this.oneToManyPersister = oneToManyPersister;

    final OuterJoinLoadable elementPersister = (OuterJoinLoadable) oneToManyPersister.getElementPersister();
    final String alias = generateRootAlias( oneToManyPersister.getRole() );

    walkEntityTree(elementPersister, alias);

    List allAssociations = new ArrayList();
View Full Code Here

    if ( includeCollectionColumns ) {
//      buf.append( selectFragment( lhsAlias, "" ) )//ignore suffix for collection columns!
      buf.append( selectFragment( lhsAlias, collectionSuffix ) )
          .append( ", " );
    }
    OuterJoinLoadable ojl = ( OuterJoinLoadable ) getElementPersister();
    return buf.append( ojl.selectFragment( lhsAlias, entitySuffix ) )//use suffix for the entity columns
        .toString();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.persister.entity.OuterJoinLoadable

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.