javax.persistence.Table.indexes()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(513)

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

Table.indexes介绍

暂无

代码示例

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

  1. public void processComplementaryTableDefinitions(javax.persistence.Table table) {
  2. if ( table == null ) return;
  3. TableBinder.addIndexes( persistentClass.getTable(), table.indexes(), context );
  4. }
  5. public void processComplementaryTableDefinitions(org.hibernate.annotations.Table table) {

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

  1. annotation.setValue( "catalog", table.catalog() );
  2. annotation.setValue( "uniqueConstraints", table.uniqueConstraints() );
  3. annotation.setValue( "indexes", table.indexes() );

代码示例来源:origin: jamesagnew/hapi-fhir

  1. Validate.isTrue(nextConstraint.name().startsWith("IDX_"), nextConstraint.name() + " must start with IDX_");
  2. for (Index nextConstraint : table.indexes()) {
  3. assertNotADuplicateName(nextConstraint.name(), theNames);
  4. Validate.isTrue(nextConstraint.name().startsWith("IDX_"), nextConstraint.name() + " must start with IDX_");

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

  1. public void processComplementaryTableDefinitions(javax.persistence.Table table) {
  2. if ( table == null ) return;
  3. TableBinder.addIndexes( persistentClass.getTable(), table.indexes(), context );
  4. }
  5. public void processComplementaryTableDefinitions(org.hibernate.annotations.Table table) {

代码示例来源:origin: michaelliao/warpdb

  1. String getIndex() {
  2. Table table = this.entityClass.getAnnotation(Table.class);
  3. if (table != null) {
  4. return Arrays.stream(table.indexes()).map((c) -> {
  5. if (c.unique()) {
  6. String name = c.name().isEmpty() ? "UNI_" + c.columnList().replace(" ", "").replace(",", "_")
  7. : c.name();
  8. return " CONSTRAINT " + name + " UNIQUE (" + c.columnList() + "),\n";
  9. } else {
  10. String name = c.name().isEmpty() ? "IDX_" + c.columnList().replace(" ", "").replace(",", "_")
  11. : c.name();
  12. return " INDEX " + name + " (" + c.columnList() + "),\n";
  13. }
  14. }).reduce("", (acc, s) -> {
  15. return acc + s;
  16. });
  17. }
  18. return "";
  19. }

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

  1. Validate.isTrue(nextConstraint.name().startsWith("IDX_"), nextConstraint.name() + " must start with IDX_");
  2. for (Index nextConstraint : table.indexes()) {
  3. assertNotADuplicateName(nextConstraint.name(), theNames);
  4. Validate.isTrue(nextConstraint.name().startsWith("IDX_"), nextConstraint.name() + " must start with IDX_");

代码示例来源:origin: valchkou/cassandra-driver-mapping

  1. Index[] indexes = tableAntn.indexes();
  2. if (indexes != null && indexes.length > 0) {
  3. for (Index index : indexes) {

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

  1. annotation.setValue( "catalog", table.catalog() );
  2. annotation.setValue( "uniqueConstraints", table.uniqueConstraints() );
  3. annotation.setValue( "indexes", table.indexes() );

相关文章