MCPcopy Create free account
hub / github.com/androrm/androrm / collectData

Method collectData

src/src/com/orm/androrm/Model.java:391–409  ·  view source on GitHub ↗
(
			
			Context 		context, 
			ContentValues 	values, 
			Class<T> 		clazz
			
	)

Source from the content-addressed store, hash-verified

389 }
390
391 private <T extends Model> void collectData(
392
393 Context context,
394 ContentValues values,
395 Class<T> clazz
396
397 ) throws IllegalArgumentException, IllegalAccessException {
398
399 if(clazz != null && clazz.isInstance(this)) {
400 for(Field field: DatabaseBuilder.getFields(clazz, this)) {
401 Object o = field.get(this);
402 String fieldName = field.getName();
403
404 putValue(o, fieldName, values);
405 }
406
407 collectData(context, values, getSuperclass(clazz));
408 }
409 }
410
411 public <T extends Model> boolean delete(Context context) {
412 if(getId() != 0) {

Callers 1

saveMethod · 0.95

Calls 5

getFieldsMethod · 0.95
putValueMethod · 0.95
getSuperclassMethod · 0.95
getMethod · 0.65
getNameMethod · 0.45

Tested by

no test coverage detected