com.reinaldoarrosi.android.querybuilder.sqlite.criteria.OrCriteria Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of query-builder Show documentation
Show all versions of query-builder Show documentation
Fluent Android library to build SQLite select statements
The newest version!
package com.reinaldoarrosi.android.querybuilder.sqlite.criteria;
import java.util.ArrayList;
import java.util.List;
public class OrCriteria extends Criteria {
private Criteria left;
private Criteria right;
public OrCriteria(Criteria left, Criteria right) {
this.left = left;
this.right = right;
}
@Override
public String build() {
String ret = " OR ";
if(left != null)
ret = left.build() + ret;
if(right != null)
ret = ret + right.build();
return "(" + ret.trim() + ")";
}
@Override
public List