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

Method contains

src/src/com/orm/androrm/QuerySet.java:228–241  ·  view source on GitHub ↗

Checks if the result of this query contains the given object. Note, that this operation will execute the query on the database. Use only, if you have to. @param value @return

(T value)

Source from the content-addressed store, hash-verified

226 * @return
227 */
228 public boolean contains(T value) {
229 if(mQuery != null) {
230 Where where = new Where();
231 where.setStatement(new Statement(Model.PK, value.getId()));
232
233 SelectStatement query = new SelectStatement();
234 query.from(mQuery)
235 .where(where);
236
237 return getCount(query) != 0;
238 }
239
240 return false;
241 }
242
243 /**
244 * See {@link QuerySet#contains}

Callers

nothing calls this directly

Calls 5

setStatementMethod · 0.95
fromMethod · 0.95
getCountMethod · 0.95
getIdMethod · 0.80
whereMethod · 0.45

Tested by

no test coverage detected