public boolean equals(Object obj) { if (obj == null) { return false; } else if (!(obj instanceof JDOFetchGroup)) { return false; } JDOFetchGroup other = (JDOFetchGroup)obj; return other.fg.equals(fg); }
/** * Accessor for the members that are in this fetch group. * @return Set of member names. */ public Set getMembers() { return fg.getMembers(); }
/** * Accessor for the group name. * @return Name of the group */ public String getName() { return fg.getName(); }
if (fetchGrpMgr.getFetchGroupsWithName(fgName) == null) FetchGroup grp = new FetchGroup(storeMgr.getNucleusContext(), fgName, clr.classForName(cmd.getFullClassName())); grp.addMember(mmd.getName()); fetchGrpMgr.addFetchGroup(grp);
/** * Method to add a field of the class to the fetch group. * @param memberName Name of the field * @return This FetchGroup * @throws JDOUserException if the field doesn't exist for this class */ public FetchGroup addMember(String memberName) { assertUnmodifiable(); try { fg.addMember(memberName); return this; } catch (NucleusUserException nue) { throw NucleusJDOHelper.getJDOExceptionForNucleusException(nue); } }
FetchGroup internalCopy = new FetchGroup(internalGrp); jdoGrp = new JDOFetchGroup(internalCopy); ec.addInternalFetchGroup(internalCopy);
/** * Accessor for the class that this group is for. * @return the class */ public Class getType() { return fg.getType(); }
/** * Accessor for whether to call postLoad when this group is loaded. * @return Whether to call postLoad */ public boolean getPostLoad() { return fg.getPostLoad(); }
/** * Accessor for the recursion depth for the specified field/property. * @param memberName Name of field/property * @return The recursion depth */ public int getRecursionDepth(String memberName) { return fg.getRecursionDepth(memberName); }
/** * Convenience method to add the members in the specified category. * @param categoryName The category * @return This FetchGroup */ public FetchGroup addCategory(String categoryName) { assertUnmodifiable(); fg.addCategory(categoryName); return this; }
/** * Method to add members of the class from the fetch group. * @param members Names of the fields/properties * @return This FetchGroup */ public FetchGroup addMembers(String... members) { assertUnmodifiable(); try { fg.addMembers(members); return this; } catch (NucleusUserException nue) { throw NucleusJDOHelper.getJDOExceptionForNucleusException(nue); } }