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
| 38 | * @author Philipp Giese |
| 39 | */ |
| 40 | public 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected