Examples of JoinType


Examples of org.hibernate.sql.JoinType

  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

Examples of org.hibernate.sql.JoinType

      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

Examples of org.hibernate.sql.JoinType

        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

Examples of org.hibernate.sql.JoinType

        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

Examples of org.hibernate.sql.JoinType

        );
        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

Examples of org.hibernate.sql.JoinType

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

Examples of org.hibernate.sql.JoinType

      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

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,
View Full Code Here

Examples of org.hibernate.sql.JoinType

    String role = type.getRole();
    QueryableCollection queryableCollection = getSessionFactoryHelper().requireQueryableCollection(role);

    String alias = null// DotNode uses null here...
    String columnTableAlias = getFromElement().getTableAlias();
    JoinType joinType = JoinType.INNER_JOIN;
    boolean fetch = false;

    FromElementFactory factory = new FromElementFactory(
        getWalker().getCurrentFromClause(),
        getFromElement(),
View Full Code Here

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