Package org.hibernate.persister.entity

Examples of org.hibernate.persister.entity.OuterJoinLoadable


        final QueryableCollection collectionPersister = (QueryableCollection) joinable;
        lhsTableName = collectionPersister.getTableName();
        lhsColumnNames = collectionPersister.getElementColumnNames();
      }
      else {
        final OuterJoinLoadable entityPersister = (OuterJoinLoadable) source();
        lhsTableName = getLHSTableName( type, attributeNumber(), entityPersister );
        lhsColumnNames = getLHSColumnNames( type, attributeNumber(), entityPersister, sessionFactory() );
      }
      return new AssociationKey( lhsTableName, lhsColumnNames );
    }
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

        final QueryableCollection collectionPersister = (QueryableCollection) joinable;
        lhsTableName = collectionPersister.getTableName();
        lhsColumnNames = collectionPersister.getElementColumnNames();
      }
      else {
        final OuterJoinLoadable entityPersister = (OuterJoinLoadable) source();
        lhsTableName = getLHSTableName( type, attributeNumber(), entityPersister );
        lhsColumnNames = getLHSColumnNames( type, attributeNumber(), entityPersister, sessionFactory() );
      }
      return new AssociationKey( lhsTableName, lhsColumnNames );
    }
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

  throws HibernateException {
   
    final SessionImplementor session = ( (CriteriaImpl) criteria ).getSession(); //ugly!
    final SessionFactoryImplementor factory = session.getFactory();
   
    final OuterJoinLoadable persister = (OuterJoinLoadable) factory.getEntityPersister( criteriaImpl.getEntityOrClassName() );
    CriteriaQueryTranslator innerQuery = new CriteriaQueryTranslator(
        factory,
        criteriaImpl,
        criteriaImpl.getEntityOrClassName(), //implicit polymorphism not supported (would need a union)
        criteriaQuery.generateSQLAlias(),
        criteriaQuery
      );
   
    params = innerQuery.getQueryParameters(); //TODO: bad lifecycle....
    types = innerQuery.getProjectedTypes();
   
    //String filter = persister.filterFragment( innerQuery.getRootSQLALias(), session.getEnabledFilters() );
   
    String sql = new Select( factory.getDialect() )
      .setWhereClause( innerQuery.getWhereCondition() )
      .setGroupByClause( innerQuery.getGroupBy() )
      .setSelectClause( innerQuery.getSelect() )
      .setFromClause(
          persister.fromTableFragment( innerQuery.getRootSQLALias() ) +  
          persister.fromJoinFragment( innerQuery.getRootSQLALias(), true, false )
        )
      .toStatementString();
   
    final StringBuffer buf = new StringBuffer()
      .append( toLeftSqlString(criteria, criteriaQuery) );
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

  }

  @Override
  public String[] getColumnNames(Fetch fetch) {
    // TODO: cache this info
    final OuterJoinLoadable outerJoinLoadable = (OuterJoinLoadable) entityPersister;
    Type fetchType = getType( fetch );
    if ( fetchType.isAssociationType() ) {
      return JoinHelper.getLHSColumnNames(
          (AssociationType) fetchType,
          determinePropertyIndex( fetch ),
          outerJoinLoadable,
          outerJoinLoadable.getFactory()
      );
    }
    else {
      return outerJoinLoadable.getPropertyColumnNames( determinePropertyIndex( fetch ) );
    }
  }
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

    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.