Examples of buildMappings()


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

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

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

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

                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

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

  }
 
  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

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

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

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

        Configuration cfg = new Configuration();
       
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "User2.hbm.xml"));
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Group2.hbm.xml"));
       
        cfg.buildMappings();
       
    }
 
  public void testIdBagAttributes() {
    File outputXml = new File(getOutputDir(),  getBaseForMappings() + "User2.hbm.xml");
View Full Code Here

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()

        Configuration cfg = new Configuration();

        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Fee.hbm.xml"));
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Glarch.hbm.xml"));

        cfg.buildMappings();
    }

  public void testClassProxy() throws DocumentException {
    File outputXml = new File(getOutputDir(),  getBaseForMappings() + "Glarch.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() + "Fee.hbm.xml"));
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Glarch.hbm.xml"));

        cfg.buildMappings();
    }

  public void testCompositeElementNode() throws DocumentException {
    File outputXml = new File(getOutputDir(),  getBaseForMappings() + "Glarch.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() + "User.hbm.xml"));
        cfg.addFile(new File(getOutputDir(), getBaseForMappings() + "Group.hbm.xml"));

        cfg.buildMappings();

    }

  public void testManyToMany() throws DocumentException {
    File outputXml = new File(getOutputDir(),  getBaseForMappings() + "User.hbm.xml");
View Full Code Here

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

      .addFile( new File(getOutputDir(), "MultiPerson.hbm.xml"))
      .addFile( new File(getOutputDir(), "Middle.hbm.xml"))
      .addFile( new File(getOutputDir(), "Left.hbm.xml"))
      .addFile( new File(getOutputDir(), "Right.hbm.xml"));
   
    configuration.buildMappings();
    StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
    builder.applySettings(configuration.getProperties());
    new SchemaValidator(builder.build(), configuration).validate();
    } finally {
      Thread.currentThread().setContextClassLoader(oldLoader);     
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.