Libraryless. Click here for Pure Java version (14783L/95K).
1 | static <A extends Concept> Cl<A> findConceptsWhere(Class<A> c, O... params) { |
2 | ret findConceptsWhere(db_mainConcepts(), c, params); |
3 | } |
4 | |
5 | static Cl<Concept> findConceptsWhere(S c, O... params) { |
6 | ret findConceptsWhere(db_mainConcepts(), c, params); |
7 | } |
8 | |
9 | static <A extends Concept> Cl<A> findConceptsWhere(Concepts concepts, Class<A> c, O... params) { |
10 | ping(); |
11 | params = expandParams(c, params); |
12 | |
13 | // indexed |
14 | if (concepts.fieldIndices != null) |
15 | for (int i = 0; i < l(params); i += 2) { |
16 | IFieldIndex<A, O> index = concepts.getFieldIndex(c, (S) params[i]); |
17 | if (index != null) { |
18 | Cl<A> rawList = index.getAll(params[i+1]); |
19 | params = dropEntryFromParams(params, i); |
20 | if (params == null) ret rawList; |
21 | new L<A> l; |
22 | for (A x : rawList) |
23 | if (checkConceptFields(x, params)) l.add(x); |
24 | ret l; |
25 | } |
26 | } |
27 | |
28 | // table scan |
29 | ret filterConcepts(concepts.list(c), params); |
30 | } |
31 | |
32 | static Cl<Concept> findConceptsWhere(Concepts concepts, S c, O... params) { |
33 | ret filterConcepts(concepts.list(c), params); |
34 | } |
Began life as a copy of #1005060
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005064 |
Snippet name: | findConceptsWhere |
Eternal ID of this version: | #1005064/8 |
Text MD5: | 1bb92bad3fe25e2692b31c3b00ed1a7e |
Transpilation MD5: | 49143822db02ab8472237a7f7b85c308 |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-03-19 17:46:40 |
Source code size: | 1096 bytes / 34 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 640 / 677 |
Version history: | 7 change(s) |
Referenced in: | [show references] |