From: Mike S. <ms...@us...> - 2006-12-02 16:51:49
|
Update of /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Sources/er/extensions In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6816/Sources/er/extensions Modified Files: ERXEOAccessUtilities.java Log Message: javadoc + convenience method that takes entity/relationship name Index: ERXEOAccessUtilities.java =================================================================== RCS file: /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXEOAccessUtilities.java,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** ERXEOAccessUtilities.java 2 Dec 2006 16:39:16 -0000 1.74 --- ERXEOAccessUtilities.java 2 Dec 2006 16:51:45 -0000 1.75 *************** *** 1277,1280 **** --- 1277,1305 ---- } + /** + * Batch fetch a relationship, optionally skipping any relationship that has already faulted in its to-many relationship. + * + * @param databaseContext the database context to fetch in + * @param entityName the name of the entity to fetch on + * @param relationshipName the name of the relationship in that entity to fetch + * @param objects the objects to fetch the relationship on + * @param editingContext the editingContext to fetch in + * @param skipFaultedRelationships if true, skip any object whose relationship has already been faulted + */ + public static void batchFetchRelationship(EODatabaseContext databaseContext, String entityName, String relationshipName, NSArray objects, EOEditingContext editingContext, boolean skipFaultedRelationships) { + EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName); + EORelationship relationship = entity.relationshipNamed(relationshipName); + ERXEOAccessUtilities.batchFetchRelationship(databaseContext, relationship, objects, editingContext, skipFaultedRelationships); + } + + /** + * Batch fetch a relationship, optionally skipping any relationship that has already faulted in its to-many relationship. + * + * @param databaseContext the database context to fetch in + * @param relationship the relationship to fetch + * @param objects the objects to fetch the relationship on + * @param editingContext the editingContext to fetch in + * @param skipFaultedRelationships if true, skip any object whose relationship has already been faulted + */ public static void batchFetchRelationship(EODatabaseContext databaseContext, EORelationship relationship, NSArray objects, EOEditingContext editingContext, boolean skipFaultedRelationships) { if (skipFaultedRelationships && relationship.isToMany()) { |