Package org.hibernate.metamodel.binding

Examples of org.hibernate.metamodel.binding.SimpleValueBinding


        if ( ColumnSource.class.isInstance( valueSource ) ) {
          final ColumnSource columnSource = ColumnSource.class.cast( valueSource );
          final Column column = makeColumn( (ColumnSource) valueSource, table );
          valueBindings.add(
              new SimpleValueBinding(
                  column,
                  columnSource.isIncludedInInsert(),
                  columnSource.isIncludedInUpdate()
              )
          );
        }
        else {
          valueBindings.add(
              new SimpleValueBinding(
                  makeDerivedValue( ( (DerivedValueSource) valueSource ), table )
              )
          );
        }
      }
    }
    else {
      String name = metadata.getOptions()
          .getNamingStrategy()
          .propertyToColumnName( attributeBinding.getAttribute().getName() );
      name = quoteIdentifier( name );
      Column column = attributeBinding.getContainer()
                  .seekEntityBinding()
                  .getPrimaryTable()
                  .locateOrCreateColumn( name );
      column.setNullable( relationalValueSourceContainer.areValuesNullableByDefault() );
      valueBindings.add(
          new SimpleValueBinding(
              column,
              relationalValueSourceContainer.areValuesIncludedInInsertByDefault(),
              relationalValueSourceContainer.areValuesIncludedInUpdateByDefault()
          )
      );
View Full Code Here


          column.setWriteFragment( columnSource.getWriteFragment() );
          column.setUnique( columnSource.isUnique() );
          column.setCheckCondition( columnSource.getCheckCondition() );
          column.setComment( columnSource.getComment() );
          valueBindings.add(
              new SimpleValueBinding(
                  column,
                  columnSource.isIncludedInInsert(),
                  columnSource.isIncludedInUpdate()
              )
          );
        }
        else {
          valueBindings.add(
              new SimpleValueBinding(
                  table.locateOrCreateDerivedValue( ( (DerivedValueSource) valueSource ).getExpression() )
              )
          );
        }
      }
    }
    else {
      final String name = metadata.getOptions()
          .getNamingStrategy()
          .propertyToColumnName( attributeBinding.getAttribute().getName() );
      final SimpleValueBinding valueBinding = new SimpleValueBinding();
      valueBindings.add(
          new SimpleValueBinding(
              attributeBinding.getEntityBinding().getBaseTable().locateOrCreateColumn( name )
          )
      );
    }
    attributeBinding.setSimpleValueBindings( valueBindings );
View Full Code Here

        if ( ColumnSource.class.isInstance( valueSource ) ) {
          final ColumnSource columnSource = ColumnSource.class.cast( valueSource );
          final Column column = makeColumn( (ColumnSource) valueSource, table );
          valueBindings.add(
              new SimpleValueBinding(
                  column,
                  columnSource.isIncludedInInsert(),
                  columnSource.isIncludedInUpdate()
              )
          );
        }
        else {
          valueBindings.add(
              new SimpleValueBinding(
                  makeDerivedValue( ( (DerivedValueSource) valueSource ), table )
              )
          );
        }
      }
    }
    else {
      String name = metadata.getOptions()
          .getNamingStrategy()
          .propertyToColumnName( attributeBinding.getAttribute().getName() );
      name = quoteIdentifier( name );
      Column column = attributeBinding.getContainer()
                  .seekEntityBinding()
                  .getPrimaryTable()
                  .locateOrCreateColumn( name );
      column.setNullable( relationalValueSourceContainer.areValuesNullableByDefault() );
      valueBindings.add(
          new SimpleValueBinding(
              column,
              relationalValueSourceContainer.areValuesIncludedInInsertByDefault(),
              relationalValueSourceContainer.areValuesIncludedInUpdateByDefault()
          )
      );
View Full Code Here

        if ( ColumnSource.class.isInstance( valueSource ) ) {
          final ColumnSource columnSource = ColumnSource.class.cast( valueSource );
          final Column column = makeColumn( (ColumnSource) valueSource, table );
          valueBindings.add(
              new SimpleValueBinding(
                  column,
                  columnSource.isIncludedInInsert(),
                  columnSource.isIncludedInUpdate()
              )
          );
        }
        else {
          valueBindings.add(
              new SimpleValueBinding(
                  makeDerivedValue( ( (DerivedValueSource) valueSource ), table )
              )
          );
        }
      }
    }
    else {
      String name = metadata.getOptions()
          .getNamingStrategy()
          .propertyToColumnName( attributeBinding.getAttribute().getName() );
      name = quoteIdentifier( name );
      valueBindings.add(
          new SimpleValueBinding(
              attributeBinding.getContainer()
                  .seekEntityBinding()
                  .getPrimaryTable()
                  .locateOrCreateColumn( name )
          )
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.binding.SimpleValueBinding

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.