Package er.extensions.eof

Examples of er.extensions.eof.ERXReplicableInterface


    }

    /** Copies a relationship from one EO to another using the name of the relationship */
    public static void replicateRelationshipFromEOToEO(EOEnterpriseObject r1, EOEnterpriseObject r2, String relationshipName){
        for(Enumeration e = ((NSArray)r1.valueForKey(relationshipName)).objectEnumerator(); e.hasMoreElements();){
            ERXReplicableInterface replicableTarget = (ERXReplicableInterface)e.nextElement();
            r2.addObjectToBothSidesOfRelationshipWithKey(replicableTarget.replicate(r2.editingContext()), relationshipName);
        }
    }
View Full Code Here


    public static void deplicateRelationshipFromEO(EOEnterpriseObject r1, String relationshipName){
        //System.out.println("r1 "+r1);
        //System.out.println("relationshipName "+relationshipName);
        //System.out.println("array "+r1.valueForKey(relationshipName));
        for(Enumeration e = ((NSArray)r1.valueForKey(relationshipName)).objectEnumerator(); e.hasMoreElements();){
            ERXReplicableInterface replicableTarget = (ERXReplicableInterface)e.nextElement();
            //System.out.println("replicableTarget "+replicableTarget);
            r1.removeObjectFromBothSidesOfRelationshipWithKey((EOEnterpriseObject)replicableTarget,
                                                              relationshipName);
            replicableTarget.deplicate();
        }
    }
View Full Code Here

TOP

Related Classes of er.extensions.eof.ERXReplicableInterface

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.