Examples of addJoin()


Examples of org.hibernate.engine.JoinSequence.addJoin()

   * @return The generated join sequence.
   */
  public JoinSequence createJoinSequence(boolean implicit, AssociationType associationType, String tableAlias, int joinType, String[] columns) {
    JoinSequence joinSequence = createJoinSequence();
    joinSequence.setUseThetaStyle( implicit )// Implicit joins use theta style (WHERE pk = fk), explicit joins use JOIN (after from)
    joinSequence.addJoin( associationType, tableAlias, joinType, columns );
    return joinSequence;
  }

  /**
   * Create a join sequence rooted at the given collection.
View Full Code Here

Examples of org.hibernate.engine.JoinSequence.addJoin()

    join.setRoot( persister, collectionName );
    if ( !persister.isOneToMany() ) {
      //many-to-many
      addCollection( collectionName, collectionRole );
      try {
        join.addJoin( ( AssociationType ) persister.getElementType(),
            elementName,
            JoinFragment.INNER_JOIN,
            persister.getElementColumnNames(collectionName) );
      }
      catch ( MappingException me ) {
View Full Code Here

Examples of org.hibernate.engine.JoinSequence.addJoin()

    join.setRoot( persister, collectionName );
    if ( !persister.isOneToMany() ) {
      //many-to-many
      addCollection( collectionName, collectionRole );
      try {
        join.addJoin( ( AssociationType ) persister.getElementType(),
            elementName,
            JoinFragment.INNER_JOIN,
            persister.getElementColumnNames(collectionName) );
      }
      catch ( MappingException me ) {
View Full Code Here

Examples of org.hibernate.engine.JoinSequence.addJoin()

        ? fromElement.getTableAlias()
        : fromClause.getAliasGenerator().createName( collectionFilterRole );
    JoinSequence join = sessionFactoryHelper.createJoinSequence();
    join.setRoot( persister, fkTableAlias );
    if ( !persister.isOneToMany() ) {
      join.addJoin( ( AssociationType ) persister.getElementType(),
          fromElement.getTableAlias(),
          JoinFragment.INNER_JOIN,
          persister.getElementColumnNames( fkTableAlias ) );
    }
    join.addCondition( fkTableAlias, keyColumnNames, " = ?" );
View Full Code Here

Examples of org.hibernate.engine.internal.JoinSequence.addJoin()

        ? fromElement.getTableAlias()
        : fromClause.getAliasGenerator().createName( collectionFilterRole );
    JoinSequence join = sessionFactoryHelper.createJoinSequence();
    join.setRoot( persister, fkTableAlias );
    if ( !persister.isOneToMany() ) {
      join.addJoin(
          (AssociationType) persister.getElementType(),
          fromElement.getTableAlias(),
          JoinType.INNER_JOIN,
          persister.getElementColumnNames( fkTableAlias )
      );
View Full Code Here

Examples of org.hibernate.engine.internal.JoinSequence.addJoin()

    join.setRoot( persister, collectionName );
    if ( !persister.isOneToMany() ) {
      //many-to-many
      addCollection( collectionName, collectionRole );
      try {
        join.addJoin( ( AssociationType ) persister.getElementType(),
            elementName,
            JoinType.INNER_JOIN,
            persister.getElementColumnNames(collectionName) );
      }
      catch ( MappingException me ) {
View Full Code Here

Examples of org.hibernate.engine.internal.JoinSequence.addJoin()

   * @return The generated join sequence.
   */
  public JoinSequence createJoinSequence(boolean implicit, AssociationType associationType, String tableAlias, JoinType joinType, String[] columns) {
    JoinSequence joinSequence = createJoinSequence();
    joinSequence.setUseThetaStyle( implicit );    // Implicit joins use theta style (WHERE pk = fk), explicit joins use JOIN (after from)
    joinSequence.addJoin( associationType, tableAlias, joinType, columns );
    return joinSequence;
  }

  /**
   * Create a join sequence rooted at the given collection.
View Full Code Here

Examples of org.hibernate.sql.JoinFragment.addJoin()

    final int tableSpan = getSubclassTableSpan();
    for ( int j = 1; j < tableSpan; j++ ) { //notice that we skip the first table; it is the driving table!
      final boolean joinIsIncluded = isClassOrSuperclassTable( j ) ||
          ( includeSubclasses && !isSubclassTableSequentialSelect( j ) && !isSubclassTableLazy( j ) );
      if ( joinIsIncluded ) {
        join.addJoin( getSubclassTableName( j ),
            generateTableAlias( name, j ),
            idCols,
            getSubclassTableKeyColumns( j ),
            innerJoin && isClassOrSuperclassTable( j ) && !isInverseTable( j ) && !isNullableTable( j ) ?
            JoinFragment.INNER_JOIN : //we can inner join to superclass tables (the row MUST be there)
View Full Code Here

Examples of org.hibernate.sql.JoinFragment.addJoin()

  protected JoinFragment createJoin(int[] tableNumbers, String drivingAlias) {
    final String[] keyCols = StringHelper.qualify( drivingAlias, getSubclassTableKeyColumns( tableNumbers[0] ) );
    final JoinFragment jf = getFactory().getDialect().createOuterJoinFragment();
    for ( int i = 1; i < tableNumbers.length; i++ ) { //skip the driving table
      final int j = tableNumbers[i];
      jf.addJoin( getSubclassTableName( j ),
          generateTableAlias( getRootAlias(), j ),
          keyCols,
          getSubclassTableKeyColumns( j ),
          isInverseSubclassTable( j ) || isNullableSubclassTable( j ) ?
          JoinFragment.LEFT_OUTER_JOIN :
View Full Code Here

Examples of org.hibernate.sql.JoinFragment.addJoin()

          includeSubclasses,
          treatAsDeclarations
      );

      if ( joinType != null && joinType != JoinType.NONE ) {
        join.addJoin(
            getSubclassTableName( j ),
            generateTableAlias( name, j ),
            idCols,
            getSubclassTableKeyColumns( j ),
            joinType
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.