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

Class InStatement

src/src/com/orm/androrm/statement/InStatement.java:40–58  ·  view source on GitHub ↗

This class can be used to create an IN statement for database queries. Example: SELECT FROM table WHERE id IN (1,3,5) @author Philipp Giese

Source from the content-addressed store, hash-verified

38 * @author Philipp Giese
39 */
40public class InStatement extends Statement {
41
42 private List<Object> mValues;
43
44 public InStatement(String key, List<Object> values) {
45 mKey = key;
46 mValues = values;
47 }
48
49 private String getList() {
50 return StringUtils.join(mValues, "','");
51 }
52
53 @Override
54 public String toString() {
55 return mKey + " IN ('" + getList() + "')";
56 }
57
58}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected