Package org.jpox

Examples of org.jpox.ClassLoaderResolver.classForName()


            {
                try
                {
                    ClassLoaderResolver clr = ownerSM.getObjectManager().getClassLoaderResolver();
                    this.backingStore = (MapStore) ownerSM.getStoreManager().getBackingStoreForField(clr, fmd, java.util.Hashtable.class);
                    this.valueType = clr.classForName(this.backingStore.getValueType());
                }
                catch(UnsupportedOperationException ex)
                {
                    //some datastores do not support backingStores
                }
View Full Code Here


            {
                try
                {
                    ClassLoaderResolver clr = ownerSM.getObjectManager().getClassLoaderResolver();
                    this.backingStore = (MapStore) ownerSM.getStoreManager().getBackingStoreForField(clr, fmd, java.util.TreeMap.class);
                    this.valueType = clr.classForName(this.backingStore.getValueType());
                }
                catch(UnsupportedOperationException ex)
                {
                    //some datastores do not support backingStores
                }
View Full Code Here

        {
            return null;
        }

        ClassLoaderResolver clr = om.getClassLoaderResolver();
        Class primaryClass = clr.classForName(((RDBMSStoreData)schemaDataOptions.get(0)).getName());
        Class objectClass = primaryClass;
        if (Modifier.isAbstract(primaryClass.getModifiers()))
        {
            // The primary class is abstract so find one that isnt. We only need a valid object type
            Iterator optionsIter = schemaDataOptions.iterator();
View Full Code Here

            // The primary class is abstract so find one that isnt. We only need a valid object type
            Iterator optionsIter = schemaDataOptions.iterator();
            while (optionsIter.hasNext())
            {
                RDBMSStoreData data = (RDBMSStoreData)optionsIter.next();
                Class dataClass = clr.classForName(data.getName());
                if (!Modifier.isAbstract(dataClass.getModifiers()))
                {
                    objectClass = dataClass;
                    break;
                }
View Full Code Here

            // Load using the class loader of the candidate class where possible - JDO spec 12.5
            Class cls = null;
            try
            {
                cls = clr.classForName(tables[tableNo].getType(), this.candidateClass.getClassLoader());
            }
            catch (ClassNotResolvedException cnfe)
            {
                throw new JPOXUserException(LOCALISER_RDBMS.msg("053002",
                    candidateClass.getName(), tables[tableNo].getType())).setFatal();
View Full Code Here

                    // Take the metadata for the first implementation of the reference type
                    String[] clsNames = storeMgr.getOMFContext().getMetaDataManager().getClassesImplementingInterface(candidateClass.getName(), clr);
                    candidates = new Class[clsNames.length];
                    for (int j=0; j<clsNames.length; j++)
                    {
                        candidates[j] = clr.classForName(clsNames[j]);
                    }
                }
                else
                {
                    candidates = new Class[] {candidateClass};
View Full Code Here

                    useSubclassesInStatement = false;
                }

                QueryExpression query_table = new UnionIteratorStatement(clr,
                    multipleTableCase ? cls : candidateClass, useSubclassesInStatement, storeMgr,
                    clr.classForName(tables[tableNo].getType()),
                    tables[tableNo].getIDMapping(), tables[tableNo], false, Boolean.TRUE,
                    !completeTableInheritance, false).getQueryStatement(candidateAlias);
               
                if (query != null)
                {
View Full Code Here

        if (fmd.getColumnMetaData().length > 0)
        {
            // Use "datastore-mapping-class" extension if provided
            if (fmd.getColumnMetaData()[index].hasExtension("datastore-mapping-class"))
            {
                datastoreMappingClass = clr.classForName(fmd.getColumnMetaData()[index].getValueForExtension("datastore-mapping-class"));
            }
        }
        if (datastoreMappingClass == null)
        {
            String javaType = mapping.getJavaTypeForDatastoreMapping(index);
View Full Code Here

        ClassLoaderResolver clr = sm.getObjectManager().getClassLoaderResolver();
        // TODO Allow for more than just the first elementTable (currently take the columns to select from the first element table only)
        if (elementsAreEmbedded || elementsAreSerialised)
        {
            return new PersistentIDROF(null , null, emd, null, null, null, ignoreCache, false,
                stmt.hasMetaDataExpression(), null, clr.classForName(elementType));
        }
        else if (elementMapping instanceof ReferenceMapping)
        {
            // Element = Reference (Interface/Object)
            // TODO Respect any fetch plan for the implementation class
View Full Code Here

                stmt.select(implMappings[i]);
            }

            return new PersistentIDROF(elementInfo != null ? elementInfo[0].getDatastoreClass() : null, null, emd,
                    null, null, null, ignoreCache, false,
                    stmt.hasMetaDataExpression(), null, clr.classForName(elementType));
        }
        else
        {
            // Element = PC
            int[] datastoreIndex = null;
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.