Libraryless. Click here for Pure Java version (14837L/95K).
1 | static <A extends Concept> Cl<A> nuLike findConceptsWhereCI(Class<A> c, O... params) { |
2 | ret findConceptsWhereCI(db_mainConcepts(), c, params); |
3 | } |
4 | |
5 | static L<Concept> findConceptsWhereCI(S c, O... params) { |
6 | ret findConceptsWhereCI(db_mainConcepts(), c, params); |
7 | } |
8 | |
9 | static <A extends Concept> Cl<A> findConceptsWhereCI(Concepts concepts, Class<A> c, O... params) { |
10 | Cl<A> l = findConceptsWhereCI_noParent(concepts, c, params); |
11 | if (concepts.parent == null) ret l; |
12 | ret concatCollections_conservative(l, findConceptsWhereCI(concepts.parent, c, params)); |
13 | } |
14 | |
15 | static <A extends Concept> Cl<A> findConceptsWhereCI_noParent(Concepts concepts, Class<A> c, O... params) { |
16 | params = expandParams(c, params); |
17 | |
18 | // indexed |
19 | if (concepts.ciFieldIndices != null) |
20 | for (int i = 0; i < l(params); i += 2) { |
21 | IFieldIndex<A, O> index = concepts.getCIFieldIndex(c, (S) params[i]); |
22 | if (index != null) { |
23 | Cl<A> rawList = index.getAll(params[i+1]); |
24 | params = dropEntryFromParams(params, i); |
25 | if (params == null) ret rawList; |
26 | new L<A> l; |
27 | for (A x : rawList) |
28 | if (checkConceptFieldsIC(x, params)) l.add(x); |
29 | ret l; |
30 | } |
31 | } |
32 | |
33 | // table scan |
34 | ret filterConceptsIC(concepts.list(c), params); |
35 | } |
36 | |
37 | static L<Concept> findConceptsWhereCI(Concepts concepts, S c, O... params) { |
38 | ret filterConceptsIC(concepts.list(c), params); |
39 | } |
Began life as a copy of #1005064
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023278 |
Snippet name: | findConceptsWhereCI |
Eternal ID of this version: | #1023278/9 |
Text MD5: | cd20369a7e77e538a5fa7bb838233130 |
Transpilation MD5: | 94b06ba3b59d38376366b8d49c0cfacd |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-04-06 12:30:41 |
Source code size: | 1422 bytes / 39 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 358 / 513 |
Version history: | 8 change(s) |
Referenced in: | [show references] |