Unconcretification of QueryClause. I concreted it a while back when it did

something and then those needs went away and now it's just a marker that
differentiates arbitrary SQLExpression instances from those that represent
clauses of a query.
This commit is contained in:
Michael Bayne
2008-11-25 20:53:33 +00:00
parent 8fec576663
commit 8ab95ec10e
13 changed files with 13 additions and 13 deletions
@@ -28,7 +28,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Builds actual SQL given a main persistent type and some {@link QueryClause} objects.
*/
public class DeleteClause<T extends PersistentRecord> extends QueryClause
public class DeleteClause<T extends PersistentRecord> implements QueryClause
{
public DeleteClause (Class<? extends PersistentRecord> pClass, WhereClause where)
{
@@ -37,7 +37,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
*
* @see FieldOverride
*/
public class FieldDefinition extends QueryClause
public class FieldDefinition implements QueryClause
{
public FieldDefinition (String field, String str)
{
@@ -28,7 +28,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Represents a FOR UPDATE clause.
*/
public class ForUpdate extends QueryClause
public class ForUpdate implements QueryClause
{
// from SQLExpression
public void accept (ExpressionVisitor builder)
@@ -32,7 +32,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Completely overrides the FROM clause, if it exists.
*/
public class FromOverride extends QueryClause
public class FromOverride implements QueryClause
{
public FromOverride (Class<? extends PersistentRecord> fromClass)
{
@@ -29,7 +29,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Represents a GROUP BY clause.
*/
public class GroupBy extends QueryClause
public class GroupBy implements QueryClause
{
public GroupBy (SQLExpression... values)
{
@@ -29,7 +29,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Builds actual SQL given a main persistent type and some {@link QueryClause} objects.
*/
public class InsertClause<T extends PersistentRecord> extends QueryClause
public class InsertClause<T extends PersistentRecord> implements QueryClause
{
public InsertClause (
Class<? extends PersistentRecord> pClass, Object pojo, Set<String> identityFields)
@@ -32,7 +32,7 @@ import com.samskivert.depot.operator.Conditionals.Equals;
/**
* Represents a JOIN.
*/
public class Join extends QueryClause
public class Join implements QueryClause
{
/** Indicates the join type to be used. The default is INNER. */
public static enum Type { INNER, LEFT_OUTER, RIGHT_OUTER };
@@ -28,7 +28,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Represents a LIMIT/OFFSET clause, for pagination.
*/
public class Limit extends QueryClause
public class Limit implements QueryClause
{
public Limit (int offset, int count)
{
@@ -30,7 +30,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Represents an ORDER BY clause.
*/
public class OrderBy extends QueryClause
public class OrderBy implements QueryClause
{
/** Indicates the order of the clause. */
public enum Order { ASC, DESC };
@@ -25,6 +25,6 @@ import com.samskivert.depot.expression.SQLExpression;
/**
* Represents a piece or modifier of an SQL query.
*/
public abstract class QueryClause implements SQLExpression
public interface QueryClause extends SQLExpression
{
}
@@ -34,7 +34,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Builds actual SQL given a main persistent type and some {@link QueryClause} objects.
*/
public class SelectClause<T extends PersistentRecord> extends QueryClause
public class SelectClause<T extends PersistentRecord> implements QueryClause
{
/**
* Creates a new Query object to generate one or more instances of the specified persistent
@@ -29,7 +29,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
/**
* Builds actual SQL given a main persistent type and some {@link QueryClause} objects.
*/
public class UpdateClause<T extends PersistentRecord> extends QueryClause
public class UpdateClause<T extends PersistentRecord> implements QueryClause
{
public UpdateClause (Class<? extends PersistentRecord> pClass, WhereClause where,
String[] fields, T pojo)
@@ -25,7 +25,7 @@ import com.samskivert.depot.expression.SQLExpression;
/**
* Currently only exists as a type without any functionality of its own.
*/
public abstract class WhereClause extends QueryClause
public abstract class WhereClause implements QueryClause
{
/**
* Returns the condition associated with this where clause.