Package org.hibernate.metamodel.relational

Examples of org.hibernate.metamodel.relational.Table


    entityBinding.setPrimaryTableName( table.getTableName().getName() );
  }

  private void bindSecondaryTables(EntitySource entitySource, EntityBinding entityBinding) {
    for ( TableSource secondaryTableSource : entitySource.getSecondaryTables() ) {
      final Table table = createTable( entityBinding, secondaryTableSource );
      entityBinding.addSecondaryTable( secondaryTableSource.getLogicalName(), table );
    }
  }
View Full Code Here


    entityBinding.setPrimaryTableName( table.getTableName().getName() );
  }

  private void bindSecondaryTables(EntitySource entitySource, EntityBinding entityBinding) {
    for ( TableSource secondaryTableSource : entitySource.getSecondaryTables() ) {
      final Table table = createTable( entityBinding, secondaryTableSource );
      entityBinding.addSecondaryTable( secondaryTableSource.getLogicalName(), table );
    }
  }
View Full Code Here

    final String tableName = attributeSource.getExplicitCollectionTableName();
    if ( StringHelper.isNotEmpty( tableName ) ) {
      final Identifier tableIdentifier = Identifier.toIdentifier(
          currentBindingContext.getNamingStrategy().tableName( tableName )
      );
      Table collectionTable = schema.locateTable( tableIdentifier );
      if ( collectionTable == null ) {
        collectionTable = schema.createTable( tableIdentifier );
      }
      pluralAttributeBinding.setCollectionTable( collectionTable );
    }
View Full Code Here

  // Relational ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  private void bindPrimaryTable(EntitySource entitySource, EntityBinding entityBinding) {
    final TableSource tableSource = entitySource.getPrimaryTable();
    final Table table = createTable( entityBinding, tableSource );
    entityBinding.setPrimaryTable( table );
    entityBinding.setPrimaryTableName( table.getTableName().getName() );
  }
View Full Code Here

  private static void bind(MetadataImplementor metadata, AnnotationInstance tableAnnotation) {
    String tableName = JandexHelper.getValueAsString( tableAnnotation, "appliesTo" );
    ObjectName objectName = new ObjectName( tableName );
    Schema schema = metadata.getDatabase().getSchema( objectName.getSchema(), objectName.getCatalog() );
    Table table = schema.getTable( objectName.getName() );
    if ( table != null ) {
      bindHibernateTableAnnotation( table, tableAnnotation );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.relational.Table

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.