( Class<T> clazz, List<String> fields, Rule filter, int depth )
| 47 | private static final String TAG = "ANDRORM:QUERY:BUILDER"; |
| 48 | |
| 49 | private static final <T extends Model> SelectStatement buildJoin( |
| 50 | |
| 51 | Class<T> clazz, |
| 52 | List<String> fields, |
| 53 | Rule filter, |
| 54 | int depth |
| 55 | |
| 56 | ) { |
| 57 | |
| 58 | T instance = Model.getInstace(clazz); |
| 59 | |
| 60 | if(instance != null) { |
| 61 | Object fieldInstance = getFieldInstance(clazz, instance, fields.get(0)); |
| 62 | |
| 63 | if(fields.size() == 1) { |
| 64 | return resolveLastField(fieldInstance, clazz, filter); |
| 65 | } |
| 66 | |
| 67 | if(DatabaseBuilder.isRelationalField(fieldInstance)) { |
| 68 | return resolveRelationField(fieldInstance, clazz, fields, filter, depth); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | return null; |
| 73 | } |
| 74 | |
| 75 | public static final <T extends Model> SelectStatement buildQuery( |
| 76 |
no test coverage detected