/** * Based on the DBDictionary, create the needed IN clauses. */ private void createInContains(Select sel, DBDictionary dict, SQLBuffer buf, ClassMapping mapping, Column[] pks, int start, int end) { int inClauseLimit = dict.inClauseLimit; if (inClauseLimit <= 0 || end - start <= inClauseLimit) inContains(sel, buf, mapping, pks, start, end); else { buf.append("("); for (int low = start, high; low < end; low = high) { if (low > start) buf.append(" OR "); high = Math.min(low + inClauseLimit, end); inContains(sel, buf, mapping, pks, low, high); } buf.append(")"); } }
/** * Based on the DBDictionary, create the needed IN clauses. */ private void createInContains(Select sel, DBDictionary dict, SQLBuffer buf, ClassMapping mapping, Column[] pks, int start, int end) { int inClauseLimit = dict.inClauseLimit; if (inClauseLimit <= 0 || end - start <= inClauseLimit) inContains(sel, buf, mapping, pks, start, end); else { buf.append("("); for (int low = start, high; low < end; low = high) { if (low > start) buf.append(" OR "); high = Math.min(low + inClauseLimit, end); inContains(sel, buf, mapping, pks, low, high); } buf.append(")"); } }
/** * Based on the DBDictionary, create the needed IN clauses. */ private void createInContains(Select sel, DBDictionary dict, SQLBuffer buf, ClassMapping mapping, Column[] pks, int start, int end) { int inClauseLimit = dict.inClauseLimit; if (inClauseLimit <= 0 || end - start <= inClauseLimit) inContains(sel, buf, mapping, pks, start, end); else { buf.append("("); for (int low = start, high; low < end; low = high) { if (low > start) buf.append(" OR "); high = Math.min(low + inClauseLimit, end); inContains(sel, buf, mapping, pks, low, high); } buf.append(")"); } }
/** * Based on the DBDictionary, create the needed IN clauses. */ private void createInContains(Select sel, DBDictionary dict, SQLBuffer buf, ClassMapping mapping, Column[] pks, int start, int end) { int inClauseLimit = dict.inClauseLimit; if (inClauseLimit <= 0 || end - start <= inClauseLimit) inContains(sel, buf, mapping, pks, start, end); else { buf.append("("); for (int low = start, high; low < end; low = high) { if (low > start) buf.append(" OR "); high = Math.min(low + inClauseLimit, end); inContains(sel, buf, mapping, pks, low, high); } buf.append(")"); } }
/** * Based on the DBDictionary, create the needed IN clauses. */ private void createInContains(Select sel, DBDictionary dict, SQLBuffer buf, ClassMapping mapping, Column[] pks, int start, int end) { int inClauseLimit = dict.inClauseLimit; if (inClauseLimit <= 0 || end - start <= inClauseLimit) inContains(sel, buf, mapping, pks, start, end); else { buf.append("("); for (int low = start, high; low < end; low = high) { if (low > start) buf.append(" OR "); high = Math.min(low + inClauseLimit, end); inContains(sel, buf, mapping, pks, low, high); } buf.append(")"); } }