Package org.hibernate.tool.hbm2x

Examples of org.hibernate.tool.hbm2x.HibernateMappingGlobalSettings


   * Special test for external Global settings were generated.
   * Schema and Catalog settings should appear.
   */
  public void testGlobalSettingsGeneratedDatabase() throws Exception {

    HibernateMappingGlobalSettings hgs = new HibernateMappingGlobalSettings();
    hgs.setDefaultPackage("org.hibernate.tool.hbm2x.hbm2hbmxml");
    hgs.setSchemaName("myschema");
    hgs.setCatalogName("mycatalog");
   
    Exporter gsExporter = new HibernateMappingExporter(getCfg(), getOutputDir() );
    ( (HibernateMappingExporter)gsExporter).setGlobalSettings(hgs);
 
    gsExporter.start();
View Full Code Here


   * Special test for external Global settings were generated.
   * Non-defaults should appear for Cascade and Access.
   */
  public void testGlobalSettingsGeneratedAccessAndCascadeNonDefault()  throws Exception {

    HibernateMappingGlobalSettings hgs = new HibernateMappingGlobalSettings();
    hgs.setDefaultPackage("org.hibernate.tool.hbm2x.hbm2hbmxml");
    hgs.setDefaultAccess("field");
    hgs.setDefaultCascade("save-update");
   
    Exporter gbsExporter = new HibernateMappingExporter(getCfg(), getOutputDir() );
    ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs);
 
    gbsExporter.start();
View Full Code Here

   * Test Access and Cascade setting but they are default values
   * so they should not appear.
   */
  public void testGlobalSettingsGeneratedAccessAndCascadeDefault()  throws Exception {

    HibernateMappingGlobalSettings hgs = new HibernateMappingGlobalSettings();
    hgs.setDefaultPackage("org.hibernate.tool.hbm2x.hbm2hbmxml");
    hgs.setDefaultAccess("property");
    hgs.setDefaultCascade("none");
   
    Exporter gbsExporter = new HibernateMappingExporter(getCfg(), getOutputDir() );
    ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs);
 
    gbsExporter.start();
View Full Code Here

   * Non default settings for Lazy and AutoImport so they
   * should appear.
   */
  public void testGlobalSettingsLasyAndAutoImportNonDefault()  throws Exception {

    HibernateMappingGlobalSettings hgs = new HibernateMappingGlobalSettings();
    hgs.setDefaultPackage("org.hibernate.tool.hbm2x.hbm2hbmxml");
    hgs.setDefaultLazy(false);
    hgs.setAutoImport(false);   
   
    Exporter gbsExporter = new HibernateMappingExporter(getCfg(), getOutputDir() );
    ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs);
    gbsExporter.start();

View Full Code Here

TOP

Related Classes of org.hibernate.tool.hbm2x.HibernateMappingGlobalSettings

Copyright © 2018 www.massapicom. 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.