Examples of buildMappings()


Examples of org.hibernate.cfg.Configuration.buildMappings()

    Configuration configuration = new Configuration()
        .addFile( new File(getOutputDir(), "Employee.hbm.xml") )
        .addFile( new File(getOutputDir(), "Project.hbm.xml") )
      .addFile( new File(getOutputDir(), "WorksOnContext.hbm.xml") );
   
    configuration.buildMappings();
   
  }
 

  private void assertPropertyNotExist(PersistentClass projectClass, String prop) {
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

    Configuration configuration = new Configuration()
        .addFile( new File(getOutputDir(), "Role.hbm.xml") )
        .addFile( new File(getOutputDir(), "User.hbm.xml") )
        .addFile( new File(getOutputDir(), "Plainrole.hbm.xml"));
   
    configuration.buildMappings();
   
    assertMultiSchema(configuration);
  }
 
  protected void configure(JDBCMetaDataConfiguration configuration) {
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

        derived.addFile(new File(outputdir, "Product.hbm.xml") );
        derived.addFile(new File(outputdir, "Customer.hbm.xml") );
        derived.addFile(new File(outputdir, "Lineitem.hbm.xml") );
        derived.addFile(new File(outputdir, "Customerorder.hbm.xml") );
       
        derived.buildMappings();       
       
        /*assertNotNull(derived.getClassMapping("org.reveng.Child") );
        assertNotNull(derived.getClassMapping("org.reveng.Master") );*/
        URL[] urls = new URL[] { outputdir.toURL() };
        URLClassLoader ucl = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader() );
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

      String[] mappings = new String[]{"org/hibernate/test/cache/infinispan/functional/Item.hbm.xml"};
      for (String mapping : mappings) {
         cfg.addResource(mapping, Thread.currentThread().getContextClassLoader());
      }
      cfg.buildMappings();
      Iterator iter = cfg.getClassMappings();
      while (iter.hasNext()) {
         PersistentClass clazz = (PersistentClass) iter.next();
         cfg.setCacheConcurrencyStrategy(clazz.getEntityName(), "transactional");
      }
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

  protected Configuration buildConfiguration() {
    Configuration cfg = constructConfiguration();
    configure( cfg );
    addMappings( cfg );
    cfg.buildMappings();
    applyCacheSettings( cfg );
    afterConfigurationBuilt( cfg );
    return cfg;
  }
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

      }

      // Tell Hibernate to eagerly compile the mappings that we registered,
      // for availability of the mapping information in further processing.
      postProcessMappings(config);
      config.buildMappings();

      if (this.entityCacheStrategies != null) {
        // Register cache strategies for mapped entities.
        for (Enumeration<?> classNames = this.entityCacheStrategies.propertyNames(); classNames.hasMoreElements();) {
          String className = (String) classNames.nextElement();
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

    // make sure we use the same dialect...
    configuration.setProperty( Environment.DIALECT, getDialect().getClass().getName() );

    applyMappings( configuration );
    configuration.buildMappings();

    applyCacheSettings( configuration );
    settings.afterConfigurationBuilt( configuration.createMappings(), getDialect() );

    SessionFactory sessionFactory = configuration.buildSessionFactory();
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

      }

      // Tell Hibernate to eagerly compile the mappings that we registered,
      // for availability of the mapping information in further processing.
      postProcessMappings(config);
      config.buildMappings();

      if (this.entityCacheStrategies != null) {
        // Register cache strategies for mapped entities.
        for (Enumeration classNames = this.entityCacheStrategies.propertyNames(); classNames.hasMoreElements();) {
          String className = (String) classNames.nextElement();
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

  protected Configuration buildConfiguration() {
    Configuration cfg = constructConfiguration();
    configure( cfg );
    addMappings( cfg );
    cfg.buildMappings();
    applyCacheSettings( cfg );
    afterConfigurationBuilt( cfg );
    return cfg;
  }
View Full Code Here

Examples of org.hibernate.cfg.Configuration.buildMappings()

  protected Configuration buildConfiguration() {
    Configuration cfg = constructConfiguration();
    configure( cfg );
    addMappings( cfg );
    cfg.buildMappings();
    applyCacheSettings( cfg );
    afterConfigurationBuilt( cfg );
    return cfg;
  }
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.