Package org.hibernate.sql

Examples of org.hibernate.sql.JoinType


    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, targetColumns );
    elem = initializeJoin( path, destination, joinSequence, targetColumns, origin, false );
    elem.setUseFromFragment( true )// The associated entity is implied, but it must be included in the FROM.
    elem.setCollectionTableAlias( roleAlias )// The collection alias is the role.
    return elem;
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,
      boolean nullable,
      int currentDepth) throws MappingException {
    JoinType joinType = super.getJoinType(
        persister,
        path,
        propertyNumber,
        associationType,
        metadataFetchMode,
View Full Code Here

    // 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

      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[] 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

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.