Author: doogie
Date: Mon Aug 2 17:43:13 2010 New Revision: 981629 URL: http://svn.apache.org/viewvc?rev=981629&view=rev Log: FEATURE: Add basic implementations of the available visitors. Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Condition.java ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLStatement.java ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Value.java Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Condition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Condition.java?rev=981629&r1=981628&r2=981629&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Condition.java (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Condition.java Mon Aug 2 17:43:13 2010 @@ -26,5 +26,19 @@ public abstract class Condition extends void visit(ListCondition condition); } + public static class BaseVisitor implements Visitor { + public void visit(BetweenCondition condition) { + } + + public void visit(BooleanCondition condition) { + } + + public void visit(ConditionList condition) { + } + + public void visit(ListCondition condition) { + } + } + public abstract void accept(Visitor visitor); } Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLStatement.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLStatement.java?rev=981629&r1=981628&r2=981629&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLStatement.java (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SQLStatement.java Mon Aug 2 17:43:13 2010 @@ -27,5 +27,22 @@ public abstract class SQLStatement<S ext void visit(SQLView statement); } + public static class BaseVisitor implements Visitor { + public void visit(SQLDelete statement) { + } + + public void visit(SQLInsert statement) { + } + + public void visit(SQLSelect statement) { + } + + public void visit(SQLUpdate statement) { + } + + public void visit(SQLView statement) { + } + } + public abstract void accept(Visitor visitor); } Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Value.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Value.java?rev=981629&r1=981628&r2=981629&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Value.java (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Value.java Mon Aug 2 17:43:13 2010 @@ -45,5 +45,34 @@ public abstract class Value extends Atom void visit(CountAllFunction value); } + public static class BaseVisitor implements Visitor { + public void visit(FieldValue value) { + } + + public void visit(FunctionCall value) { + } + + public void visit(MathValue value) { + } + + public void visit(Null value) { + } + + public void visit(NumberValue value) { + } + + public void visit(ParameterValue value) { + } + + public void visit(StringValue value) { + } + + public void visit(CountFunction value) { + } + + public void visit(CountAllFunction value) { + } + } + public abstract void accept(Visitor visitor); } |
Free forum by Nabble | Edit this page |