Package com.dotcms.repackage.net.sf.hibernate.cfg

Examples of com.dotcms.repackage.net.sf.hibernate.cfg.Configuration.addResource()


      Configuration cfg = new Configuration().configure();

      if (DbConnectionFactory.isMySql()) {
        //http://jira.dotmarketing.net/browse/DOTCMS-4937
        cfg.setNamingStrategy(new LowercaseNamingStrategy());
        cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
        getPluginsHBM("Id",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.MySQLDialect");
      } else if (DbConnectionFactory.isPostgres()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
View Full Code Here


      if (DbConnectionFactory.isMySql()) {
        //http://jira.dotmarketing.net/browse/DOTCMS-4937
        cfg.setNamingStrategy(new LowercaseNamingStrategy());
        cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
        getPluginsHBM("Id",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.MySQLDialect");
      } else if (DbConnectionFactory.isPostgres()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
View Full Code Here

        cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
        getPluginsHBM("Id",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.MySQLDialect");
      } else if (DbConnectionFactory.isPostgres()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
        getPluginsHBM("Seq",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.PostgreSQLDialect");
      } else if (DbConnectionFactory.isMsSql()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
View Full Code Here

        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
        getPluginsHBM("Id",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.MySQLDialect");
      } else if (DbConnectionFactory.isPostgres()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
        getPluginsHBM("Seq",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.PostgreSQLDialect");
      } else if (DbConnectionFactory.isMsSql()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
View Full Code Here

        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
        getPluginsHBM("Seq",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.PostgreSQLDialect");
      } else if (DbConnectionFactory.isMsSql()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
        getPluginsHBM("Id",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.SQLServerDialect");
      } else if (DbConnectionFactory.isOracle()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
View Full Code Here

        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
        getPluginsHBM("Seq",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.PostgreSQLDialect");
      } else if (DbConnectionFactory.isMsSql()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
        getPluginsHBM("Id",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.SQLServerDialect");
      } else if (DbConnectionFactory.isOracle()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
View Full Code Here

        cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
        getPluginsHBM("Id",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.SQLServerDialect");
      } else if (DbConnectionFactory.isOracle()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
        getPluginsHBM("Seq",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.OracleDialect");
      } else if (DbConnectionFactory.isH2()) {
          cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
View Full Code Here

        cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
        getPluginsHBM("Id",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.SQLServerDialect");
      } else if (DbConnectionFactory.isOracle()) {
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
        getPluginsHBM("Seq",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.OracleDialect");
      } else if (DbConnectionFactory.isH2()) {
          cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
                cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
View Full Code Here

        cfg.addResource("com/dotmarketing/beans/DotCMSSeq.hbm.xml");
        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
        getPluginsHBM("Seq",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.OracleDialect");
      } else if (DbConnectionFactory.isH2()) {
          cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
                cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
                getPluginsHBM("Id",cfg);
                cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.HSQLDialect");
      }
View Full Code Here

        cfg.addResource("com/dotmarketing/beans/DotCMSSeq_NOSQLGEN.hbm.xml");
        getPluginsHBM("Seq",cfg);
        cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.OracleDialect");
      } else if (DbConnectionFactory.isH2()) {
          cfg.addResource("com/dotmarketing/beans/DotCMSId.hbm.xml");
                cfg.addResource("com/dotmarketing/beans/DotCMSId_NOSQLGEN.hbm.xml");
                getPluginsHBM("Id",cfg);
                cfg.setProperty("hibernate.dialect", "com.dotcms.repackage.net.sf.hibernate.dialect.HSQLDialect");
      }

      cfg.setInterceptor(new NoDirtyFlushInterceptor());
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.