Examples of fetchSpecificationNamed()


Examples of com.webobjects.eoaccess.EOEntity.fetchSpecificationNamed()

            result = (NSArray)objectsByFetchSpecName.objectForKey(fetchSpecName);
        }

        if( result == null ) {
            EOEntity entity = EOUtilities.entityNamed(sharedEditingContext, entityName);
            EOFetchSpecification fetchSpecification = entity.fetchSpecificationNamed(fetchSpecName);

            sharedEditingContext.bindObjectsWithFetchSpecification(fetchSpecification, fetchSpecName);

            objectsByFetchSpecName = (NSDictionary)sharedEditingContext.objectsByEntityNameAndFetchSpecificationName().objectForKey(entityName);
            if( objectsByFetchSpecName != null ) { //shouldn't be
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.fetchSpecificationNamed()

    public void setFetchSpecificationName(String value) {
        d2wContext().takeValueForKey(value,"fetchSpecificationName");
        //_fetchSpecificationName=name;
        EOEntity e=entity();
        setFetchSpecification(e.fetchSpecificationNamed(value));
    }

    public String fetchSpecificationName() {
        return (String)d2wContext().valueForKey("fetchSpecificationName");
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.fetchSpecificationNamed()

                /* For EOs that are completely shared the below for loop results in *2* fetches
                for 1 fs (fetchAll) when the entity is caching the code below works around this with only 1 fetch. */
                if (entity.sharedObjectFetchSpecificationNames().count() == 1 &&
                    entity.sharedObjectFetchSpecificationNames().lastObject().equals("FetchAll")) {
                    try {
                        EOFetchSpecification fs = entity.fetchSpecificationNamed("FetchAll");
                        dsec.bindObjectsWithFetchSpecification(fs, "FetchAll");
                    } catch (Exception e1) {
                        log.error("Exception occurred for entity named: " + entity.name() + " in Model: " + aModel.name() + e1);
                        throw new RuntimeException(e.toString());
                    }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.fetchSpecificationNamed()

                        throw new RuntimeException(e.toString());
                    }
                } else {
                    for (Enumeration ee = entity.sharedObjectFetchSpecificationNames().objectEnumerator(); ee.hasMoreElements();) {
                        String fsn = (String)ee.nextElement();
                        EOFetchSpecification fs = entity.fetchSpecificationNamed(fsn);
                        if (fs != null) {
                            log.debug("Loading "+entity.name()+" - "+fsn);
                            dsec.bindObjectsWithFetchSpecification(fs, fsn);
                        }
                    }                   
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.fetchSpecificationNamed()

            int count =  (fetchSpecNames != null) ? fetchSpecNames.count() : 0;

            if ( count > 0 ) { //same check as ERXEOAccessUtilities.entityWithNamedIsShared(), but avoids duplicate work
                for (int index = 0 ; index < count ; ++index) {
                    String oneFetchSpecName = (String)fetchSpecNames.objectAtIndex(index);
                    EOFetchSpecification fs = entity.fetchSpecificationNamed(oneFetchSpecName);
                    if (fs != null) {
                        fs.setRefreshesRefetchedObjects(true);
                        sharedEC.bindObjectsWithFetchSpecification(fs, oneFetchSpecName);
                    }
                }
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.