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)
| 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} |
nothing calls this directly
no test coverage detected