Examples of property()


Examples of org.hibernate.ogm.util.configurationreader.spi.ConfigurationPropertyReader.property()

    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put( "configuration_resource", root.toExternalForm() + "/configuration-test.properties" );

    ConfigurationPropertyReader reader = new ConfigurationPropertyReader( properties );

    URL value = reader.property( "configuration_resource", URL.class ).getValue();
    assertThat( value ).isNotNull();

    Properties loadedProperties = loadPropertiesFromUrl( value );
    assertThat( loadedProperties.get( "hibernate.ogm.configuration.testproperty" ) ).isEqualTo( "foobar" );
  }
View Full Code Here

Examples of org.hibernate.ogm.util.configurationreader.spi.ConfigurationPropertyReader.property()

    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put( "configuration_resource", root + File.separator + "configuration-test.properties" );

    ConfigurationPropertyReader reader = new ConfigurationPropertyReader( properties );

    URL value = reader.property( "configuration_resource", URL.class ).getValue();
    assertThat( value ).isNotNull();

    Properties loadedProperties = loadPropertiesFromUrl( value );
    assertThat( loadedProperties.get( "hibernate.ogm.configuration.testproperty" ) ).isEqualTo( "foobar" );
  }
View Full Code Here

Examples of org.hibernate.ogm.util.configurationreader.spi.ConfigurationPropertyReader.property()

    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put( "configuration_resource", new URL( "file://foobar/" ) );

    ConfigurationPropertyReader reader = new ConfigurationPropertyReader( properties );

    URL value = reader.property( "configuration_resource", URL.class ).getValue();
    assertThat( value ).isEqualTo( new URL( "file://foobar/" ) );
  }

  @Test
  public void shouldRaiseExceptionDueToMissingRequiredProperty() {
View Full Code Here

Examples of org.hibernate.ogm.util.configurationreader.spi.ConfigurationPropertyReader.property()

    thrown.expect( HibernateException.class );
    thrown.expectMessage( "OGM000052" );

    ConfigurationPropertyReader reader = new ConfigurationPropertyReader( properties );

    reader.property( "foo", ElementType.class )
        .required()
        .getValue();
  }

  @Test
View Full Code Here

Examples of org.hibernate.ogm.util.configurationreader.spi.ConfigurationPropertyReader.property()

    thrown.expect( HibernateException.class );
    thrown.expectMessage( "OGM000049" );

    ConfigurationPropertyReader reader = new ConfigurationPropertyReader( properties );

    reader.property( "myPort", int.class )
        .withValidator( Validators.PORT )
        .getValue();
  }

  private Properties loadPropertiesFromUrl(URL value) throws IOException {
View Full Code Here

Examples of org.hibernate.ogm.util.configurationreader.spi.ConfigurationPropertyReader.property()

  @Override
  public GridDialect initiateService(Map configurationValues, ServiceRegistryImplementor registry) {
    DatastoreProvider datastore = registry.getService( DatastoreProvider.class );
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationValues, registry.getService( ClassLoaderService.class ) );

    return ( (DefaultClassPropertyReaderContext<GridDialect>) propertyReader.property( OgmProperties.GRID_DIALECT, GridDialect.class )
        .instantiate() )
        .withDefaultImplementation( registry.getService( DatastoreProvider.class ).getDefaultDialect() )
        .withInstantiator( new GridDialectInstantiator( datastore ) )
        .getValue();
  }
View Full Code Here

Examples of org.hibernate.search.cfg.EntityMapping.property()

    EntityMapping catalogMapping = fluentMapping
        .entity( Catalog.class );
    if ( withClassBridgeOnCatalog ) {
      catalogMapping.classBridge( NoopClassBridge.class );
    }
    catalogMapping
        .property( "catalogItems", ElementType.FIELD ).containedIn();

    // mapping for CatalogItem
    fluentMapping.entity( CatalogItem.class )
        .property( "item", ElementType.FIELD ).containedIn()
View Full Code Here

Examples of org.hibernate.search.cfg.IndexedMapping.property()

        .entity( Item.class )
        .indexed();
    if ( withClassBridgeOnItem ) {
      itemMapping.classBridge( NoopClassBridge.class );
    }
    itemMapping.property( "catalogItems", ElementType.FIELD ).indexEmbedded().depth( depth );
    return builder.build();
  }

  private void initializeData(FullTextSessionBuilder fulltextSessionBuilder) {
    FullTextSession fullTextSession = fulltextSessionBuilder.openFullTextSession();
View Full Code Here

Examples of org.jboss.dna.graph.request.SetPropertyRequest.property()

                }
            } else if (change instanceof SetPropertyRequest) {
                SetPropertyRequest set = (SetPropertyRequest)change;

                if (set.isNewProperty()) {
                    details.addProperty(set.property());
                } else {
                    details.changeProperty(set.property());
                }
            } else if (change instanceof RemovePropertyRequest) {
                RemovePropertyRequest remove = (RemovePropertyRequest)change;
View Full Code Here

Examples of org.jboss.errai.ui.shared.api.annotations.Bound.property()

    Map<String, BoundDataField> boundDataFields = DecoratorDataField.aggregateDataFieldBoundMap(ctx, ctx.getType());
    BlockBuilder<ElseBlockBuilder> binderBlock = If.isNotNull(Variable.get("binder"));
    for (Entry<String, BoundDataField> boundDataField : boundDataFields.entrySet()) {
      Bound bound = boundDataField.getValue().getBound();
      if (dataBinderRef != null) {
        String property = bound.property().equals("") ? boundDataField.getKey() : bound.property();
        // Check if bound property exists in data model type
        if (!DataBindingValidator.isValidPropertyChain(dataModelType, property)) {
          throw new GenerationException("Invalid binding of DataField " + boundDataField.getValue().getName()
              + " in class " + ctx.getInjector().getInjectedType() + "! Property " + property
              + " not resolvable from class " + dataModelType +
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.