Package org.hibernate.metamodel.relational

Examples of org.hibernate.metamodel.relational.Column$Size


      adUnit.setTargetPlatform(TargetPlatform.MOBILE);
      adUnit.setMobilePlatform(MobilePlatform.APPLICATION);

      // Create ad unit size.
      AdUnitSize adUnitSize = new AdUnitSize();
      adUnitSize.setSize(new Size(400, 300, false));
      adUnitSize.setEnvironmentType(EnvironmentType.BROWSER);

      // Set the size of possible creatives that can match this ad unit.
      adUnit.setAdUnitSizes(new AdUnitSize[] {adUnitSize});
View Full Code Here


      adUnit.setExplicitlyTargeted(true);
      adUnit.setTargetPlatform(TargetPlatform.WEB);

      // Create master ad unit size.
      AdUnitSize masterAdUnitSize = new AdUnitSize();
      masterAdUnitSize.setSize(new Size(400, 300, false));
      masterAdUnitSize.setEnvironmentType(EnvironmentType.VIDEO_PLAYER);

      // Create companion sizes.
      AdUnitSize companionAdUnitSize1 = new AdUnitSize();
      companionAdUnitSize1.setSize(new Size(300, 250, false));
      companionAdUnitSize1.setEnvironmentType(EnvironmentType.BROWSER);

      AdUnitSize companionAdUnitSize2 = new AdUnitSize();
      companionAdUnitSize2.setSize(new Size(728, 90, false));
      companionAdUnitSize2.setEnvironmentType(EnvironmentType.BROWSER);

      // Add companions to master ad unit size.
      masterAdUnitSize.setCompanions(new AdUnitSize[] {companionAdUnitSize1, companionAdUnitSize2});
View Full Code Here

  protected Directory setupDirectory() throws IOException {
    int totalNumberOfBytes = 1000000;
    final int fileBufferSizeInt = numberBetween(113, 215);
    final int cacheBlockSizeInt = numberBetween(111, 251);

    Size fileBufferSize = new Size() {
      @Override
      public int getSize(CacheDirectory directory, String fileName) {
        return fileBufferSizeInt;
      }
    };

    Size cacheBlockSize = new Size() {
      @Override
      public int getSize(CacheDirectory directory, String fileName) {
        return cacheBlockSizeInt;
      }
    };
View Full Code Here

   
    final boolean defaultWriteCaching = configuration.getBoolean(BLUR_SHARD_BLOCK_CACHE_V2_WRITE_DEFAULT, true);
    LOG.info("{0}={1}", BLUR_SHARD_BLOCK_CACHE_V2_WRITE_DEFAULT, defaultWriteCaching);
   

    Size fileBufferSize = new Size() {
      @Override
      public int getSize(CacheDirectory directory, String fileName) {
        return fileBufferSizeInt;
      }
    };

    Size cacheBlockSize = new Size() {
      @Override
      public int getSize(CacheDirectory directory, String fileName) {
        String ext = getExt(fileName);
        Integer size = cacheBlockSizeMap.get(ext);
        if (size != null) {
View Full Code Here

            .seekEntityBinding()
            .locateTable( valueSource.getContainingTableName() );

        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

  private Column makeColumn(ColumnSource columnSource, TableSpecification table) {
    String name = columnSource.getName();
    name = metadata.getOptions().getNamingStrategy().columnName( name );
    name = quoteIdentifier( name );
    final Column column = table.locateOrCreateColumn( name );
    column.setNullable( columnSource.isNullable() );
    column.setDefaultValue( columnSource.getDefaultValue() );
    column.setSqlType( columnSource.getSqlType() );
    column.setSize( columnSource.getSize() );
    column.setDatatype( columnSource.getDatatype() );
    column.setReadFragment( columnSource.getReadFragment() );
    column.setWriteFragment( columnSource.getWriteFragment() );
    column.setUnique( columnSource.isUnique() );
    column.setCheckCondition( columnSource.getCheckCondition() );
    column.setComment( columnSource.getComment() );
    return column;
  }
View Full Code Here

      LOG.noColumnsSpecifiedForIndex( indexName, table.toLoggableString() );
      return;
    }
    org.hibernate.metamodel.relational.Index index = table.getOrCreateIndex( indexName );
    for ( String columnName : columnNames ) {
      Column column = findColumn( table, columnName );
      if ( column == null ) {
        throw new AnnotationException( "@Index references a unknown column: " + columnName );
      }
      index.addColumn( column );
    }
View Full Code Here

      index.addColumn( column );
    }
  }

  private static Column findColumn(Table table, String columnName) {
    Column column = null;
    for ( SimpleValue value : table.values() ) {
      if ( value instanceof Column && ( (Column) value ).getColumnName().getName().equals( columnName ) ) {
        column = (Column) value;
        break;
      }
View Full Code Here

      LOG.noColumnsSpecifiedForIndex( indexName, table.toLoggableString() );
      return;
    }
    org.hibernate.metamodel.relational.Index index = table.getOrCreateIndex( indexName );
    for ( String columnName : columnNames ) {
      Column column = findColumn( table, columnName );
      if ( column == null ) {
        throw new AnnotationException( "@Index references a unknown column: " + columnName );
      }
      index.addColumn( column );
    }
View Full Code Here

      index.addColumn( column );
    }
  }

  private static Column findColumn(Table table, String columnName) {
    Column column = null;
    for ( SimpleValue value : table.values() ) {
      if ( value instanceof Column && ( (Column) value ).getColumnName().getName().equals( columnName ) ) {
        column = (Column) value;
        break;
      }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.relational.Column$Size

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.