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:
@@ -28,7 +28,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
|
|||||||
/**
|
/**
|
||||||
* Builds actual SQL given a main persistent type and some {@link QueryClause} objects.
|
* 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)
|
public DeleteClause (Class<? extends PersistentRecord> pClass, WhereClause where)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
|
|||||||
*
|
*
|
||||||
* @see FieldOverride
|
* @see FieldOverride
|
||||||
*/
|
*/
|
||||||
public class FieldDefinition extends QueryClause
|
public class FieldDefinition implements QueryClause
|
||||||
{
|
{
|
||||||
public FieldDefinition (String field, String str)
|
public FieldDefinition (String field, String str)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
|
|||||||
/**
|
/**
|
||||||
* Represents a FOR UPDATE clause.
|
* Represents a FOR UPDATE clause.
|
||||||
*/
|
*/
|
||||||
public class ForUpdate extends QueryClause
|
public class ForUpdate implements QueryClause
|
||||||
{
|
{
|
||||||
// from SQLExpression
|
// from SQLExpression
|
||||||
public void accept (ExpressionVisitor builder)
|
public void accept (ExpressionVisitor builder)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
|
|||||||
/**
|
/**
|
||||||
* Completely overrides the FROM clause, if it exists.
|
* Completely overrides the FROM clause, if it exists.
|
||||||
*/
|
*/
|
||||||
public class FromOverride extends QueryClause
|
public class FromOverride implements QueryClause
|
||||||
{
|
{
|
||||||
public FromOverride (Class<? extends PersistentRecord> fromClass)
|
public FromOverride (Class<? extends PersistentRecord> fromClass)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
|
|||||||
/**
|
/**
|
||||||
* Represents a GROUP BY clause.
|
* Represents a GROUP BY clause.
|
||||||
*/
|
*/
|
||||||
public class GroupBy extends QueryClause
|
public class GroupBy implements QueryClause
|
||||||
{
|
{
|
||||||
public GroupBy (SQLExpression... values)
|
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.
|
* 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 (
|
public InsertClause (
|
||||||
Class<? extends PersistentRecord> pClass, Object pojo, Set<String> identityFields)
|
Class<? extends PersistentRecord> pClass, Object pojo, Set<String> identityFields)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import com.samskivert.depot.operator.Conditionals.Equals;
|
|||||||
/**
|
/**
|
||||||
* Represents a JOIN.
|
* Represents a JOIN.
|
||||||
*/
|
*/
|
||||||
public class Join extends QueryClause
|
public class Join implements QueryClause
|
||||||
{
|
{
|
||||||
/** Indicates the join type to be used. The default is INNER. */
|
/** Indicates the join type to be used. The default is INNER. */
|
||||||
public static enum Type { INNER, LEFT_OUTER, RIGHT_OUTER };
|
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.
|
* Represents a LIMIT/OFFSET clause, for pagination.
|
||||||
*/
|
*/
|
||||||
public class Limit extends QueryClause
|
public class Limit implements QueryClause
|
||||||
{
|
{
|
||||||
public Limit (int offset, int count)
|
public Limit (int offset, int count)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import com.samskivert.depot.impl.ExpressionVisitor;
|
|||||||
/**
|
/**
|
||||||
* Represents an ORDER BY clause.
|
* Represents an ORDER BY clause.
|
||||||
*/
|
*/
|
||||||
public class OrderBy extends QueryClause
|
public class OrderBy implements QueryClause
|
||||||
{
|
{
|
||||||
/** Indicates the order of the clause. */
|
/** Indicates the order of the clause. */
|
||||||
public enum Order { ASC, DESC };
|
public enum Order { ASC, DESC };
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ import com.samskivert.depot.expression.SQLExpression;
|
|||||||
/**
|
/**
|
||||||
* Represents a piece or modifier of an SQL query.
|
* 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.
|
* 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
|
* 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.
|
* 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,
|
public UpdateClause (Class<? extends PersistentRecord> pClass, WhereClause where,
|
||||||
String[] fields, T pojo)
|
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.
|
* 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.
|
* Returns the condition associated with this where clause.
|
||||||
|
|||||||
Reference in New Issue
Block a user