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

Method get

src/src/com/orm/androrm/QuerySet.java:68–84  ·  view source on GitHub ↗
(int id)

Source from the content-addressed store, hash-verified

66 }
67
68 public T get(int id) {
69 Where where = new Where();
70 where.setStatement(new Statement(Model.PK, id));
71
72 if(mQuery == null) {
73 mQuery = new SelectStatement();
74 mQuery.from(DatabaseBuilder.getTableName(mClass));
75 }
76
77 mQuery.where(where);
78
79 Cursor c = getCursor(mQuery);
80 T object = createObject(c);
81 closeConnection(c);
82
83 return object;
84 }
85
86 public QuerySet<T> orderBy(String... columns) {
87 if(mQuery != null) {

Callers

nothing calls this directly

Calls 7

setStatementMethod · 0.95
getTableNameMethod · 0.95
getCursorMethod · 0.95
createObjectMethod · 0.95
closeConnectionMethod · 0.95
fromMethod · 0.45
whereMethod · 0.45

Tested by

no test coverage detected