本文整理匯總了Java中org.hibernate.mapping.PersistentClass.isJoinedSubclass方法的典型用法代碼示例。如果您正苦於以下問題:Java PersistentClass.isJoinedSubclass方法的具體用法?Java PersistentClass.isJoinedSubclass怎麽用?Java PersistentClass.isJoinedSubclass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.hibernate.mapping.PersistentClass
的用法示例。
在下文中一共展示了PersistentClass.isJoinedSubclass方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: secondPassCompileForeignKeys
import org.hibernate.mapping.PersistentClass; //導入方法依賴的package包/類
protected void secondPassCompileForeignKeys(Table table, Set<ForeignKey> done) throws MappingException {
table.createForeignKeys();
Iterator iter = table.getForeignKeyIterator();
while ( iter.hasNext() ) {
ForeignKey fk = (ForeignKey) iter.next();
if ( !done.contains( fk ) ) {
done.add( fk );
final String referencedEntityName = fk.getReferencedEntityName();
if ( referencedEntityName == null ) {
throw new MappingException(
"An association from the table " +
fk.getTable().getName() +
" does not specify the referenced entity"
);
}
LOG.debugf( "Resolving reference to class: %s", referencedEntityName );
PersistentClass referencedClass = classes.get( referencedEntityName );
if ( referencedClass == null ) {
throw new MappingException(
"An association from the table " +
fk.getTable().getName() +
" refers to an unmapped class: " +
referencedEntityName
);
}
if ( referencedClass.isJoinedSubclass() ) {
secondPassCompileForeignKeys( referencedClass.getSuperclass().getTable(), done );
}
fk.setReferencedTable( referencedClass.getTable() );
fk.alignColumns();
}
}
}