/** * Copy state from the given fetch group. */ void copy(FetchGroup fg) { if (fg._includes != null) for (Iterator itr = fg._includes.iterator(); itr.hasNext();) addDeclaredInclude((String) itr.next()); if (fg._containedBy != null) this._containedBy = new HashSet(fg._containedBy); if (fg._depths != null) { Map.Entry entry; for (Iterator itr = fg._depths.entrySet().iterator(); itr.hasNext();) { entry = (Map.Entry) itr.next(); setRecursionDepth((FieldMetaData) entry.getKey(), ((Number) entry.getValue()).intValue()); } } if (fg._postLoad != null) _postLoad = fg._postLoad; }
/** * Copy state from the given fetch group. */ void copy(FetchGroup fg) { if (fg._includes != null) { for (String included : fg._includes) { addDeclaredInclude(included); } } if (fg._containedBy != null) { this._containedBy = new HashSet<String>(fg._containedBy); } if (fg._depths != null) { for (Map.Entry<FieldMetaData,Number> entry : fg._depths.entrySet()) { setRecursionDepth(entry.getKey(), entry.getValue().intValue()); } } if (fg._postLoad != null) { _postLoad = fg._postLoad; } }
/** * Copy state from the given fetch group. */ void copy(FetchGroup fg) { if (fg._includes != null) { for (String included : fg._includes) { addDeclaredInclude(included); } } if (fg._containedBy != null) { this._containedBy = new HashSet<String>(fg._containedBy); } if (fg._depths != null) { for (Map.Entry<FieldMetaData,Number> entry : fg._depths.entrySet()) { setRecursionDepth(entry.getKey(), entry.getValue().intValue()); } } if (fg._postLoad != null) { _postLoad = fg._postLoad; } }
/** * Copy state from the given fetch group. */ void copy(FetchGroup fg) { if (fg._includes != null) { for (String included : fg._includes) { addDeclaredInclude(included); } } if (fg._containedBy != null) { this._containedBy = new HashSet<String>(fg._containedBy); } if (fg._depths != null) { for (Map.Entry<FieldMetaData,Number> entry : fg._depths.entrySet()) { setRecursionDepth(entry.getKey(), entry.getValue().intValue()); } } if (fg._postLoad != null) { _postLoad = fg._postLoad; } }
/** * Copy state from the given fetch group. */ void copy(FetchGroup fg) { if (fg._includes != null) { for (String included : fg._includes) { addDeclaredInclude(included); } } if (fg._containedBy != null) { this._containedBy = new HashSet<String>(fg._containedBy); } if (fg._depths != null) { for (Map.Entry<FieldMetaData,Number> entry : fg._depths.entrySet()) { setRecursionDepth(entry.getKey(), entry.getValue().intValue()); } } if (fg._postLoad != null) { _postLoad = fg._postLoad; } }
/** * Set a field's fetch group. */ private static void parseFetchAttribute(ClassMetaData meta, org.apache.openjpa.meta.FetchGroup fg, FetchAttributeImpl attr) { FieldMetaData field = meta.getDeclaredField(attr.name()); if (field == null || field.getManagement() != FieldMetaData.MANAGE_PERSISTENT) throw new MetaDataException(_loc.get("bad-fg-field", fg.getName(), meta, attr.name())); field.setInFetchGroup(fg.getName(), true); Set<String> parentFetchGroups = fg.getContainedBy(); for (Object parentFetchGroup : parentFetchGroups) field.setInFetchGroup(parentFetchGroup.toString(), true); if (attr.recursionDepth() != Integer.MIN_VALUE) fg.setRecursionDepth(field, attr.recursionDepth()); }
/** * Set a field's fetch group. */ private void parseFetchAttribute(ClassMetaData meta, org.apache.openjpa.meta.FetchGroup fg, FetchAttribute attr) { FieldMetaData field = meta.getDeclaredField(attr.name()); if (field == null || field.getManagement() != FieldMetaData.MANAGE_PERSISTENT) throw new MetaDataException(_loc.get("bad-fg-field", fg.getName(), meta, attr.name())); field.setInFetchGroup(fg.getName(), true); Set parentFetchGroups = fg.getContainedBy(); for (Object parentFetchGroup:parentFetchGroups) field.setInFetchGroup(parentFetchGroup.toString(), true); if (attr.recursionDepth() != Integer.MIN_VALUE) fg.setRecursionDepth(field, attr.recursionDepth()); }
/** * Set a field's fetch group. */ private static void parseFetchAttribute(ClassMetaData meta, org.apache.openjpa.meta.FetchGroup fg, FetchAttributeImpl attr) { FieldMetaData field = meta.getDeclaredField(attr.name()); if (field == null || field.getManagement() != FieldMetaData.MANAGE_PERSISTENT) throw new MetaDataException(_loc.get("bad-fg-field", fg.getName(), meta, attr.name())); field.setInFetchGroup(fg.getName(), true); Set<String> parentFetchGroups = fg.getContainedBy(); for (Object parentFetchGroup : parentFetchGroups) field.setInFetchGroup(parentFetchGroup.toString(), true); if (attr.recursionDepth() != Integer.MIN_VALUE) fg.setRecursionDepth(field, attr.recursionDepth()); }
/** * Set a field's fetch group. */ private static void parseFetchAttribute(ClassMetaData meta, org.apache.openjpa.meta.FetchGroup fg, FetchAttributeImpl attr) { FieldMetaData field = meta.getDeclaredField(attr.name()); if (field == null || field.getManagement() != FieldMetaData.MANAGE_PERSISTENT) throw new MetaDataException(_loc.get("bad-fg-field", fg.getName(), meta, attr.name())); field.setInFetchGroup(fg.getName(), true); Set<String> parentFetchGroups = fg.getContainedBy(); for (Object parentFetchGroup : parentFetchGroups) field.setInFetchGroup(parentFetchGroup.toString(), true); if (attr.recursionDepth() != Integer.MIN_VALUE) fg.setRecursionDepth(field, attr.recursionDepth()); }
/** * Set a field's fetch group. */ private static void parseFetchAttribute(ClassMetaData meta, org.apache.openjpa.meta.FetchGroup fg, FetchAttributeImpl attr) { FieldMetaData field = meta.getDeclaredField(attr.name()); if (field == null || field.getManagement() != FieldMetaData.MANAGE_PERSISTENT) throw new MetaDataException(_loc.get("bad-fg-field", fg.getName(), meta, attr.name())); field.setInFetchGroup(fg.getName(), true); Set<String> parentFetchGroups = fg.getContainedBy(); for (Object parentFetchGroup : parentFetchGroups) field.setInFetchGroup(parentFetchGroup.toString(), true); if (attr.recursionDepth() != Integer.MIN_VALUE) fg.setRecursionDepth(field, attr.recursionDepth()); }