org.hibernate.annotations.RowId Java Examples
The following examples show how to use
org.hibernate.annotations.RowId.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityBinder.java From lams with GNU General Public License v2.0 | 4 votes |
public void bindTable( String schema, String catalog, String tableName, List<UniqueConstraintHolder> uniqueConstraints, String constraints, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref) { EntityTableNamingStrategyHelper namingStrategyHelper = new EntityTableNamingStrategyHelper( persistentClass.getClassName(), persistentClass.getEntityName(), name ); final Identifier logicalName; if ( StringHelper.isNotEmpty( tableName ) ) { logicalName = namingStrategyHelper.handleExplicitName( tableName, context ); } else { logicalName = namingStrategyHelper.determineImplicitName( context ); } final Table table = TableBinder.buildAndFillTable( schema, catalog, logicalName, persistentClass.isAbstract(), uniqueConstraints, null, constraints, context, this.subselect, denormalizedSuperTableXref ); final RowId rowId = annotatedClass.getAnnotation( RowId.class ); if ( rowId != null ) { table.setRowId( rowId.value() ); } context.getMetadataCollector().addEntityTableXref( persistentClass.getEntityName(), logicalName, table, denormalizedSuperTableXref ); if ( persistentClass instanceof TableOwner ) { LOG.debugf( "Bind entity %s on table %s", persistentClass.getEntityName(), table.getName() ); ( (TableOwner) persistentClass ).setTable( table ); } else { throw new AssertionFailure( "binding a table for a subclass" ); } }