Examples of addPrimaryKeyColumns()


Examples of org.hibernate.sql.Delete.addPrimaryKeyColumns()

    }
    else if ( hasIndex && !indexContainsFormula ) {
      delete.addPrimaryKeyColumns( ArrayHelper.join( keyColumnNames, indexColumnNames ) );
    }
    else {
      delete.addPrimaryKeyColumns( keyColumnNames );
      delete.addPrimaryKeyColumns( elementColumnNames, elementColumnIsInPrimaryKey, elementColumnWriters );
    }
   
    if ( getFactory().getSettings().isCommentsEnabled() ) {
      delete.setComment( "delete collection row " + getRole() );
View Full Code Here

Examples of org.hibernate.sql.Delete.addPrimaryKeyColumns()

    else if ( hasIndex && !indexContainsFormula ) {
      delete.addPrimaryKeyColumns( ArrayHelper.join( keyColumnNames, indexColumnNames ) );
    }
    else {
      delete.addPrimaryKeyColumns( keyColumnNames );
      delete.addPrimaryKeyColumns( elementColumnNames, elementColumnIsInPrimaryKey, elementColumnWriters );
    }
   
    if ( getFactory().getSettings().isCommentsEnabled() ) {
      delete.setComment( "delete collection row " + getRole() );
    }
View Full Code Here

Examples of org.hibernate.sql.Update.addPrimaryKeyColumns()

    update.setTableName( getTableName( 0 ) );
    if ( getFactory().getSettings().isCommentsEnabled() ) {
      update.setComment( "forced version increment" );
    }
    update.addColumn( getVersionColumnName() );
    update.addPrimaryKeyColumns( getIdentifierColumnNames() );
    update.setVersionColumnName( getVersionColumnName() );
    return update.toStatementString();
  }

  /**
 
View Full Code Here

Examples of org.hibernate.sql.Update.addPrimaryKeyColumns()

    Update update = new Update( getFactory().getDialect() ).setTableName( getTableName( j ) );

    // select the correct row by either pk or rowid
    if ( useRowId ) {
      update.addPrimaryKeyColumns( new String[]{rowIdName} ); //TODO: eventually, rowIdName[j]
    }
    else {
      update.addPrimaryKeyColumns( getKeyColumns( j ) );
    }
View Full Code Here

Examples of org.hibernate.sql.Update.addPrimaryKeyColumns()

    // select the correct row by either pk or rowid
    if ( useRowId ) {
      update.addPrimaryKeyColumns( new String[]{rowIdName} ); //TODO: eventually, rowIdName[j]
    }
    else {
      update.addPrimaryKeyColumns( getKeyColumns( j ) );
    }

    boolean hasColumns = false;
    for ( int i = 0; i < entityMetamodel.getPropertySpan(); i++ ) {
      if ( includeProperty[i] && isPropertyOfTable( i, j ) ) {
View Full Code Here

Examples of org.hibernate.sql.Update.addPrimaryKeyColumns()

    //identifier collections not supported for 1-to-many
    if ( getFactory().getSettings().isCommentsEnabled() ) {
      update.setComment( "create one-to-many row " + getRole() );
    }
   
    return update.addPrimaryKeyColumns( elementColumnNames, elementColumnWriters )
        .toStatementString();
  }

  /**
   * Generate the SQL UPDATE that inserts a collection index
View Full Code Here

Examples of org.hibernate.sql.Update.addPrimaryKeyColumns()

   * Generate the SQL UPDATE that inserts a collection index
   */
  @Override
    protected String generateUpdateRowString() {
    Update update = new Update( getDialect() ).setTableName( qualifiedTableName );
    update.addPrimaryKeyColumns( elementColumnNames, elementColumnIsSettable, elementColumnWriters );
    if ( hasIdentifier ) {
      update.addPrimaryKeyColumns( new String[]{ identifierColumnName } );
    }
    if ( hasIndex && !indexContainsFormula ) {
      update.addColumns( indexColumnNames );
View Full Code Here

Examples of org.hibernate.sql.Update.addPrimaryKeyColumns()

  @Override
    protected String generateUpdateRowString() {
    Update update = new Update( getDialect() ).setTableName( qualifiedTableName );
    update.addPrimaryKeyColumns( elementColumnNames, elementColumnIsSettable, elementColumnWriters );
    if ( hasIdentifier ) {
      update.addPrimaryKeyColumns( new String[]{ identifierColumnName } );
    }
    if ( hasIndex && !indexContainsFormula ) {
      update.addColumns( indexColumnNames );
    }
   
View Full Code Here

Examples of org.hibernate.sql.Update.addPrimaryKeyColumns()

   
    //use a combination of foreign key columns and pk columns, since
    //the ordering of removal and addition is not guaranteed when
    //a child moves from one parent to another
    String[] rowSelectColumnNames = ArrayHelper.join( keyColumnNames, elementColumnNames );
    return update.addPrimaryKeyColumns( rowSelectColumnNames )
        .toStatementString();
  }
 
  @Override
  public void recreate(PersistentCollection collection, Serializable id, SessionImplementor session)
View Full Code Here

Examples of org.hibernate.sql.Update.addPrimaryKeyColumns()

    //identifier collections not supported for 1-to-many
    if ( getFactory().getSettings().isCommentsEnabled() ) {
      update.setComment( "create one-to-many row " + getRole() );
    }
   
    return update.addPrimaryKeyColumns( elementColumnNames, elementColumnWriters )
        .toStatementString();
  }

  /**
   * Not needed for one-to-many association
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.