Examples of OMFContext


Examples of org.jpox.OMFContext

            }
        }
    }
    public Enhancer(PersistenceConfiguration config)
    {
        omfContext = new OMFContext(config);
        omfContext.getMetaDataManager().setEnhancing();
        api = omfContext.getPersistenceConfiguration().getStringProperty("org.jpox.persistenceApiName");
        pluginMgr = omfContext.getPluginManager();
        clr = omfContext.getClassLoaderResolver(null);
    }
View Full Code Here

Examples of org.jpox.OMFContext

        {
            // This is our class so yes it will be PersistenceCapable
            return true;
        }

        OMFContext omfCtx = cmd.getMetaDataManager().getOMFContext();
        Class cls = clr.classForName(className, new EnhancerClassLoader());
        if (omfCtx.getApiAdapter().isPersistable(cls))
        {
            // The specified class is already PersistenceCapable
            return true;
        }
View Full Code Here

Examples of org.jpox.OMFContext

    /**
     * Constructor.
     */
    public JPOXEnhancer()
    {
        omfContext = new OMFContext(this);
        clr = omfContext.getClassLoaderResolver(null);
    }
View Full Code Here

Examples of org.jpox.OMFContext

        if (jdoXmlContents == null)
        {
            throw new IllegalArgumentException("Contents of file is null");
        }

        OMFContext context = new OMFContext(new PersistenceConfiguration(){});
        MetaDataManager mgr = new JDOMetaDataManager(context);
        mgr.setEnhancing();
        mgr.setMetaDataFactory(getMetaDataFactory(mgr));
        MetaDataParser parser = new MetaDataParser(mgr, true);
        JDOClassLoaderResolver clr = new JDOClassLoaderResolver();
View Full Code Here

Examples of org.jpox.OMFContext

        unitMetaData = EntityManagerFactoryImpl.unitMetaDataCache.get(unitName);
        if (unitMetaData == null)
        {
            // Find all "META-INF/persistence.xml" files in the current thread loader CLASSPATH and parse them
            // Create a temporary PMFContext so we have a parser
            OMFContext pmfCtxt = new OMFContext(new PersistenceConfiguration(){});
            pmfCtxt.setApi("JPA");
            MetaDataManager metadataMgr = pmfCtxt.getMetaDataManager();
            PersistenceFileMetaData[] files = metadataMgr.parsePersistenceFiles();
            if (files == null)
            {
                // No "persistence.xml" files found
                JPOXLogger.JPA.warn(LOCALISER.msg("EMF.NoPersistenceXML"));
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.