Package org.hibernate.sql

Examples of org.hibernate.sql.JoinType


    // The path AST should be a DotNode, and it should have been evaluated already.
    if ( path.getType() != SqlTokenTypes.DOT ) {
      throw new SemanticException( "Path expected for join!" );
    }
    DotNode dot = (DotNode) path;
    JoinType hibernateJoinType = JoinProcessor.toHibernateJoinType( joinType );
    dot.setJoinType( hibernateJoinType );    // Tell the dot node about the join type.
    dot.setFetch( fetch );
    // Generate an explicit join for the root dot node.   The implied joins will be collected and passed up
    // to the root dot node.
    dot.resolve( true, false, alias == null ? null : alias.getText() );
View Full Code Here


    final String[] idCols = StringHelper.qualify( name, getIdentifierColumnNames() );
    final JoinFragment join = getFactory().getDialect().createOuterJoinFragment();
    final int tableSpan = getSubclassTableSpan();
    // IMPL NOTE : notice that we skip the first table; it is the driving table!
    for ( int j = 1; j < tableSpan; j++ ) {
      final JoinType joinType = determineSubclassTableJoinType(
          j,
          innerJoin,
          includeSubclasses,
          treatAsDeclarations
      );
View Full Code Here

  public boolean isJoin(String path) {
    return associationPathCriteriaMap.containsKey( path );
  }

  public JoinType getJoinType(String path) {
    JoinType result = associationPathJoinTypesMap.get( path );
    return ( result == null ? JoinType.INNER_JOIN : result );
  }
View Full Code Here

      String wholeAssociationPath = getWholeAssociationPath( crit );
      Object old = associationPathCriteriaMap.put( wholeAssociationPath, crit );
      if ( old != null ) {
        throw new QueryException( "duplicate association path: " + wholeAssociationPath );
      }
      JoinType joinType = crit.getJoinType();
      old = associationPathJoinTypesMap.put( wholeAssociationPath, joinType );
      if ( old != null ) {
        // TODO : not so sure this is needed...
        throw new QueryException( "duplicate association path: " + wholeAssociationPath );
      }
View Full Code Here

        String[] lhsColumns = persister.getElementColumnNames();
        // if the current depth is 0, the root thing being loaded is the
        // many-to-many collection itself.  Here, it is alright to use
        // an inner join...
        boolean useInnerJoin = currentDepth == 0;
        final JoinType joinType = getJoinType(
            associationType,
            persister.getFetchMode(),
            path,
            persister.getTableName(),
            lhsColumns,
View Full Code Here

        associationType, propertyNumber, persister, getFactory()
    );
    String lhsTable = JoinHelper.getLHSTableName(associationType, propertyNumber, persister);

    PropertyPath subPath = path.append( persister.getSubclassPropertyName(propertyNumber) );
    JoinType joinType = getJoinType(
        persister,
        subPath,
        propertyNumber,
        associationType,
        persister.getFetchMode( propertyNumber ),
View Full Code Here

        );
        String lhsTable = JoinHelper.getLHSTableName(associationType, propertyNumber, persister);

        final PropertyPath subPath = path.append( propertyNames[i] );
        final boolean[] propertyNullability = componentType.getPropertyNullability();
        final JoinType joinType = getJoinType(
            persister,
            subPath,
            propertyNumber,
            associationType,
            componentType.getFetchMode(i),
View Full Code Here

        // (or even a property-ref) in a composite-element:
        String[] aliasedLhsColumns = StringHelper.qualify(alias, lhsColumns);

        final PropertyPath subPath = path.append( propertyNames[i] );
        final boolean[] propertyNullability = compositeType.getPropertyNullability();
        final JoinType joinType = getJoinType(
            associationType,
            compositeType.getFetchMode(i),
            subPath,
            persister.getTableName(),
            lhsColumns,
View Full Code Here

      CascadeStyle metadataCascadeStyle,
      String lhsTable,
      String[] lhsColumns,
      final boolean nullable,
      final int currentDepth) throws MappingException {
    final JoinType resolvedJoinType;
    if ( translator.isJoin( path.getFullPath() ) ) {
      resolvedJoinType = translator.getJoinType( path.getFullPath() );
    }
    else {
      if ( translator.hasProjection() ) {
View Full Code Here

    String[] targetColumns = sfh.getCollectionElementColumns( role, roleAlias );
    AssociationType elementAssociationType = sfh.getElementAssociationType( type );

    // Create the join element under the from element.
    JoinType joinType = JoinType.INNER_JOIN;
    JoinSequence joinSequence = sfh.createJoinSequence(
        implied,
        elementAssociationType,
        tableAlias,
        joinType,
View Full Code Here

TOP

Related Classes of org.hibernate.sql.JoinType

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.