Examples of buildMappings()


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

        Configuration cfg = new Configuration();

        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Car.hbm.xml"));
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "CarPart.hbm.xml"));
       
        cfg.buildMappings();
    }

  protected String getBaseForMappings() {
    return "org/hibernate/tool/hbm2x/hbm2hbmxml/";
  }
View Full Code Here

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

  }

  public void testReadable() {
        Configuration cfg = new Configuration();
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Order.hbm.xml"));
        cfg.buildMappings();
    }

  public void testTypeParamsElements() throws DocumentException {
    File outputXml = new File(getOutputDir(),  getBaseForMappings() + mappingFile);
    assertFileAndExists(outputXml);
View Full Code Here

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

        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Alien.hbm.xml"));
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Human.hbm.xml"));
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Animal.hbm.xml"));

        cfg.buildMappings();
    }

  public void testComment() {
    File outputXml = new File(getOutputDir().getAbsolutePath() + "/org/hibernate/tool/hbm2x/hbm2hbmxml/Alien.hbm.xml");
    assertFileAndExists(outputXml);
View Full Code Here

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

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

    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

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

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

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

  }
  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

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

  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

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

 
  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

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

        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
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.