Examples of addPrimaryKeyColumns()


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

  protected String generateLockString() {
    SessionFactoryImplementor factory = lockable.getFactory();
    Update update = new Update( factory.getDialect() );
    update.setTableName( lockable.getRootTableName() );
    update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
    update.setVersionColumnName( lockable.getVersionColumnName() );
    update.addColumn( lockable.getVersionColumnName() );
    if ( factory.getSettings().isCommentsEnabled() ) {
      update.setComment( lockMode + " lock " + lockable.getEntityName() );
    }
View Full Code Here

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

  protected String generateLockString() {
    SessionFactoryImplementor factory = lockable.getFactory();
    Update update = new Update( factory.getDialect() );
    update.setTableName( lockable.getRootTableName() );
    update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
    update.setVersionColumnName( lockable.getVersionColumnName() );
    update.addColumn( lockable.getVersionColumnName() );
    if ( factory.getSettings().isCommentsEnabled() ) {
      update.setComment( lockMode + " lock " + lockable.getEntityName() );
    }
View Full Code Here

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

  protected String generateLockString() {
    SessionFactoryImplementor factory = lockable.getFactory();
    Update update = new Update( factory.getDialect() );
    update.setTableName( lockable.getRootTableName() );
    update.addPrimaryKeyColumns( lockable.getRootTableIdentifierColumnNames() );
    update.setVersionColumnName( lockable.getVersionColumnName() );
    update.addColumn( lockable.getVersionColumnName() );
    if ( factory.getSettings().isCommentsEnabled() ) {
      update.setComment( lockMode + " lock " + lockable.getEntityName() );
    }
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

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

  public boolean consumesEntityAlias() {
    return true;
View Full Code Here

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

    //if ( !elementIsFormula ) {
      update.addColumns( elementColumnNames, elementColumnIsSettable, elementColumnWriters );
    //}
   
    if ( hasIdentifier ) {
      update.addPrimaryKeyColumns( new String[]{ identifierColumnName } );
    }
    else if ( hasIndex && !indexContainsFormula ) {
      update.addPrimaryKeyColumns( ArrayHelper.join( keyColumnNames, indexColumnNames ) );
    }
    else {
View Full Code Here

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

   
    if ( hasIdentifier ) {
      update.addPrimaryKeyColumns( new String[]{ identifierColumnName } );
    }
    else if ( hasIndex && !indexContainsFormula ) {
      update.addPrimaryKeyColumns( ArrayHelper.join( keyColumnNames, indexColumnNames ) );
    }
    else {
      update.addPrimaryKeyColumns( keyColumnNames );
      update.addPrimaryKeyColumns( elementColumnNames, elementColumnIsInPrimaryKey, elementColumnWriters );
    }
View Full Code Here

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

    }
    else if ( hasIndex && !indexContainsFormula ) {
      update.addPrimaryKeyColumns( ArrayHelper.join( keyColumnNames, indexColumnNames ) );
    }
    else {
      update.addPrimaryKeyColumns( keyColumnNames );
      update.addPrimaryKeyColumns( elementColumnNames, elementColumnIsInPrimaryKey, elementColumnWriters );
    }
   
    if ( getFactory().getSettings().isCommentsEnabled() ) {
      update.setComment( "update collection row " + getRole() );
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.