Added in().

This commit is contained in:
Michael Bayne
2009-06-10 17:42:52 +00:00
parent c8417a366e
commit d1e8ed43e2
@@ -23,6 +23,7 @@ package com.samskivert.depot.expression;
import java.util.Collection; import java.util.Collection;
import com.samskivert.depot.PersistentRecord; import com.samskivert.depot.PersistentRecord;
import com.samskivert.depot.operator.In;
import com.samskivert.depot.operator.IsNull; import com.samskivert.depot.operator.IsNull;
import com.samskivert.depot.impl.ExpressionVisitor; import com.samskivert.depot.impl.ExpressionVisitor;
@@ -51,12 +52,24 @@ public class ColumnExp extends FluentExpression
return new ColumnExp(oClass, name); return new ColumnExp(oClass, name);
} }
/** Returns an {@link IsNull} with this expression as its target. */ /** Returns an {@link IsNull} with this column as its target. */
public IsNull isNull () public IsNull isNull ()
{ {
return new IsNull(this); return new IsNull(this);
} }
/** Returns an {@link In} with this column and the supplied values. */
public In in (Comparable<?>... values)
{
return new In(this, values);
}
/** Returns an {@link In} with this column and the supplied values. */
public In in (Collection<? extends Comparable<?>> values)
{
return new In(this, values);
}
// from SQLExpression // from SQLExpression
public Object accept (ExpressionVisitor<?> builder) public Object accept (ExpressionVisitor<?> builder)
{ {