Package org.objectweb.medor.query.jorm.lib

Examples of org.objectweb.medor.query.jorm.lib.PNameField


     * @param qd is the definition of the query
     */
    private void addPrefetchField(JDOQueryDefinitionImpl qd) throws MedorException {
        Field f = ((PropagatedField) selectfields.get(0)).getOriginFields()[0];
        if (f instanceof PNameField) {
            PNameField pnf = (PNameField) f;
            if (pnf.isClassPName() && !pnf.isInGenClass()) {
                //Add prefeched fields
                ClassExtent ce = (ClassExtent) pnf.getQueryTree();
                String prefetchedClassName = ce.getJormName();
                HomeItf sh = (HomeItf) mapper.lookup(prefetchedClassName);
                if (sh.getPrefetchOnQuery()) {
                    qec.pcm = sh;
                    JormQueryTreeHelper.addPrefetchFields(ce, qt, top,
View Full Code Here


        case PType.TYPECODE_REFERENCE:
            if (field instanceof PropagatedField) {
                Field f = ((PropagatedField) field).getOriginFields()[0];
                if (f instanceof PNameField) {
                    PNameField pnf = (PNameField) f;
                    if (pnf.isClassPName()) {
                        if (pnf.isInGenClass()) {
                            //identifier of the genclass
                            className = pnf.getGenClassRef().getGenClassId();
                        } else {
                            //identifier of a class
                            className = pnf.getMetaObjectClass().getFQName();
                        }
                    } else {
                        Reference ref = pnf.getReference();
                        if (ref instanceof ClassRef) {
                            //reference to a class
                            className = ((ClassRef) ref).getMOClass().getFQName();
                        } else if (ref instanceof GenClassRef) {
                            //reference to a genclass
View Full Code Here

        if (!theqb.contains(path[0])) {
            IdValue idv = (IdValue) ids.get(path[0]);
            String[] name = idv.name;

            PNameField pnf;
            if (name.length == 1) {
                pnf = extent(name[0], path[0]);
                theqb.define(path[0], pnf);
            } else {
                pnf = (PNameField) define(theqb, mergePath(name), alias);
View Full Code Here

TOP

Related Classes of org.objectweb.medor.query.jorm.lib.PNameField

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.