本文整理了Java中javax.persistence.JoinTable.uniqueConstraints()
方法的一些代码示例,展示了JoinTable.uniqueConstraints()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JoinTable.uniqueConstraints()
方法的具体详情如下:
包路径:javax.persistence.JoinTable
类名称: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() );
内容来源于网络,如有侵权,请联系作者删除!