本文整理了Java中org.hibernate.mapping.Join.getKey()
方法的一些代码示例,展示了Join.getKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Join.getKey()
方法的具体详情如下:
包路径:org.hibernate.mapping.Join
类名称:Join
方法名:getKey
暂无
代码示例来源:origin: hibernate/hibernate-orm
public void createForeignKey() {
getKey().createForeignKeyOfEntity( persistentClass.getEntityName() );
}
代码示例来源:origin: hibernate/hibernate-orm
protected void checkColumnDuplication() {
HashSet cols = new HashSet();
if ( getIdentifierMapper() == null ) {
//an identifier mapper => getKey will be included in the getNonDuplicatedPropertyIterator()
//and checked later, so it needs to be excluded
checkColumnDuplication( cols, getKey().getColumnIterator() );
}
checkColumnDuplication( cols, getDiscriminatorColumnIterator() );
checkPropertyColumnDuplication( cols, getNonDuplicatedPropertyIterator() );
Iterator iter = getJoinIterator();
while ( iter.hasNext() ) {
cols.clear();
Join join = (Join) iter.next();
checkColumnDuplication( cols, join.getKey().getColumnIterator() );
checkPropertyColumnDuplication( cols, join.getPropertyIterator() );
}
}
代码示例来源:origin: hibernate/hibernate-orm
private void setFKNameIfDefined(Join join) {
// just awful..
org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join );
if ( matchingTable != null && !BinderHelper.isEmptyAnnotationValue( matchingTable.foreignKey().name() ) ) {
( (SimpleValue) join.getKey() ).setForeignKeyName( matchingTable.foreignKey().name() );
}
else {
javax.persistence.SecondaryTable jpaSecondaryTable = findMatchingSecondaryTable( join );
if ( jpaSecondaryTable != null ) {
if ( jpaSecondaryTable.foreignKey().value() == ConstraintMode.NO_CONSTRAINT ) {
( (SimpleValue) join.getKey() ).setForeignKeyName( "none" );
}
else {
( (SimpleValue) join.getKey() ).setForeignKeyName( StringHelper.nullIfEmpty( jpaSecondaryTable.foreignKey().name() ) );
( (SimpleValue) join.getKey() ).setForeignKeyDefinition( StringHelper.nullIfEmpty( jpaSecondaryTable.foreignKey().foreignKeyDefinition() ) );
}
}
}
}
代码示例来源:origin: hibernate/hibernate-orm
public void createPrimaryKey() {
//Primary key constraint
PrimaryKey pk = new PrimaryKey( table );
pk.setName( PK_ALIAS.toAliasString( table.getName() ) );
table.setPrimaryKey(pk);
pk.addColumns( getKey().getColumnIterator() );
}
代码示例来源:origin: hibernate/hibernate-orm
MetadataTools.addColumns( joinKey, join.getKey().getColumnIterator() );
MetadataTools.addColumn( joinKey, verEntCfg.getRevisionFieldName(), null, null, null, null, null, null );
代码示例来源:origin: hibernate/hibernate-orm
Join join = (Join) joinsIt.next();
if ( join.containsProperty( property ) ) {
key = join.getKey();
break;
代码示例来源:origin: hibernate/hibernate-orm
.getJpaCompliance()
.isJpaCacheComplianceEnabled();
cascadeDeleteEnabled[j] = join.getKey().isCascadeDeleteEnabled() &&
factory.getDialect().supportsCascadeDelete();
: join.getCustomSQLDeleteCheckStyle();
Iterator iter = join.getKey().getColumnIterator();
keyColumnNames[j] = new String[join.getKey().getColumnSpan()];
int i = 0;
while ( iter.hasNext() ) {
subclassTables.add( joinTableName );
Iterator iter = join.getKey().getColumnIterator();
String[] keyCols = new String[join.getKey().getColumnSpan()];
int i = 0;
while ( iter.hasNext() ) {
代码示例来源:origin: hibernate/hibernate-orm
tableNames.add( tableName );
KeyValue key = join.getKey();
int joinIdColumnSpan = key.getColumnSpan();
代码示例来源:origin: hibernate/hibernate-orm
manyToOne.setUnwrapProxy( value.isUnwrapProxy() );
prop.setValue( manyToOne );
Iterator otherSideJoinKeyColumns = otherSideJoin.getKey().getColumnIterator();
while ( otherSideJoinKeyColumns.hasNext() ) {
Column column = (Column) otherSideJoinKeyColumns.next();
代码示例来源:origin: org.hibernate/hibernate-annotations
private void setFKNameIfDefined(Join join) {
org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join );
if ( matchingTable != null && !BinderHelper.isDefault( matchingTable.foreignKey().name() ) ) {
( (SimpleValue) join.getKey() ).setForeignKeyName( matchingTable.foreignKey().name() );
}
}
代码示例来源:origin: org.hibernate/hibernate-annotations
Join join = (Join) joinsIt.next();
if ( join.containsProperty( property ) ) {
key = join.getKey();
break;
代码示例来源:origin: org.hibernate/hibernate-annotations
manyToOne.setUnwrapProxy( value.isUnwrapProxy() );
prop.setValue( manyToOne );
Iterator otherSideJoinKeyColumns = otherSideJoin.getKey().getColumnIterator();
while ( otherSideJoinKeyColumns.hasNext() ) {
Column column = (Column) otherSideJoinKeyColumns.next();
代码示例来源:origin: hibernate/hibernate
protected void checkColumnDuplication() {
HashSet cols = new HashSet();
checkColumnDuplication( cols, getKey().getColumnIterator() );
checkColumnDuplication( cols, getDiscriminatorColumnIterator() );
checkPropertyColumnDuplication( cols, getNonDuplicatedPropertyIterator() );
Iterator iter = getJoinIterator();
while ( iter.hasNext() ) {
cols.clear();
Join join = (Join) iter.next();
checkColumnDuplication( cols, join.getKey().getColumnIterator() );
checkPropertyColumnDuplication( cols, join.getPropertyIterator() );
}
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
public void createPrimaryKey() {
//Primary key constraint
MappedPrimaryKey pk = new PrimaryKey( table );
pk.setName( PK_ALIAS.toAliasString( table.getName() ) );
table.setPrimaryKey(pk);
pk.addColumns( getKey().getMappedColumns() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
private void setFKNameIfDefined(Join join) {
org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join );
if ( matchingTable != null && !BinderHelper.isEmptyAnnotationValue( matchingTable.foreignKey().name() ) ) {
( (SimpleValue) join.getKey() ).setForeignKeyName( matchingTable.foreignKey().name() );
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
private void setFKNameIfDefined(Join join) {
org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join );
if ( matchingTable != null && !BinderHelper.isEmptyAnnotationValue( matchingTable.foreignKey().name() ) ) {
( (SimpleValue) join.getKey() ).setForeignKeyName( matchingTable.foreignKey().name() );
}
}
代码示例来源:origin: hibernate/hibernate
public void createPrimaryKey() {
//Primary key constraint
PrimaryKey pk = new PrimaryKey();
pk.setTable(table);
pk.setName( PK_ALIAS.toAliasString( table.getName() ) );
table.setPrimaryKey(pk);
pk.addColumns( getKey().getColumnIterator() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public void createPrimaryKey() {
//Primary key constraint
PrimaryKey pk = new PrimaryKey();
pk.setTable(table);
pk.setName( PK_ALIAS.toAliasString( table.getName() ) );
table.setPrimaryKey(pk);
pk.addColumns( getKey().getColumnIterator() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public void createPrimaryKey() {
//Primary key constraint
PrimaryKey pk = new PrimaryKey();
pk.setTable(table);
pk.setName( PK_ALIAS.toAliasString( table.getName() ) );
table.setPrimaryKey(pk);
pk.addColumns( getKey().getColumnIterator() );
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public void createPrimaryKey() {
//Primary key constraint
PrimaryKey pk = new PrimaryKey();
pk.setTable(table);
pk.setName( PK_ALIAS.toAliasString( table.getName() ) );
table.setPrimaryKey(pk);
pk.addColumns( getKey().getColumnIterator() );
}
内容来源于网络,如有侵权,请联系作者删除!