SQLOperator gets the axe.

This commit is contained in:
Michael Bayne
2009-09-10 03:44:00 +00:00
parent 02cccbc0ea
commit 8a57bd2461
8 changed files with 12 additions and 43 deletions
@@ -16,7 +16,6 @@ import com.samskivert.depot.impl.expression.ArgumentExp;
* A base class for all operators.
*/
public abstract class BaseOperator extends ArgumentExp
implements SQLOperator
{
public static Function<Object, Long> INTEGRAL = new Function<Object, Long>() {
public Long apply (Object o) {
@@ -24,13 +24,14 @@ import java.util.Collection;
import com.samskivert.depot.PersistentRecord;
import com.samskivert.depot.clause.SelectClause;
import com.samskivert.depot.expression.SQLExpression;
import com.samskivert.depot.impl.ExpressionVisitor;
/**
* The SQL 'exists' operator.
*/
public class Exists
implements SQLOperator
implements SQLExpression
{
public Exists (SelectClause clause)
{
@@ -24,13 +24,14 @@ import java.util.Collection;
import com.samskivert.depot.PersistentRecord;
import com.samskivert.depot.expression.ColumnExp;
import com.samskivert.depot.expression.SQLExpression;
import com.samskivert.depot.impl.ExpressionVisitor;
/**
* The SQL 'in (...)' operator.
*/
public class In
implements SQLOperator
implements SQLExpression
{
/** The maximum number of keys allowed in an IN() clause. */
public static final int MAX_KEYS = Short.MAX_VALUE;
@@ -24,13 +24,14 @@ import java.util.Collection;
import com.samskivert.depot.PersistentRecord;
import com.samskivert.depot.expression.ColumnExp;
import com.samskivert.depot.expression.SQLExpression;
import com.samskivert.depot.impl.ExpressionVisitor;
/**
* The SQL 'is null' operator.
*/
public class IsNull
implements SQLOperator
implements SQLExpression
{
public IsNull (ColumnExp column)
{
@@ -30,7 +30,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
* Represents the truth negation of another conditon.
*/
public class Not
implements SQLOperator
implements SQLExpression
{
public Not (SQLExpression condition)
{
@@ -1,33 +0,0 @@
//
// $Id$
//
// Depot library - a Java relational persistence library
// Copyright (C) 2006-2008 Michael Bayne and Pär Winzell
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.samskivert.depot.impl.operator;
import com.samskivert.depot.expression.SQLExpression;
/**
* A common interface for operator hierarchies in SQL. The main purpose of breaking this out from
* SQLExpression is to capture the recursive nature of e.g. the logical operators, which work on
* other SQLOperators but not general SQLExpressions.
*/
public interface SQLOperator extends SQLExpression
{
}
@@ -28,13 +28,13 @@ import com.google.common.collect.Lists;
import com.samskivert.depot.PersistentRecord;
import com.samskivert.depot.expression.SQLExpression;
import com.samskivert.depot.impl.ExpressionVisitor;
import com.samskivert.depot.impl.operator.SQLOperator;
import com.samskivert.util.Tuple;
/**
* The SQL 'case' operator.
*/
public class Case implements SQLOperator
public class Case
implements SQLExpression
{
public Case (SQLExpression... exps)
{
@@ -24,8 +24,8 @@ import java.util.Collection;
import com.samskivert.depot.PersistentRecord;
import com.samskivert.depot.expression.FluentExp;
import com.samskivert.depot.expression.SQLExpression;
import com.samskivert.depot.impl.ExpressionVisitor;
import com.samskivert.depot.impl.operator.SQLOperator;
/**
* An attempt at a dialect-agnostic full-text search condition, such as MySQL's MATCH() and
@@ -34,7 +34,7 @@ import com.samskivert.depot.impl.operator.SQLOperator;
public class FullText
{
public class Rank extends FluentExp
implements SQLOperator
implements SQLExpression
{
// from SQLExpression
public Object accept (ExpressionVisitor<?> builder)
@@ -60,7 +60,7 @@ public class FullText
}
public class Match extends FluentExp
implements SQLOperator
implements SQLExpression
{
// from SQLExpression
public Object accept (ExpressionVisitor<?> builder)