Package org.hibernate.cfg

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


        Configuration cfg = new Configuration();
       
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Person.hbm.xml"));
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Address.hbm.xml"));
       
        cfg.buildMappings();
               
       
    }
 
  public void testOneToOne() throws DocumentException {
View Full Code Here


    Configuration derived = new Configuration();
   
    derived.addFile(new File(getOutputDir(), "org/reveng/Child.hbm.xml") );
    derived.addFile(new File(getOutputDir(), "org/reveng/Master.hbm.xml") );
   
    derived.buildMappings();
   
    assertNotNull(derived.getClassMapping("org.reveng.Child") );
    assertNotNull(derived.getClassMapping("org.reveng.Master") );
    TestHelper.deleteDir(getOutputDir());
  }
View Full Code Here

 
  public void testExporter() {
 
    Configuration configuration = new Configuration();
    addMappings( getMappings(), configuration );
    configuration.buildMappings();
 
    new HbmLintExporter(configuration, getOutputDir()).start();
   
  }
  public void testValidateCache() {
View Full Code Here

  }
  public void testValidateCache() {
   
    Configuration configuration = new Configuration();
    addMappings( getMappings(), configuration );
    configuration.buildMappings();
   
    HbmLint analyzer = new HbmLint(new Detector[] { new BadCachingDetector() });
   
    analyzer.analyze(configuration);
   
View Full Code Here

  public void testValidateIdentifier() {
   
    Configuration configuration = new Configuration();
    addMappings( getMappings(), configuration );
    configuration.buildMappings();
   
    HbmLint analyzer = new HbmLint(new Detector[] { new ShadowedIdentifierDetector() });
   
    analyzer.analyze(configuration);
   
View Full Code Here

 
  public void testBytecodeRestrictions() {
   
    Configuration configuration = new Configuration();
    addMappings( getMappings(), configuration );
    configuration.buildMappings();
   
    HbmLint analyzer = new HbmLint(new Detector[] { new InstrumentationDetector() });
   
    analyzer.analyze(configuration);
   
View Full Code Here

        cfg.addFile(new File(getOutputDir(), "org/hibernate/tool/hbm2x/Customer.hbm.xml") );
        cfg.addFile(new File(getOutputDir(), "org/hibernate/tool/hbm2x/LineItem.hbm.xml") );
        cfg.addFile(new File(getOutputDir(), "org/hibernate/tool/hbm2x/Order.hbm.xml") );
        cfg.addFile(new File(getOutputDir(), "org/hibernate/tool/hbm2x/Product.hbm.xml") );       
       
        cfg.buildMappings();
       
    }
 
  public void testNoVelocityLeftOvers() {
   
View Full Code Here

      }
     
    }*/
   
    setDialect( Dialect.getDialect() );
    cfg2.buildMappings();
  }

  public String getCacheConcurrencyStrategy() {
    return "nonstrict-read-write";
  }
View Full Code Here

                Model.class.getResourceAsStream("Product.hbm.xml")).
                addInputStream(Model.class.getResourceAsStream("Store.hbm.xml")).
                addInputStream(Model.class.getResourceAsStream("ProductOwnerAddress.hbm.xml")).
                addInputStream(Model.class.getResourceAsStream("City.hbm.xml")).
            addInputStream(Model.class.getResourceAsStream("StoreCity.hbm.xml"));
        cfg.buildMappings();
        return cfg;
    }
   
    public static SessionFactory buildSessionFactory()  {
        return buildConfiguration().buildSessionFactory();
View Full Code Here

  }
 
  public void testSchemaAnalyzer() {
    Configuration configuration = new Configuration();
    addMappings( getMappings(), configuration );
    configuration.buildMappings();
 
    SchemaByMetaDataDetector analyzer = new SchemaByMetaDataDetector();
    ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder()
      .applySettings( configuration.getProperties() )
      .build();
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.