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

Method assignFieldValue

src/src/com/orm/androrm/Model.java:109–124  ·  view source on GitHub ↗

Assigns a value gathered from the database to the instance object of type T. Due to the nature of this ORM only fields applicable for serialization will be considered. @param Type of the object. @param field Field of the object, that a value shall be assigned to. @param object Objec

(
			
			Field 	field, 
			T 		object,
			Cursor 	c
			
	)

Source from the content-addressed store, hash-verified

107 * @throws IllegalAccessException
108 */
109 private static final <T extends Model> void assignFieldValue(
110
111 Field field,
112 T object,
113 Cursor c
114
115 ) throws IllegalArgumentException, IllegalAccessException {
116
117 Object o = field.get(object);
118
119 if(o instanceof DataField) {
120 DataField<?> f = (DataField<?>) o;
121
122 f.set(c, field.getName());
123 }
124 }
125
126 protected static final <T extends Model> T createObject(
127

Callers 1

fillUpDataMethod · 0.95

Calls 3

getMethod · 0.65
setMethod · 0.65
getNameMethod · 0.45

Tested by

no test coverage detected