org.hibernate.mapping.Index.addColumn()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中org.hibernate.mapping.Index.addColumn()方法的一些代码示例,展示了Index.addColumn()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Index.addColumn()方法的具体详情如下:
包路径:org.hibernate.mapping.Index
类名称:Index
方法名:addColumn

Index.addColumn介绍

暂无

代码示例

代码示例来源:origin: hibernate/hibernate-orm

public void addColumns(Iterator extraColumns) {
  while ( extraColumns.hasNext() ) {
    addColumn( (Column) extraColumns.next() );
  }
}

代码示例来源:origin: hibernate/hibernate-orm

public void addColumn(Column column, String order) {
  addColumn( column );
  if ( StringHelper.isNotEmpty( order ) ) {
    columnOrderMap.put( column, order );
  }
}

代码示例来源:origin: hibernate/hibernate-orm

private void addConstraintToColumns(List<Column> columns) {
    if ( unique ) {
      UniqueKey uniqueKey = table.getOrCreateUniqueKey( indexName );
      for ( Column column : columns ) {
        uniqueKey.addColumn( column );
      }
    }
    else {
      Index index = table.getOrCreateIndex( indexName );
      for ( Column column : columns ) {
        index.addColumn( column );
      }
    }
  }
}

代码示例来源:origin: hibernate/hibernate-orm

String order = orderings != null ? orderings[i] : null;
if ( table.containsColumn( column ) ) {
  index.addColumn( column, order );
  unbound.remove( column );

代码示例来源:origin: hibernate/hibernate-orm

private void addConstraintToColumn(final String columnName ) {
  Column column = table.getColumn(
      new Column(
          buildingContext.getMetadataCollector().getPhysicalColumnName( table, columnName )
      )
  );
  if ( column == null ) {
    throw new AnnotationException(
        "@Index references a unknown column: " + columnName
    );
  }
  if ( unique ) {
    table.getOrCreateUniqueKey( indexName ).addColumn( column );
  }
  else {
    table.getOrCreateIndex( indexName ).addColumn( column );
  }
}

代码示例来源:origin: hibernate/hibernate-orm

table.getOrCreateIndex( name ).addColumn( column );

代码示例来源:origin: org.hibernate/hibernate-annotations

private void addConstraintToColumn(String columnName) {
    Column column = table.getColumn(
        new Column(
            mappings.getPhysicalColumnName( columnName, table )
        )
    );
    if ( column == null ) {
      throw new AnnotationException(
          "@Index references a unknown column: " + columnName
      );
    }
    if ( unique )
      table.getOrCreateUniqueKey( indexName ).addColumn( column );
    else
      table.getOrCreateIndex( indexName ).addColumn( column );
  }
}

代码示例来源:origin: org.hibernate.orm/hibernate-core

@Override
public void addColumns(List<? extends MappedColumn> columns) {
  for ( MappedColumn mappedColumn : columns ) {
    addColumn( (Column) mappedColumn );
  }
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public void addColumns(Iterator extraColumns) {
  while ( extraColumns.hasNext() ) addColumn( (Column) extraColumns.next() );
}

代码示例来源:origin: org.hibernate.orm/hibernate-core

/**
 * @deprecated since 6.0, use {#link #addColumns(List<? extends MappedColumn>()}.
 */
@Deprecated
public void addColumns(Iterator extraColumns) {
  while ( extraColumns.hasNext() ) {
    addColumn( (Column) extraColumns.next() );
  }
}

代码示例来源:origin: hibernate/hibernate

public void addColumns(Iterator extraColumns) {
  while ( extraColumns.hasNext() ) addColumn( (Column) extraColumns.next() );
}
/**

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public void addColumns(Iterator extraColumns) {
  while ( extraColumns.hasNext() ) addColumn( (Column) extraColumns.next() );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public void addColumns(Iterator extraColumns) {
  while ( extraColumns.hasNext() ) addColumn( (Column) extraColumns.next() );
}

代码示例来源:origin: org.hibernate.orm/hibernate-core

@Override
public void addColumn(Column column, String order) {
  addColumn( column );
  if ( StringHelper.isNotEmpty( order ) ) {
    columnOrderMap.put( column, order );
  }
}

代码示例来源:origin: hibernate/hibernate

private static void bindIndex(Attribute indexAttribute, Table table, Column column) {
  if ( indexAttribute != null && table != null ) {
    StringTokenizer tokens = new StringTokenizer( indexAttribute.getValue(), ", " );
    while ( tokens.hasMoreTokens() ) {
      table.getOrCreateIndex( tokens.nextToken() ).addColumn( column );
    }
  }
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

private static void bindIndex(Attribute indexAttribute, Table table, Column column, Mappings mappings) {
  if ( indexAttribute != null && table != null ) {
    StringTokenizer tokens = new StringTokenizer( indexAttribute.getValue(), ", " );
    while ( tokens.hasMoreTokens() ) {
      table.getOrCreateIndex( tokens.nextToken() ).addColumn( column );
    }
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

private static void bindIndex(Attribute indexAttribute, Table table, Column column, Mappings mappings) {
  if ( indexAttribute != null && table != null ) {
    StringTokenizer tokens = new StringTokenizer( indexAttribute.getValue(), ", " );
    while ( tokens.hasMoreTokens() ) {
      table.getOrCreateIndex( tokens.nextToken() ).addColumn( column );
    }
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

private static void bindIndex(Attribute indexAttribute, Table table, Column column, Mappings mappings) {
  if ( indexAttribute != null && table != null ) {
    StringTokenizer tokens = new StringTokenizer( indexAttribute.getValue(), ", " );
    while ( tokens.hasMoreTokens() ) {
      table.getOrCreateIndex( tokens.nextToken() ).addColumn( column );
    }
  }
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

private void addIndexToColumn(String columnName) {
    Column column = table.getColumn(
        new Column(
            mappings.getPhysicalColumnName( columnName, table )
        )
    );
    if ( column == null ) {
      throw new AnnotationException(
          "@Index references a unknown column: " + columnName
      );
    }
    table.getOrCreateIndex( indexName ).addColumn( column );
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

private void addConstraintToColumn(String columnName) {
    Column column = table.getColumn(
        new Column(
            mappings.getPhysicalColumnName( columnName, table )
        )
    );
    if ( column == null ) {
      throw new AnnotationException(
          "@Index references a unknown column: " + columnName
      );
    }
    if ( unique )
      table.getOrCreateUniqueKey( indexName ).addColumn( column );
    else
      table.getOrCreateIndex( indexName ).addColumn( column );
  }
}

相关文章