Package org.hibernate.ogm.util.configurationreader.spi

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


    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

  @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

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

    DatastoreProvider datastoreProvider = propertyReader.property( OgmProperties.DATASTORE_PROVIDER, DatastoreProvider.class )
        .instantiate()
        .withDefaultImplementation( DEFAULT_DATASTORE_PROVIDER )
        .withShortNameResolver( DatastoreProviderShortNameResolver.INSTANCE )
        .getValue();
View Full Code Here

  @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

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.