/** * Return all the vertical mappings to select separately. Depends on * subclass fetch mode and the type of query. */ private ClassMapping[] getVerticalMappings(ClassMapping mapping, boolean subclasses, QueryExpressions exps, int subclassMode) { if (!subclasses || exps.projections.length > 0) return new ClassMapping[] { mapping }; if (subclassMode != JDBCFetchConfiguration.EAGER_PARALLEL || !hasVerticalSubclasses(mapping)) return new ClassMapping[] { mapping }; List subs = new ArrayList(4); addSubclasses(mapping, subs); return (ClassMapping[]) subs.toArray(new ClassMapping[subs.size()]); }
/** * Return all the vertical mappings to select separately. Depends on * subclass fetch mode and the type of query. */ private ClassMapping[] getVerticalMappings(ClassMapping mapping, boolean subclasses, QueryExpressions exps, int subclassMode) { if (!subclasses || exps.projections.length > 0) return new ClassMapping[] { mapping }; if (subclassMode != JDBCFetchConfiguration.EAGER_PARALLEL || !hasVerticalSubclasses(mapping)) return new ClassMapping[] { mapping }; List subs = new ArrayList(4); addSubclasses(mapping, subs); return (ClassMapping[]) subs.toArray(new ClassMapping[subs.size()]); }
/** * Return all the vertical mappings to select separately. Depends on * subclass fetch mode and the type of query. */ private ClassMapping[] getVerticalMappings(ClassMapping mapping, boolean subclasses, QueryExpressions exps, int subclassMode) { if (!subclasses || exps.projections.length > 0) return new ClassMapping[] { mapping }; if (subclassMode != JDBCFetchConfiguration.EAGER_PARALLEL || !hasVerticalSubclasses(mapping)) return new ClassMapping[] { mapping }; List subs = new ArrayList(4); addSubclasses(mapping, subs); return (ClassMapping[]) subs.toArray(new ClassMapping[subs.size()]); }
/** * Return all the vertical mappings to select separately. Depends on * subclass fetch mode and the type of query. */ private ClassMapping[] getVerticalMappings(ClassMapping mapping, boolean subclasses, QueryExpressions exps, int subclassMode) { if (!subclasses || exps.projections.length > 0) return new ClassMapping[] { mapping }; if (subclassMode != JDBCFetchConfiguration.EAGER_PARALLEL || !hasVerticalSubclasses(mapping)) return new ClassMapping[] { mapping }; List subs = new ArrayList(4); addSubclasses(mapping, subs); return (ClassMapping[]) subs.toArray(new ClassMapping[subs.size()]); }
/** * Return all the vertical mappings to select separately. Depends on * subclass fetch mode and the type of query. */ private ClassMapping[] getVerticalMappings(ClassMapping mapping, boolean subclasses, QueryExpressions exps, int subclassMode) { if (!subclasses || exps.projections.length > 0) return new ClassMapping[] { mapping }; if (subclassMode != JDBCFetchConfiguration.EAGER_PARALLEL || !hasVerticalSubclasses(mapping)) return new ClassMapping[] { mapping }; List subs = new ArrayList(4); addSubclasses(mapping, subs); return (ClassMapping[]) subs.toArray(new ClassMapping[subs.size()]); }
/** * Recursive helper to add mappings for subclasses to the given list. */ private void addSubclasses(ClassMapping mapping, Collection subs) { // possible future optimizations: // - if no fields in meta or its subclasses (and not in an // already-selected table) are in the current fetch // configuration, stop creating new executors // - allow an executor to select a range of subclasses, rather // than just all subclasses / no subclasses; this would // allow us to do just one query per actual vertically-mapped // subclass, rather than one per mapped subclass, as is happening now subs.add(mapping); if (!hasVerticalSubclasses(mapping)) return; // recurse on immediate subclasses ClassMapping[] subMappings = mapping.getJoinablePCSubclassMappings(); for (int i = 0; i < subMappings.length; i++) if (subMappings[i].getJoinablePCSuperclassMapping() == mapping) addSubclasses(subMappings[i], subs); }
/** * Recursive helper to add mappings for subclasses to the given list. */ private void addSubclasses(ClassMapping mapping, Collection subs) { // possible future optimizations: // - if no fields in meta or its subclasses (and not in an // already-selected table) are in the current fetch // configuration, stop creating new executors // - allow an executor to select a range of subclasses, rather // than just all subclasses / no subclasses; this would // allow us to do just one query per actual vertically-mapped // subclass, rather than one per mapped subclass, as is happening now subs.add(mapping); if (!hasVerticalSubclasses(mapping)) return; // recurse on immediate subclasses ClassMapping[] subMappings = mapping.getJoinablePCSubclassMappings(); for (int i = 0; i < subMappings.length; i++) if (subMappings[i].getJoinablePCSuperclassMapping() == mapping) addSubclasses(subMappings[i], subs); }
/** * Recursive helper to add mappings for subclasses to the given list. */ private void addSubclasses(ClassMapping mapping, Collection subs) { // possible future optimizations: // - if no fields in meta or its subclasses (and not in an // already-selected table) are in the current fetch // configuration, stop creating new executors // - allow an executor to select a range of subclasses, rather // than just all subclasses / no subclasses; this would // allow us to do just one query per actual vertically-mapped // subclass, rather than one per mapped subclass, as is happening now subs.add(mapping); if (!hasVerticalSubclasses(mapping)) return; // recurse on immediate subclasses ClassMapping[] subMappings = mapping.getJoinablePCSubclassMappings(); for (int i = 0; i < subMappings.length; i++) if (subMappings[i].getJoinablePCSuperclassMapping() == mapping) addSubclasses(subMappings[i], subs); }
/** * Recursive helper to add mappings for subclasses to the given list. */ private void addSubclasses(ClassMapping mapping, Collection subs) { // possible future optimizations: // - if no fields in meta or its subclasses (and not in an // already-selected table) are in the current fetch // configuration, stop creating new executors // - allow an executor to select a range of subclasses, rather // than just all subclasses / no subclasses; this would // allow us to do just one query per actual vertically-mapped // subclass, rather than one per mapped subclass, as is happening now subs.add(mapping); if (!hasVerticalSubclasses(mapping)) return; // recurse on immediate subclasses ClassMapping[] subMappings = mapping.getJoinablePCSubclassMappings(); for (int i = 0; i < subMappings.length; i++) if (subMappings[i].getJoinablePCSuperclassMapping() == mapping) addSubclasses(subMappings[i], subs); }
/** * Recursive helper to add mappings for subclasses to the given list. */ private void addSubclasses(ClassMapping mapping, Collection subs) { // possible future optimizations: // - if no fields in meta or its subclasses (and not in an // already-selected table) are in the current fetch // configuration, stop creating new executors // - allow an executor to select a range of subclasses, rather // than just all subclasses / no subclasses; this would // allow us to do just one query per actual vertically-mapped // subclass, rather than one per mapped subclass, as is happening now subs.add(mapping); if (!hasVerticalSubclasses(mapping)) return; // recurse on immediate subclasses ClassMapping[] subMappings = mapping.getJoinablePCSubclassMappings(); for (int i = 0; i < subMappings.length; i++) if (subMappings[i].getJoinablePCSuperclassMapping() == mapping) addSubclasses(subMappings[i], subs); }