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

Method addModel

src/src/com/orm/androrm/ModelCache.java:37–47  ·  view source on GitHub ↗
(Class<T> clazz)

Source from the content-addressed store, hash-verified

35 }
36
37 public static <T extends Model> void addModel(Class<T> clazz) {
38 String modelName = DatabaseBuilder.getTableName(clazz);
39
40 if(knowsModel(modelName)) {
41 return;
42 }
43
44 KNOWN_MODELS.add(modelName);
45 KNOWN_MODEL_FIELDS.put(modelName, new ArrayList<String>());
46 KNOWN_MODEL_FIELDS.put(modelName, new ArrayList<String>());
47 }
48
49 public static <T extends Model> List<TableDefinition> getTableDefinitions(Class<T> clazz) {
50 if(knowsModel(clazz)) {

Callers 2

testAddModelMethod · 0.95
getFieldDefinitionsMethod · 0.95

Calls 3

getTableNameMethod · 0.95
knowsModelMethod · 0.95
addMethod · 0.65

Tested by 1

testAddModelMethod · 0.76