Package org.sf.bee.persistence.entitymanager

Examples of org.sf.bee.persistence.entitymanager.BeeGenericEntityFactory


    }

    private BeeEntityManagerFactory getEntityManagerFactory(
            final String unitName)
            throws Exception {
        final BeeGenericEntityFactory factory = BeeEntityFactoryRepository.getInstance().get(unitName);
        if (null == factory) {
            throw new Exception(StringUtils.format(
                    "Factory not registerd: '%s'",
                    unitName));
        }
        return factory.getFactoryWrapper();
    }
View Full Code Here


    public static void flush(final EntityManager em) {
        getInstance().flushEm(em);
    }

    public static EntityManager create(final String unitName) throws Exception {
        final BeeGenericEntityFactory factory = BeeEntityFactoryRepository.getInstance().get(unitName);
        if (null == factory) {
            throw new Exception(StringUtils.format(
                    "Factory not registerd: '%s'",
                    unitName));
        }
        final EntityManagerFactory emf = factory.getFactoryWrapper();
        return getInstance().createEm(emf);
    }
View Full Code Here

TOP

Related Classes of org.sf.bee.persistence.entitymanager.BeeGenericEntityFactory

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.