• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java PersistenceUtil类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.bubblecloud.ilves.util.PersistenceUtil的典型用法代码示例。如果您正苦于以下问题:Java PersistenceUtil类的具体用法?Java PersistenceUtil怎么用?Java PersistenceUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

PersistenceUtil类属于org.bubblecloud.ilves.util包,在下文中一共展示了PersistenceUtil类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: contextInitialized

点赞 2

import org.bubblecloud.ilves.util.PersistenceUtil; //导入依赖的package包/类
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
    // Configure logging.
    //DOMConfigurator.configure("log4j.xml");

    final long startTimeMillis = System.currentTimeMillis();
    LOGGER.info("Ilves servlet context initializing.");

    if(!PROPERTIES_FILE_PREFIX.equals("site")) {
        PropertiesUtil.setCategoryRedirection("site", PROPERTIES_FILE_PREFIX);
    }

    DefaultSiteUI.setEntityManagerFactory(PersistenceUtil.getEntityManagerFactory(PERSISTENCE_UNIT, "site"));
    DefaultSiteUI.setSecurityProvider(new SecurityProviderSessionImpl(new String[]{"administrator", "user"}));
    DefaultSiteUI.setContentProvider(new DefaultContentProvider());
    if(!"site-localization".equals(LOCALIZATION_BUNDLE_PREFIX)) {
        DefaultSiteUI.setLocalizationProvider(new LocalizationProviderBundleImpl(new String[]{"site-localization", LOCALIZATION_BUNDLE_PREFIX}));
    } else {
        DefaultSiteUI.setLocalizationProvider(new LocalizationProviderBundleImpl(new String[]{"site-localization"}));
    }

    // Initialize modules
    Ilves.initializeModule(AuditModule.class);
    Ilves.initializeModule(CustomerModule.class);
    Ilves.initializeModule(ContentModule.class);

    Ilves.addRootPage(0, "custom", DefaultValoView.class);
    Ilves.setPageComponent("custom", Slot.CONTENT, WelcomeComponent.class);
    Ilves.setPageComponent("custom", Slot.FOOTER, CommentingComponent.class);
    Ilves.setDefaultPage("custom");

    LOGGER.info("Ilves servlet context initialized in " + (System.currentTimeMillis() - startTimeMillis ) + " ms.");
}
 

开发者ID:bubblecloud,
项目名称:ilves-war-seed,
代码行数:34,
代码来源:IlvesServletContextListener.java

示例2: main

点赞 2

import org.bubblecloud.ilves.util.PersistenceUtil; //导入依赖的package包/类
/**
 *
 * @param args
 */
public static void main(final String[] args) throws Exception {
    // Configure logging.
    DOMConfigurator.configure("log4j.xml");

    PropertiesUtil.setCategoryRedirection("site", IlvesMain.PROPERTIES_FILE_PREFIX);
    final String diff = PersistenceUtil.diff(IlvesMain.PERSISTENCE_UNIT, IlvesMain.PROPERTIES_FILE_PREFIX);
    System.out.println(diff);
}
 

开发者ID:bubblecloud,
项目名称:ilves-war-seed,
代码行数:13,
代码来源:IlvesDbDiff.java

示例3: main

点赞 2

import org.bubblecloud.ilves.util.PersistenceUtil; //导入依赖的package包/类
/**
 *
 * @param args
 */
public static void main(final String[] args) throws Exception {
    // Configure logging.
    DOMConfigurator.configure("log4j.xml");

    PropertiesUtil.setCategoryRedirection("site", HootMain.PROPERTIES_FILE_PREFIX);
    final String diff = PersistenceUtil.diff(HootMain.PERSISTENCE_UNIT, HootMain.PROPERTIES_FILE_PREFIX);
    System.out.println(diff);
}
 

开发者ID:bubblecloud,
项目名称:hoot-bundle-translation-site,
代码行数:13,
代码来源:IlvesDbDiff.java

示例4: main

点赞 2

import org.bubblecloud.ilves.util.PersistenceUtil; //导入依赖的package包/类
/**
 *
 * @param args
 */
public static void main(final String[] args) throws Exception {
    // Configure logging.
    DOMConfigurator.configure("log4j.xml");

    PropertiesUtil.setCategoryRedirection("site", GroomMain.PROPERTIES_FILE_PREFIX);
    final String diff = PersistenceUtil.diff(GroomMain.PERSISTENCE_UNIT, GroomMain.PROPERTIES_FILE_PREFIX);
    System.out.println(diff);
}
 

开发者ID:tlaukkan,
项目名称:groom-code-review-site,
代码行数:13,
代码来源:IlvesDbDiff.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)