Examples of OMFContext


Examples of org.datanucleus.OMFContext

public class JDOMetaDataHandlerTest extends TestCase
{
    public void testParseDefaultNamespace()
    {
        MetaDataParser parser = new MetaDataParser(new JDOMetaDataManager(new OMFContext(new PersistenceConfiguration(){})),true);
        MetaData md = parser.parseMetaDataURL(getClass().getResource("/org/datanucleus/metadata/xml/package1.jdo"), "jdo");
        assertNotNull(md);
    }
View Full Code Here

Examples of org.datanucleus.OMFContext

        assertNotNull(md);
    }

    public void testParseNamespace()
    {
        MetaDataParser parser = new MetaDataParser(new JDOMetaDataManager(new OMFContext(new PersistenceConfiguration(){})),true);
        MetaData md = parser.parseMetaDataURL(getClass().getResource("/org/datanucleus/metadata/xml/package2.jdo"), "jdo");
        assertNotNull(md);
    }
View Full Code Here

Examples of org.datanucleus.OMFContext

    /**
     * Test of the valid locations for a specified package.
     */
    public void testLocationsForPackage()
    {
        JDOMetaDataManager mgr = new JDOMetaDataManager(new OMFContext(new PersistenceConfiguration(){}));

        // Try typical JDO package name
        String packageName = "org.jpox.samples";
        List locations = mgr.getValidMetaDataLocationsForPackage("jdo", null, packageName);
        assertTrue("Locations returned from MetaData Manager was null!", locations != null);
View Full Code Here

Examples of org.datanucleus.OMFContext

    /**
     * Test of the valid locations for a specified class.
     */
    public void testLocationsForClass()
    {
        JDOMetaDataManager mgr = new JDOMetaDataManager(new OMFContext(new PersistenceConfiguration(){}));

        // Try typical JDO class name
        String className = "org.jpox.samples.store.Product";
        List locations = mgr.getValidMetaDataLocationsForClass("jdo", null, className);
        assertTrue("Locations returned from MetaData Manager was null!", locations != null);
View Full Code Here

Examples of org.datanucleus.OMFContext

public class MetaDataParserTest extends TestCase
{
    public void testParseMetaDataURLnullURL()
    {
        MetaDataParser parser = new MetaDataParser(new JDOMetaDataManager(new OMFContext(new PersistenceConfiguration(){})),true);
        try
        {
            parser.parseMetaDataURL(null, "jdo");
            fail("expected JPOXException");
        }
View Full Code Here

Examples of org.datanucleus.OMFContext

        }
    }

    public void testParseMetaDataURLnullhandler()
    {
        MetaDataParser parser = new MetaDataParser(new JDOMetaDataManager(new OMFContext(new PersistenceConfiguration(){})),true);
        try
        {
            parser.parseMetaDataURL(getClass().getResource("/org/datanucleus/metadata/xml/package2.jdo"), null);
            fail("expected JPOXException");
        }
View Full Code Here

Examples of org.datanucleus.OMFContext

public class PersistenceFileMetaDataHandlerTest extends TestCase
{
    public void testParseDefaultNamespace()
    {
        MetaDataParser parser = new MetaDataParser(new JDOMetaDataManager(new OMFContext(new PersistenceConfiguration(){})),true);
        MetaData md = parser.parseMetaDataURL(getClass().getResource("/org/datanucleus/metadata/xml/persistence1.xml"), "persistence");
        assertNotNull(md);
    }
View Full Code Here

Examples of org.datanucleus.OMFContext

        assertNotNull(md);
    }

    public void testParseNamespace()
    {
        MetaDataParser parser = new MetaDataParser(new JDOMetaDataManager(new OMFContext(new PersistenceConfiguration(){})),true);
        MetaData md = parser.parseMetaDataURL(getClass().getResource("/org/datanucleus/metadata/xml/persistence2.xml"), "persistence");
        assertNotNull(md);
    }
View Full Code Here

Examples of org.datanucleus.OMFContext

            NucleusLogger.PERSISTENCE.debug(LOCALISER_JDO.msg("012052", pmfSource, pmfTarget,
                StringUtils.objectArrayToString(types)));
        }

        // Check if classes are detachable
        OMFContext omfCtxSource = ((JDOPersistenceManagerFactory)pmfSource).getOMFContext();
        MetaDataManager mmgr = omfCtxSource.getMetaDataManager();
        ClassLoaderResolver clr = omfCtxSource.getClassLoaderResolver(null);
        for (int i=0;i<types.length;i++)
        {
            AbstractClassMetaData cmd = mmgr.getMetaDataForClass(types[i], clr);
            if (!cmd.isDetachable())
            {
View Full Code Here

Examples of org.datanucleus.OMFContext

            NucleusLogger.PERSISTENCE.debug(LOCALISER_JDO.msg("012052", pmfSource, pmfTarget,
                StringUtils.objectArrayToString(classNames)));
        }

        // Check if classes are detachable
        OMFContext omfCtxSource = ((JDOPersistenceManagerFactory)pmfSource).getOMFContext();
        MetaDataManager mmgr = omfCtxSource.getMetaDataManager();
        ClassLoaderResolver clr = omfCtxSource.getClassLoaderResolver(null);
        for (int i=0;i<classNames.length;i++)
        {
            AbstractClassMetaData cmd = mmgr.getMetaDataForClass(classNames[i], clr);
            if (!cmd.isDetachable())
            {
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.