Package org.hibernate.tool.hbm2x

Examples of org.hibernate.tool.hbm2x.HibernateMappingExporter.start()


    hgs.setCatalogName("mycatalog");
   
    Exporter gsExporter = new HibernateMappingExporter(getCfg(), getOutputDir() );
    ( (HibernateMappingExporter)gsExporter).setGlobalSettings(hgs);
 
    gsExporter.start();

    File outputXml = new File(getOutputDir().getAbsolutePath() + "/org/hibernate/tool/hbm2x/hbm2hbmxml/BasicGlobals.hbm.xml");
    assertFileAndExists(outputXml);

    SAXReader xmlReader =  this.getSAXReader();
View Full Code Here


    hgs.setDefaultCascade("save-update");
   
    Exporter gbsExporter = new HibernateMappingExporter(getCfg(), getOutputDir() );
    ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs);
 
    gbsExporter.start();

    File outputXml = new File(getOutputDir().getAbsolutePath() + "/org/hibernate/tool/hbm2x/hbm2hbmxml/BasicGlobals.hbm.xml");
    assertFileAndExists(outputXml);

    SAXReader xmlReader =  this.getSAXReader();
View Full Code Here

    hgs.setDefaultCascade("none");
   
    Exporter gbsExporter = new HibernateMappingExporter(getCfg(), getOutputDir() );
    ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs);
 
    gbsExporter.start();

    File outputXml = new File(getOutputDir().getAbsolutePath() + "/org/hibernate/tool/hbm2x/hbm2hbmxml/BasicGlobals.hbm.xml");
    assertFileAndExists(outputXml);

    SAXReader xmlReader =  this.getSAXReader();
View Full Code Here

    hgs.setDefaultLazy(false);
    hgs.setAutoImport(false);   
   
    Exporter gbsExporter = new HibernateMappingExporter(getCfg(), getOutputDir() );
    ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs);
    gbsExporter.start();

    File outputXml = new File(getOutputDir().getAbsolutePath() + "/org/hibernate/tool/hbm2x/hbm2hbmxml/BasicGlobals.hbm.xml");
    assertFileAndExists(outputXml);

    SAXReader xmlReader =  this.getSAXReader();
View Full Code Here

  public void testGenerateAndReadable() throws Exception {

    cfg.buildMappings();

    HibernateMappingExporter hme = new HibernateMappingExporter(cfg, getOutputDir());
    hme.start();   

    getConfiguration().buildMappings();
    POJOExporter exporter = new POJOExporter(getConfiguration(), getOutputDir());
    Properties p = new Properties();
    p.setProperty("jdk5", "true");
View Full Code Here

  public void testGenerateMappingAndReadable() throws MalformedURLException {
   
    cfg.buildMappings();
   
    HibernateMappingExporter hme = new HibernateMappingExporter(cfg, getOutputDir());
    hme.start();   
   
    assertFileAndExists( new File(getOutputDir(), "Person.hbm.xml") );
    assertFileAndExists( new File(getOutputDir(), "AddressPerson.hbm.xml") );
    assertFileAndExists( new File(getOutputDir(), "AddressMultiPerson.hbm.xml") );
    assertFileAndExists( new File(getOutputDir(), "MultiPerson.hbm.xml") );
View Full Code Here

 
  public void testGenerateMappings() {
        cfg.buildMappings();
        Exporter exporter = new HibernateMappingExporter(cfg, getOutputDir());
   
    exporter.start();
   
    Configuration derived = new Configuration();
   
    derived.addFile(new File(getOutputDir(), "Withversion.hbm.xml") );
    derived.addFile(new File(getOutputDir(), "Noversion.hbm.xml") );
View Full Code Here

  public void testGenerateAndReadable() {
   
    cfg.buildMappings();
   
    HibernateMappingExporter hme = new HibernateMappingExporter(cfg, getOutputDir());
    hme.start();   
   
    assertFileAndExists( new File(getOutputDir(), "Employee.hbm.xml") );
    assertFileAndExists( new File(getOutputDir(), "Project.hbm.xml") );
    assertFileAndExists( new File(getOutputDir(), "WorksOnContext.hbm.xml") );
   
View Full Code Here

   
 
    cfg.buildMappings();
   
    HibernateMappingExporter hme = new HibernateMappingExporter(cfg, getOutputDir());
    hme.start();   
   
    assertFileAndExists( new File(getOutputDir(), "Role.hbm.xml") );
    assertFileAndExists( new File(getOutputDir(), "User.hbm.xml") );
    assertFileAndExists( new File(getOutputDir(), "Plainrole.hbm.xml") );
   
View Full Code Here

        cfg.buildMappings();
        
        Exporter exporter = new HibernateMappingExporter(cfg, outputdir);
   
        Exporter javaExp = new POJOExporter(cfg, outputdir);
        exporter.start();
        javaExp.start();
       
        XMLPrettyPrinter.prettyPrintDirectory(outputdir,".hbm.xml", false);
        TestHelper.compile(outputdir, outputdir);
       
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.