Package org.hibernate.metamodel.relational

Examples of org.hibernate.metamodel.relational.Schema.createTable()


      final Identifier tableIdentifier = Identifier.toIdentifier(
          currentBindingContext.getNamingStrategy().tableName( tableName )
      );
      Table collectionTable = schema.locateTable( tableIdentifier );
      if ( collectionTable == null ) {
        collectionTable = schema.createTable( tableIdentifier );
      }
      pluralAttributeBinding.setCollectionTable( collectionTable );
    }
    else {
      // todo : not sure wel have all the needed info here in all cases, specifically when needing to know the "other side"
View Full Code Here


    }
    else {
      final Identifier tableName = Identifier.toIdentifier( getClassTableName( entityElement, entityBinding, null ) );
      org.hibernate.metamodel.relational.Table table = schema.getTable( tableName );
      if ( table == null ) {
        table = schema.createTable( tableName );
      }
      entityBinding.setBaseTable( table );
      Element comment = entityElement.element( "comment" );
      if ( comment != null ) {
        table.addComment( comment.getTextTrim() );
View Full Code Here

        }
        final Identifier tableNameIdentifier = Identifier.toIdentifier( tableName );
        final Schema schema = meta.getDatabase().getSchema( new Schema.Name( schmaName, catalogName ) );
        Table table = schema.getTable( tableNameIdentifier );
        if ( table == null ) {
            table = schema.createTable( tableNameIdentifier );
        }
        return table;
    }

View Full Code Here

                classTableName = StringHelper.quote( classTableName );
            }
      final Identifier tableName = Identifier.toIdentifier( classTableName );
      org.hibernate.metamodel.relational.Table table = schema.getTable( tableName );
      if ( table == null ) {
        table = schema.createTable( tableName );
      }
      entityBinding.setBaseTable( table );
      String comment = xmlClazz.getComment();
      if ( comment != null ) {
        table.addComment( comment.trim() );
View Full Code Here

    }
    else {
      final Identifier tableName = Identifier.toIdentifier( getClassTableName( xmlClazz, entityBinding, null ) );
      org.hibernate.metamodel.relational.Table table = schema.getTable( tableName );
      if ( table == null ) {
        table = schema.createTable( tableName );
      }
      entityBinding.setBaseTable( table );
      String comment = xmlClazz.getComment();
      if ( comment != null ) {
        table.addComment( comment.trim() );
View Full Code Here

  private void bindTable(EntityBinding entityBinding) {
    final Schema schema = meta.getDatabase().getSchema( schemaName );
    final Identifier tableName = Identifier.toIdentifier( configuredClass.getPrimaryTableName() );
    org.hibernate.metamodel.relational.Table table = schema.getTable( tableName );
    if ( table == null ) {
      table = schema.createTable( tableName );
    }
    entityBinding.setBaseTable( table );

    AnnotationInstance checkAnnotation = JandexHelper.getSingleAnnotation(
        configuredClass.getClassInfo(), HibernateDotNames.CHECK
View Full Code Here

      final Identifier tableIdentifier = Identifier.toIdentifier(
          currentBindingContext.getNamingStrategy().tableName( tableName )
      );
      Table collectionTable = schema.locateTable( tableIdentifier );
      if ( collectionTable == null ) {
        collectionTable = schema.createTable( tableIdentifier );
      }
      pluralAttributeBinding.setCollectionTable( collectionTable );
    }
    else {
      // todo : not sure wel have all the needed info here in all cases, specifically when needing to know the "other side"
View Full Code Here

      final Identifier tableIdentifier = Identifier.toIdentifier(
          currentBindingContext.getNamingStrategy().tableName( tableName )
      );
      Table collectionTable = schema.locateTable( tableIdentifier );
      if ( collectionTable == null ) {
        collectionTable = schema.createTable( tableIdentifier );
      }
      pluralAttributeBinding.setCollectionTable( collectionTable );
    }
    else {
      // todo : not sure wel have all the needed info here in all cases, specifically when needing to know the "other side"
View Full Code Here

    }
    else {
      final Identifier tableName = Identifier.toIdentifier( getClassTableName( xmlClazz, entityBinding, null ) );
      org.hibernate.metamodel.relational.Table table = schema.getTable( tableName );
      if ( table == null ) {
        table = schema.createTable( tableName );
      }
      entityBinding.setBaseTable( table );
      String comment = xmlClazz.getComment();
      if ( comment != null ) {
        table.addComment( comment.trim() );
View Full Code Here

  private void bindTable(EntityBinding entityBinding) {
    final Schema schema = meta.getDatabase().getSchema( schemaName );
    final Identifier tableName = Identifier.toIdentifier( configuredClass.getPrimaryTableName() );
    org.hibernate.metamodel.relational.Table table = schema.getTable( tableName );
    if ( table == null ) {
      table = schema.createTable( tableName );
    }
    entityBinding.setBaseTable( table );

    AnnotationInstance hibernateTableAnnotation = JandexHelper.getSingleAnnotation(
        configuredClass.getClassInfo(), HibernateDotNames.TABLE
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.