Package org.hibernate.metamodel.relational

Examples of org.hibernate.metamodel.relational.TableSpecification


      boolean mutable,
      boolean nullable) {
    final boolean naturalId = uniqueKey != null;

    final String entiytName = entityBinding.getEntity().getName();
    final TableSpecification tabe = entityBinding.getBaseTable();

    AttributeBinding attributeBinding = null;
    for ( Object attribute : entityClazz.getPropertyOrManyToOneOrOneToOne() ) {
      if ( XMLBagElement.class.isInstance( attribute ) ) {
        XMLBagElement collection = XMLBagElement.class.cast( attribute );
View Full Code Here


  }

  private Column createColumn(ColumnRelationalState state) {
    final String explicitName = state.getExplicitColumnName();
    final String logicalColumnName = state.getNamingStrategy().logicalColumnName( explicitName, getAttribute().getName() );
    final TableSpecification table = getEntityBinding().getBaseTable();
    final String columnName =
        explicitName == null ?
            state.getNamingStrategy().propertyToColumnName( getAttribute().getName() ) :
            state.getNamingStrategy().columnName( explicitName );
// todo : find out the purpose of these logical bindings
//      mappings.addColumnBinding( logicalColumnName, column, table );
    Column columnValue = table.createColumn( columnName );
    columnValue.getSize().initialize( state.getSize() );
    columnValue.setNullable( ! forceNonNullable() &&  state.isNullable() );
    columnValue.setUnique( ! forceUnique() && state.isUnique()  );
    columnValue.setCheckCondition( state.getCheckCondition() );
    columnValue.setDefaultValue( state.getDefault() );
    columnValue.setSqlType( state.getSqlType() );
    columnValue.setWriteFragment( state.getCustomWriteFragment() );
    columnValue.setReadFragment( state.getCustomReadFragment() );
    columnValue.setComment( state.getComment() );
    for ( String uniqueKey : state.getUniqueKeys() ) {
      table.getOrCreateUniqueKey( uniqueKey ).addColumn( columnValue );
    }
    for ( String index : state.getIndexes() ) {
      table.getOrCreateIndex( index ).addColumn( columnValue );
    }
    return columnValue;
  }
View Full Code Here

    qualifiedTableNames = new String[joinSpan];
    isInverseTable = new boolean[joinSpan];
    isNullableTable = new boolean[joinSpan];
    keyColumnNames = new String[joinSpan][];

    final TableSpecification table = entityBinding.getPrimaryTable();
    qualifiedTableNames[0] = table.getQualifiedName( factory.getDialect() );
    isInverseTable[0] = false;
    isNullableTable[0] = false;
    keyColumnNames[0] = getIdentifierColumnNames();
    cascadeDeleteEnabled = new boolean[joinSpan];
View Full Code Here

      boolean mutable,
      boolean nullable) {
    final boolean naturalId = uniqueKey != null;

    final String entiytName = entityBinding.getEntity().getName();
    final TableSpecification tabe = entityBinding.getBaseTable();

    AttributeBinding attributeBinding = null;
    for ( Object attribute : entityClazz.getPropertyOrManyToOneOrOneToOne() ) {
      if ( XMLBagElement.class.isInstance( attribute ) ) {
        XMLBagElement collection = XMLBagElement.class.cast( attribute );
View Full Code Here

TOP

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

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.