本文整理汇总了Java中org.hibernate.mapping.Table.setCatalog方法的典型用法代码示例。如果您正苦于以下问题:Java Table.setCatalog方法的具体用法?Java Table.setCatalog怎么用?Java Table.setCatalog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hibernate.mapping.Table
的用法示例。
在下文中一共展示了Table.setCatalog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addDenormalizedTable
import org.hibernate.mapping.Table; //导入方法依赖的package包/类
public Table addDenormalizedTable(
String schema,
String catalog,
String name,
boolean isAbstract,
String subselect,
Table includedTable) throws DuplicateMappingException {
name = getObjectNameNormalizer().normalizeIdentifierQuoting( name );
schema = getObjectNameNormalizer().normalizeIdentifierQuoting( schema );
catalog = getObjectNameNormalizer().normalizeIdentifierQuoting( catalog );
String key = subselect == null ? Table.qualify(catalog, schema, name) : subselect;
if ( tables.containsKey( key ) ) {
throw new DuplicateMappingException( "table", name );
}
Table table = new DenormalizedTable( includedTable );
table.setAbstract( isAbstract );
table.setName( name );
table.setSchema( schema );
table.setCatalog( catalog );
table.setSubselect( subselect );
tables.put( key, table );
return table;
}
示例2: generateIdTableDefinition
import org.hibernate.mapping.Table; //导入方法依赖的package包/类
protected Table generateIdTableDefinition(PersistentClass entityMapping) {
Table idTable = new Table( entityMapping.getTemporaryIdTableName() );
if ( catalog != null ) {
idTable.setCatalog( catalog );
}
if ( schema != null ) {
idTable.setSchema( schema );
}
Iterator itr = entityMapping.getTable().getPrimaryKey().getColumnIterator();
while( itr.hasNext() ) {
Column column = (Column) itr.next();
idTable.addColumn( column.clone() );
}
Column sessionIdColumn = new Column( "hib_sess_id" );
sessionIdColumn.setSqlType( "CHAR(36)" );
sessionIdColumn.setComment( "Used to hold the Hibernate Session identifier" );
idTable.addColumn( sessionIdColumn );
idTable.setComment( "Used to hold id values for the " + entityMapping.getEntityName() + " class" );
return idTable;
}