javax.persistence.JoinTable.uniqueConstraints()方法的使用及代码示例

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

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

JoinTable.uniqueConstraints介绍

暂无

代码示例

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

);
joinColumns = joinTable.joinColumns();
uniqueConstraintHolders = TableBinder.buildUniqueConstraintHolders( joinTable.uniqueConstraints() );

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

@Test
public void testJoinTableNoChildren() throws Exception {
  reader = getReader( Entity2.class, "field1", "many-to-many.orm16.xml" );
  assertAnnotationPresent( ManyToMany.class );
  assertAnnotationPresent( JoinTable.class );
  assertAnnotationNotPresent( JoinColumns.class );
  assertAnnotationNotPresent( JoinColumn.class );
  JoinTable joinTableAnno = reader.getAnnotation( JoinTable.class );
  assertEquals( "", joinTableAnno.catalog() );
  assertEquals( "", joinTableAnno.name() );
  assertEquals( "", joinTableAnno.schema() );
  assertEquals( 0, joinTableAnno.joinColumns().length );
  assertEquals( 0, joinTableAnno.inverseJoinColumns().length );
  assertEquals( 0, joinTableAnno.uniqueConstraints().length );
}

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

@Test
public void testJoinTableNoChildren() throws Exception {
  reader = getReader( Entity1.class, "field1", "many-to-one.orm4.xml" );
  assertAnnotationPresent( ManyToOne.class );
  assertAnnotationNotPresent( JoinColumn.class );
  assertAnnotationNotPresent( JoinColumns.class );
  assertAnnotationPresent( JoinTable.class );
  JoinTable joinTableAnno = reader.getAnnotation( JoinTable.class );
  assertEquals( "", joinTableAnno.catalog() );
  assertEquals( "", joinTableAnno.name() );
  assertEquals( "", joinTableAnno.schema() );
  assertEquals( 0, joinTableAnno.joinColumns().length );
  assertEquals( 0, joinTableAnno.inverseJoinColumns().length );
  assertEquals( 0, joinTableAnno.uniqueConstraints().length );
}

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

ad.setValue( "schema", table.schema() );
ad.setValue( "catalog", table.catalog() );
ad.setValue( "uniqueConstraints", table.uniqueConstraints() );
ad.setValue( "joinColumns", table.joinColumns() );
ad.setValue( "inverseJoinColumns", table.inverseJoinColumns() );

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

schema = assocTable.schema();
tableName = assocTable.name();
uniqueConstraints = assocTable.uniqueConstraints();
joins = assocTable.joinColumns();
inverseJoins = assocTable.inverseJoinColumns();

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

.uniqueConstraints();
assertEquals( 2, uniqueConstraints.length );
assertEquals( "", uniqueConstraints[0].name() );

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

.uniqueConstraints();
assertEquals( 2, uniqueConstraints.length );
assertEquals( "", uniqueConstraints[0].name() );

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

secondaryTableNameContext = new SecondaryTableNameSource( joinTable.name() );
joinColumns = joinTable.joinColumns();
uniqueConstraintHolders = TableBinder.buildUniqueConstraintHolders( joinTable.uniqueConstraints() );

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

.uniqueConstraints();
assertEquals( 2, uniqueConstraints.length );
assertEquals( "", uniqueConstraints[0].name() );

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

ad.setValue( "schema", table.schema() );
ad.setValue( "catalog", table.catalog() );
ad.setValue( "uniqueConstraints", table.uniqueConstraints() );
ad.setValue( "joinColumns", table.joinColumns() );
ad.setValue( "inverseJoinColumns", table.inverseJoinColumns() );

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

schema = assocTable.schema();
tableName = assocTable.name();
uniqueConstraints = assocTable.uniqueConstraints();
joins = assocTable.joinColumns();
inverseJoins = assocTable.inverseJoinColumns();

代码示例来源:origin: org.batoo.jpa/batoo-jpa

/**
 * @param locator
 *            the locator
 * @param annotation
 *            the annotation
 * 
 * @since 2.0.0
 */
public JoinTableMetadaImpl(AbstractLocator locator, JoinTable annotation) {
  super();
  this.locator = locator;
  this.catalog = annotation.catalog();
  this.schema = annotation.schema();
  this.name = annotation.name();
  for (final JoinColumn joinColumn : annotation.joinColumns()) {
    this.joinColumns.add(new JoinColumnMetadataImpl(locator, joinColumn));
  }
  for (final JoinColumn joinColumn : annotation.inverseJoinColumns()) {
    this.inverseJoinColumns.add(new JoinColumnMetadataImpl(locator, joinColumn));
  }
  for (final UniqueConstraint constraint : annotation.uniqueConstraints()) {
    this.uniqueConstraints.add(new UniqueConstraintMetadataImpl(locator, constraint));
  }
}

代码示例来源:origin: BatooOrg/BatooJPA

/**
 * @param locator
 *            the locator
 * @param annotation
 *            the annotation
 * 
 * @since 2.0.0
 */
public JoinTableMetadaImpl(AbstractLocator locator, JoinTable annotation) {
  super();
  this.locator = locator;
  this.catalog = annotation.catalog();
  this.schema = annotation.schema();
  this.name = annotation.name();
  for (final JoinColumn joinColumn : annotation.joinColumns()) {
    this.joinColumns.add(new JoinColumnMetadataImpl(locator, joinColumn));
  }
  for (final JoinColumn joinColumn : annotation.inverseJoinColumns()) {
    this.inverseJoinColumns.add(new JoinColumnMetadataImpl(locator, joinColumn));
  }
  for (final UniqueConstraint constraint : annotation.uniqueConstraints()) {
    this.uniqueConstraints.add(new UniqueConstraintMetadataImpl(locator, constraint));
  }
}

代码示例来源:origin: org.batoo.jpa/parser

/**
 * @param locator
 *            the locator
 * @param annotation
 *            the annotation
 * 
 * @since 2.0.0
 */
public JoinTableMetadaImpl(AbstractLocator locator, JoinTable annotation) {
  super();
  this.locator = locator;
  this.catalog = annotation.catalog();
  this.schema = annotation.schema();
  this.name = annotation.name();
  for (final JoinColumn joinColumn : annotation.joinColumns()) {
    this.joinColumns.add(new JoinColumnMetadataImpl(locator, joinColumn));
  }
  for (final JoinColumn joinColumn : annotation.inverseJoinColumns()) {
    this.inverseJoinColumns.add(new JoinColumnMetadataImpl(locator, joinColumn));
  }
  for (final UniqueConstraint constraint : annotation.uniqueConstraints()) {
    this.uniqueConstraints.add(new UniqueConstraintMetadataImpl(locator, constraint));
  }
}

代码示例来源:origin: toplink.essentials/toplink-essentials

/**
 * INTERNAL:
 */
public MetadataJoinTable(JoinTable joinTable, MetadataLogger logger) {
  this(logger);
  
  if (joinTable != null) {
    m_name = joinTable.name();
    m_schema = joinTable.schema();
    m_catalog = joinTable.catalog();
    m_joinColumns = joinTable.joinColumns();
    m_inverseJoinColumns = joinTable.inverseJoinColumns();
    
    processName();
    processUniqueConstraints(joinTable.uniqueConstraints());
  }
}

代码示例来源:origin: org.apache.openjpa/openjpa-persistence-jdbc

/**
 * Parse @JoinTable.
 */
private void parseJoinTable(FieldMapping fm, JoinTable join) {
  FieldMappingInfo info = fm.getMappingInfo();
  DBIdentifier joinTbl = toTableIdentifier(join.schema(), join.name());
  info.setTableIdentifier(joinTbl);
  parseJoinColumns(fm, info, false, join.joinColumns());
  parseJoinColumns(fm, fm.getElementMapping().getValueInfo(), false,
    join.inverseJoinColumns());
  addUniqueConstraints(info.getTableIdentifier().getName(), fm, info,  
    join.uniqueConstraints());
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Parse @JoinTable.
 */
private void parseJoinTable(FieldMapping fm, JoinTable join) {
  FieldMappingInfo info = fm.getMappingInfo();
  DBIdentifier joinTbl = toTableIdentifier(join.schema(), join.name());
  info.setTableIdentifier(joinTbl);
  parseJoinColumns(fm, info, false, join.joinColumns());
  parseJoinColumns(fm, fm.getElementMapping().getValueInfo(), false,
    join.inverseJoinColumns());
  addUniqueConstraints(info.getTableIdentifier().getName(), fm, info,  
    join.uniqueConstraints());
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Parse @JoinTable.
 */
private void parseJoinTable(FieldMapping fm, JoinTable join) {
  FieldMappingInfo info = fm.getMappingInfo();
  DBIdentifier joinTbl = toTableIdentifier(join.schema(), join.name());
  info.setTableIdentifier(joinTbl);
  parseJoinColumns(fm, info, false, join.joinColumns());
  parseJoinColumns(fm, fm.getElementMapping().getValueInfo(), false,
    join.inverseJoinColumns());
  addUniqueConstraints(info.getTableIdentifier().getName(), fm, info,  
    join.uniqueConstraints());
}

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

ad.setValue( "schema", table.schema() );
ad.setValue( "catalog", table.catalog() );
ad.setValue( "uniqueConstraints", table.uniqueConstraints() );
ad.setValue( "joinColumns", table.joinColumns() );
ad.setValue( "inverseJoinColumns", table.inverseJoinColumns() );

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

ad.setValue( "schema", table.schema() );
ad.setValue( "catalog", table.catalog() );
ad.setValue( "uniqueConstraints", table.uniqueConstraints() );
ad.setValue( "joinColumns", table.joinColumns() );
ad.setValue( "inverseJoinColumns", table.inverseJoinColumns() );

相关文章