Added Ops.like().

This commit is contained in:
Michael Bayne
2009-09-10 02:38:58 +00:00
parent 89a15571ed
commit a6c113e490
+13
View File
@@ -25,6 +25,7 @@ import java.util.Collection;
import com.samskivert.depot.expression.FluentExp;
import com.samskivert.depot.expression.SQLExpression;
import com.samskivert.depot.operator.And;
import com.samskivert.depot.operator.Like;
import com.samskivert.depot.operator.Not;
import com.samskivert.depot.operator.Or;
@@ -73,4 +74,16 @@ public class Ops
{
return new Or(conditions);
}
/** Returns an expression that matches when the source is like the supplied value. */
public static FluentExp like (SQLExpression source, Comparable<?> value)
{
return new Like(source, value);
}
/** Returns an expression that matches when the source is like the supplied expression. */
public static FluentExp like (SQLExpression source, SQLExpression expr)
{
return new Like(source, expr);
}
}