Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/featureset/FilteredIterator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/featureset/FilteredIterator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/featureset/FilteredIterator.java	(revision 44207)
@@ -25,6 +25,7 @@
 
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+import org.apache.commons.lang3.BooleanUtils;
 
 import org.gvsig.fmap.dal.exception.DataEvaluatorException;
 import org.gvsig.fmap.dal.exception.DataException;
@@ -120,9 +121,16 @@
 	public boolean match(DefaultFeature feature) throws DataException {
 		try {
 			if (filter==null) {
-				return true;
+                            return true;
 			}
-			return ((Boolean) this.filter.evaluate(feature)).booleanValue();
+                        Object x = this.filter.evaluate(feature);
+                        if( x == null ) {
+                            return false;
+                        } else if( x instanceof Boolean ) {
+                            return ((Boolean) x);
+                        } else {
+                            return true;
+                        }
 		} catch (EvaluatorException e) {
 			throw new DataEvaluatorException(e);
 		}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java	(revision 44207)
@@ -1962,14 +1962,14 @@
                     throw new VisitCanceledException();
                 }
             }, query);
-            return null;
         } catch(VisitCanceledException ex) {
-            return feature.getValue();
+
         } catch(DataException ex) {
             throw ex;
         } catch(Exception ex) {
             throw new RuntimeException("", ex);
         }
+        return feature.getValue();
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/symboltables/ProjectSymbolTable.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/symboltables/ProjectSymbolTable.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/symboltables/ProjectSymbolTable.java	(revision 44207)
@@ -478,11 +478,11 @@
             Geometry geom = getGeom(args, 0);
             switch( args.length ) {
                 case 2:
-                    units = getUnits(args, 1);
+                    units = getUnitsArea(args, 1);
                     break;
                 case 3:
                     proj = getProjection(args, 1);
-                    units = getUnits(args, 2);
+                    units = getUnitsArea(args, 2);
                     break;
             }
             if (proj == null) {
@@ -519,11 +519,11 @@
             Geometry geom = getGeom(args, 0);
             switch( args.length ) {
                 case 2:
-                    units = getUnits(args, 1);
+                    units = getUnitsArea(args, 1);
                     break;
                 case 3:
                     proj = getProjection(args, 1);
-                    units = getUnits(args, 2);
+                    units = getUnitsArea(args, 2);
                     break;
             }
             if (proj == null) {
@@ -654,7 +654,7 @@
         return CRSFactory.getCRS(code);
     }
 
-    private int getUnits(Object[] args, int i) {
+    private int getUnitsArea(Object[] args, int i) {
         Object value = args[i];
         if (value == null) {
             throw new IllegalArgumentException("Illegal unit value 'null'");
@@ -678,4 +678,28 @@
         throw new IllegalArgumentException("Illegal unit name '" + name + "'");
     }
 
+    private int getUnitsDistance(Object[] args, int i) {
+        Object value = args[i];
+        if (value == null) {
+            throw new IllegalArgumentException("Illegal unit value 'null'");
+        }
+        if (value instanceof Number) {
+            return ((Number) value).intValue();
+        }
+        String name = value.toString();
+        String[] names = MapContext.getDistanceAbbr();
+        for (int j = 0; j < names.length; j++) {
+            if (name.equalsIgnoreCase(names[j])) {
+                return j;
+            }
+        }
+        names = MapContext.getDistanceNames();
+        for (int j = 0; j < names.length; j++) {
+            if (name.equalsIgnoreCase(names[j])) {
+                return j;
+            }
+        }
+        throw new IllegalArgumentException("Illegal unit name '" + name + "'");
+    }
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultCodeBuilder.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultCodeBuilder.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultCodeBuilder.java	(revision 44207)
@@ -19,32 +19,32 @@
 import org.gvsig.expressionevaluator.CodeBuilder;
 import org.gvsig.expressionevaluator.Codes;
 import org.gvsig.expressionevaluator.ExpressionBuilder;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_ADD;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_AND;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_CONCAT;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_DIV;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_EQ;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_GE;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_GT;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_ILIKE;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_IS;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_LE;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_LIKE;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_LT;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_MOD;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_MULT;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_NE;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_NEGATE;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_NOT;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_OR;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_REGEXP;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_SUBST;
 import org.gvsig.expressionevaluator.ExpressionBuilder.Value;
 import org.gvsig.expressionevaluator.ExpressionUtils;
 import org.gvsig.expressionevaluator.Formatter;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.SymbolTable;
-import org.gvsig.expressionevaluator.impl.function.operator.AddOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.AndOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.ConcatOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.DivOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.EqOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.GeOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.GtOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.IsOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.LeOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.LtOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.ModOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.MulOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.NeOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.NegOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.NotOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.OrOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.RegExpOperator;
-import org.gvsig.expressionevaluator.impl.function.operator.SubstOperator;
-import org.gvsig.expressionevaluator.impl.function.predicate.IlikeOperator;
-import org.gvsig.expressionevaluator.impl.function.predicate.LikeOperator;
 import org.gvsig.expressionevaluator.impl.function.programming.GetattrFunction;
 import org.gvsig.expressionevaluator.impl.function.programming.GetitemFunction;
 import org.gvsig.fmap.geom.Geometry;
@@ -417,7 +417,7 @@
             switch(this.type) {
                 case UNARY_OPERATOR:
                     return builder.function(
-                            NegOperator.NAME.equalsIgnoreCase(this.name())?
+                            OPERATOR_NEGATE.equalsIgnoreCase(this.name())?
                                 "-" :
                                 this.name(),
                             this.parameters().get(0).toValue(builder)
@@ -455,7 +455,7 @@
             StringBuilder builder = new StringBuilder();
             switch(this.type) {
                 case UNARY_OPERATOR:
-                    if( NegOperator.NAME.equalsIgnoreCase(this.name()) ) {
+                    if( OPERATOR_NEGATE.equalsIgnoreCase(this.name()) ) {
                         builder.append("-");
                     } else {
                         builder.append(this.name());
@@ -617,102 +617,102 @@
     
     @Override
     public Code not(Code op1) {
-        return operator(NotOperator.NAME, op1);
+        return operator(OPERATOR_NOT, op1);
     }
 
     @Override
     public Code negate(Code op1) {
-        return operator(NegOperator.NAME, op1);
+        return operator(OPERATOR_NEGATE, op1);
     }
 
     @Override
     public Code concat(Code op1, Code op2) {
-        return operator(ConcatOperator.NAME, op1, op2);
+        return operator(OPERATOR_CONCAT, op1, op2);
     }
 
     @Override
     public Code add(Code op1, Code op2) {
-        return operator(AddOperator.NAME, op1, op2);
+        return operator(OPERATOR_ADD, op1, op2);
     }
 
     @Override
     public Code subst(Code op1, Code op2) {
-        return operator(SubstOperator.NAME, op1, op2);
+        return operator(OPERATOR_SUBST, op1, op2);
     }
 
     @Override
     public Code mult(Code op1, Code op2) {
-        return operator(MulOperator.NAME, op1, op2);
+        return operator(OPERATOR_MULT, op1, op2);
     }
 
     @Override
     public Code div(Code op1, Code op2) {
-        return operator(DivOperator.NAME, op1, op2);
+        return operator(OPERATOR_DIV, op1, op2);
     }
 
     @Override
     public Code mod(Code op1, Code op2) {
-        return operator(ModOperator.NAME, op1, op2);
+        return operator(OPERATOR_MOD, op1, op2);
     }
 
     @Override
     public Code or(Code op1, Code op2) {
-        return operator(OrOperator.NAME, op1, op2);
+        return operator(OPERATOR_OR, op1, op2);
     }
 
     @Override
     public Code and(Code op1, Code op2) {
-        return operator(AndOperator.NAME, op1, op2);
+        return operator(OPERATOR_AND, op1, op2);
     }
 
     @Override
     public Code like(Code op1, Code op2) {
-        return operator(LikeOperator.NAME, op1, op2);
+        return operator(OPERATOR_LIKE, op1, op2);
     }
 
     @Override
     public Code ilike(Code op1, Code op2) {
-        return operator(IlikeOperator.NAME, op1, op2);
+        return operator(OPERATOR_ILIKE, op1, op2);
     }
 
     @Override
     public Code regexp(Code op1, Code op2) {
-        return operator(RegExpOperator.NAME, op1, op2);
+        return operator(OPERATOR_REGEXP, op1, op2);
     }
 
     @Override
     public Code lt(Code op1, Code op2) {
-        return operator(LtOperator.NAME, op1, op2);
+        return operator(OPERATOR_LT, op1, op2);
     }
 
     @Override
     public Code gt(Code op1, Code op2) {
-        return operator(GtOperator.NAME, op1, op2);
+        return operator(OPERATOR_GT, op1, op2);
     }
 
     @Override
     public Code le(Code op1, Code op2) {
-        return operator(LeOperator.NAME, op1, op2);
+        return operator(OPERATOR_LE, op1, op2);
     }
 
     @Override
     public Code ge(Code op1, Code op2) {
-        return operator(GeOperator.NAME, op1, op2);
+        return operator(OPERATOR_GE, op1, op2);
     }
 
     @Override
     public Code eq(Code op1, Code op2) {
-        return operator(EqOperator.NAME, op1, op2);
+        return operator(OPERATOR_EQ, op1, op2);
     }
 
     @Override
     public Code ne(Code op1, Code op2) {
-        return operator(NeOperator.NAME, op1, op2);
+        return operator(OPERATOR_NE, op1, op2);
     }
 
     @Override
     public Code is(Code op1, Code op2) {
-        return operator(IsOperator.NAME, op1, op2);
+        return operator(OPERATOR_IS, op1, op2);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/grammars/BasicGrammarFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/grammars/BasicGrammarFactory.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/grammars/BasicGrammarFactory.java	(revision 44207)
@@ -1,6 +1,7 @@
 package org.gvsig.expressionevaluator.impl.grammars;
 
 import static org.gvsig.expressionevaluator.ExpressionBuilder.FUNCTION_CAST;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_REGEXP;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorManager;
 import org.gvsig.expressionevaluator.Grammar;
@@ -15,7 +16,6 @@
 import org.gvsig.expressionevaluator.impl.function.programming.ReturnFunction;
 import org.gvsig.expressionevaluator.impl.function.programming.TryFunction;
 import org.gvsig.expressionevaluator.impl.function.programming.WhileFunction;
-import org.gvsig.expressionevaluator.impl.function.typeconversion.CastFunction;
 import org.gvsig.expressionevaluator.spi.AbstractGrammarFactory;
 
 /**
@@ -130,7 +130,7 @@
                 .addRuleOnFalse(stmt.require_expression("PATTERN"))
             );
             stmt.code(
-                    RegExpOperator.NAME,
+                    OPERATOR_REGEXP,
                     stmt.args_names("VALUE","PATTERN")
             );
             theGrammar.addStatement(stmt);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/SubstOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/SubstOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/SubstOperator.java	(revision 44207)
@@ -1,6 +1,7 @@
 package org.gvsig.expressionevaluator.impl.function.operator;
 
 import org.gvsig.expressionevaluator.Code;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_SUBST;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.Optimizer;
@@ -10,10 +11,9 @@
         extends AbstractBinaryOperator 
         implements FunctionOptimizer
     {
-    public static final String NAME = "-";
-
+    
     public SubstOperator() {
-        super(Function.GROUP_NUMERIC,NAME);
+        super(Function.GROUP_NUMERIC, OPERATOR_SUBST, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NotOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NotOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NotOperator.java	(revision 44207)
@@ -1,15 +1,14 @@
 package org.gvsig.expressionevaluator.impl.function.operator;
 
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_NOT;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 
 public class NotOperator extends AbstractUnaryOperator {
 
-    public static final String NAME = "NOT";
-
     public NotOperator() {
-        super(Function.GROUP_BOOLEAN,NAME);
+        super(Function.GROUP_BOOLEAN, OPERATOR_NOT, true);
         this.addAlias("!");        
     }
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/LeOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/LeOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/LeOperator.java	(revision 44207)
@@ -2,15 +2,14 @@
 
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.math.util.MathUtils;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_LE;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class LeOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "<=";
-
     public LeOperator() {
-        super(Function.GROUP_BOOLEAN,NAME);
+        super(Function.GROUP_BOOLEAN, OPERATOR_LE, true);
     }
     
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AndOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AndOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AndOperator.java	(revision 44207)
@@ -1,15 +1,13 @@
 package org.gvsig.expressionevaluator.impl.function.operator;
 
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_AND;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class AndOperator extends AbstractBinaryOperator {
     
-    public static final String NAME = "AND";
-
     public AndOperator() {
-        super(Function.GROUP_BOOLEAN, NAME);
-        this.addAlias("&&");        
+        super(Function.GROUP_BOOLEAN, OPERATOR_AND, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NeOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NeOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NeOperator.java	(revision 44207)
@@ -2,15 +2,14 @@
 
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.math.util.MathUtils;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_NE;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class NeOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "<>";
-
     public NeOperator() {
-        super(Function.GROUP_BOOLEAN,NAME);
+        super(Function.GROUP_BOOLEAN, OPERATOR_NE, true);
         this.addAlias("!=");
     }
     
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/EqOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/EqOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/EqOperator.java	(revision 44207)
@@ -2,15 +2,14 @@
 
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.math.util.MathUtils;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_EQ;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class EqOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "=";
-
     public EqOperator() {
-        super(Function.GROUP_BOOLEAN, NAME);
+        super(Function.GROUP_BOOLEAN, OPERATOR_EQ, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/ConcatOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/ConcatOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/ConcatOperator.java	(revision 44207)
@@ -5,6 +5,7 @@
 import org.gvsig.expressionevaluator.Code;
 import org.gvsig.expressionevaluator.Code.Caller;
 import org.gvsig.expressionevaluator.Code.Constant;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_CONCAT;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.Optimizer;
@@ -15,10 +16,8 @@
         implements FunctionOptimizer
     {
     
-    public static final String NAME = "||";
-
     public ConcatOperator() {
-        super(Function.GROUP_STRING, NAME);
+        super(Function.GROUP_STRING, OPERATOR_CONCAT, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AbstractBinaryOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AbstractBinaryOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AbstractBinaryOperator.java	(revision 44207)
@@ -8,12 +8,12 @@
 
 public abstract class AbstractBinaryOperator extends AbstractFunction implements BinaryOperator {
     
-    protected AbstractBinaryOperator(String group, String name, String description) {
-        super(group, name, Range.is(2), description, " {{oper1}} " + name + " oper2 ");
+    protected AbstractBinaryOperator(String group, String name, String description, boolean isSQLCompatible) {
+        super(group, name, Range.is(2), description, " {{oper1}} " + name + " oper2 ", null, null, isSQLCompatible);
     }    
 
-    protected AbstractBinaryOperator(String group, String name) {
-        super(group, name, Range.is(2), null, " {{oper1}} " + name + " oper2 ");
+    protected AbstractBinaryOperator(String group, String name, boolean isSQLCompatible) {
+        this(group, name, null, isSQLCompatible);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NegOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NegOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/NegOperator.java	(revision 44207)
@@ -1,15 +1,14 @@
 package org.gvsig.expressionevaluator.impl.function.operator;
 
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_NEGATE;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 
 public class NegOperator extends AbstractUnaryOperator {
 
-    public static final String NAME = "NEGATE";
-
     public NegOperator() {
-        super(Function.GROUP_NUMERIC,NAME);   
+        super(Function.GROUP_NUMERIC, OPERATOR_NEGATE, true);   
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/GtOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/GtOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/GtOperator.java	(revision 44207)
@@ -2,15 +2,14 @@
 
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.math.util.MathUtils;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_GT;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class GtOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = ">";
-
     public GtOperator() {
-        super(Function.GROUP_BOOLEAN,NAME);
+        super(Function.GROUP_BOOLEAN, OPERATOR_GT, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/IsOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/IsOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/IsOperator.java	(revision 44207)
@@ -2,15 +2,14 @@
 
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.math.util.MathUtils;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_IS;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class IsOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "IS";
-
     public IsOperator() {
-        super(Function.GROUP_BOOLEAN, NAME);
+        super(Function.GROUP_BOOLEAN, OPERATOR_IS, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/LtOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/LtOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/LtOperator.java	(revision 44207)
@@ -2,15 +2,14 @@
 
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.math.util.MathUtils;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_LT;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class LtOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "<";
-
     public LtOperator() {
-        super(Function.GROUP_BOOLEAN,NAME);
+        super(Function.GROUP_BOOLEAN, OPERATOR_LT, true);
     }
     
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/ModOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/ModOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/ModOperator.java	(revision 44207)
@@ -1,14 +1,13 @@
 package org.gvsig.expressionevaluator.impl.function.operator;
 
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_MOD;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class ModOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "%";
-
     public ModOperator() {
-        super(Function.GROUP_NUMERIC, NAME);
+        super(Function.GROUP_NUMERIC, OPERATOR_MOD, false);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/OrOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/OrOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/OrOperator.java	(revision 44207)
@@ -1,15 +1,13 @@
 package org.gvsig.expressionevaluator.impl.function.operator;
 
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_OR;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class OrOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "OR";
-
     public OrOperator() {
-        super(Function.GROUP_BOOLEAN,NAME);
-        // this.addAlias("||");        
+        super(Function.GROUP_BOOLEAN, OPERATOR_OR, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AbstractUnaryOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AbstractUnaryOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AbstractUnaryOperator.java	(revision 44207)
@@ -7,12 +7,12 @@
 
 public abstract class AbstractUnaryOperator extends AbstractFunction implements UnaryOperator {
     
-    protected AbstractUnaryOperator(String group, String name, String description) {
-        super(group, name, Range.is(1), description, name + " {{oper}} ");
+    protected AbstractUnaryOperator(String group, String name, String description, boolean sqlCompatible) {
+        super(group, name, Range.is(1), description, name + " {{oper}} ", null, null, sqlCompatible);
     }    
 
-    protected AbstractUnaryOperator(String group, String name) {
-        super(group, name, Range.is(1), null, name + " {{oper}} ");
+    protected AbstractUnaryOperator(String group, String name, boolean sqlCompatible) {
+        this(group, name, null, sqlCompatible);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/DivOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/DivOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/DivOperator.java	(revision 44207)
@@ -1,6 +1,7 @@
 package org.gvsig.expressionevaluator.impl.function.operator;
 
 import org.gvsig.expressionevaluator.Code;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_DIV;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.Optimizer;
@@ -9,10 +10,9 @@
         extends AbstractBinaryOperator 
         implements Optimizer.FunctionOptimizer
     {
-    public static final String NAME = "/";
 
     public DivOperator() {
-        super(Function.GROUP_NUMERIC, NAME);
+        super(Function.GROUP_NUMERIC, OPERATOR_DIV, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AddOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AddOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/AddOperator.java	(revision 44207)
@@ -4,6 +4,8 @@
 import org.gvsig.expressionevaluator.Code;
 import org.gvsig.expressionevaluator.Code.Caller;
 import org.gvsig.expressionevaluator.Code.Constant;
+import org.gvsig.expressionevaluator.ExpressionBuilder;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_ADD;
 import org.gvsig.expressionevaluator.ExpressionRuntimeException;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
@@ -16,10 +18,9 @@
         implements FunctionOptimizer
     {
 
-    public static final String NAME = "+";
 
     public AddOperator() {
-        super(Function.GROUP_NUMERIC, NAME);
+        super(Function.GROUP_NUMERIC, OPERATOR_ADD, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/RegExpOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/RegExpOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/RegExpOperator.java	(revision 44207)
@@ -3,15 +3,14 @@
 import java.util.Objects;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_REGEXP;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class RegExpOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "~";
-
     public RegExpOperator() {
-        super(Function.GROUP_BOOLEAN, NAME);     
+        super(Function.GROUP_BOOLEAN, OPERATOR_REGEXP, false);     
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/GeOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/GeOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/GeOperator.java	(revision 44207)
@@ -2,15 +2,14 @@
 
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.math.util.MathUtils;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_GE;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 
 public class GeOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = ">=";
-
     public GeOperator() {
-        super(Function.GROUP_BOOLEAN,NAME);
+        super(Function.GROUP_BOOLEAN, OPERATOR_GE, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/MulOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/MulOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/operator/MulOperator.java	(revision 44207)
@@ -1,6 +1,7 @@
 package org.gvsig.expressionevaluator.impl.function.operator;
 
 import org.gvsig.expressionevaluator.Code;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_MULT;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.Optimizer;
@@ -10,10 +11,8 @@
         implements Optimizer.FunctionOptimizer
     {
 
-    public static final String NAME = "*";
-
     public MulOperator() {
-        super(Function.GROUP_NUMERIC, NAME);
+        super(Function.GROUP_NUMERIC, OPERATOR_MULT, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/spatial/AndAndOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/spatial/AndAndOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/spatial/AndAndOperator.java	(revision 44207)
@@ -1,5 +1,6 @@
 package org.gvsig.expressionevaluator.impl.function.spatial;
 
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_AND2;
 import org.gvsig.expressionevaluator.impl.function.operator.*;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
@@ -8,10 +9,8 @@
 
 public class AndAndOperator extends AbstractBinaryOperator {
     
-    public static final String NAME = "&&";
-
     public AndAndOperator() {
-        super(Function.GROUP_OGC, NAME);
+        super(Function.GROUP_OGC, OPERATOR_AND2, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/predicate/LikeOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/predicate/LikeOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/predicate/LikeOperator.java	(revision 44207)
@@ -5,6 +5,7 @@
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_LIKE;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.impl.function.operator.AbstractBinaryOperator;
@@ -22,10 +23,8 @@
 	protected static Map<String,Pattern> patterns = new HashMap<>();
 
 
-    public static final String NAME = "LIKE";
-
     public LikeOperator() {
-        super(Function.GROUP_STRING, NAME);
+        super(Function.GROUP_STRING, OPERATOR_LIKE, true);
     }
 
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/predicate/IlikeOperator.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/predicate/IlikeOperator.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/predicate/IlikeOperator.java	(revision 44207)
@@ -1,15 +1,14 @@
 package org.gvsig.expressionevaluator.impl.function.predicate;
 
+import static org.gvsig.expressionevaluator.ExpressionBuilder.OPERATOR_ILIKE;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
 import org.gvsig.expressionevaluator.impl.function.operator.AbstractBinaryOperator;
 
 public class IlikeOperator extends AbstractBinaryOperator {
 
-    public static final String NAME = "ILIKE";
-
     public IlikeOperator() {
-        super(Function.GROUP_STRING, NAME);
+        super(Function.GROUP_STRING,  OPERATOR_ILIKE, true);
     }
     
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/numeric/DecrFunction.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/numeric/DecrFunction.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/numeric/DecrFunction.java	(revision 44207)
@@ -24,7 +24,7 @@
 
     @Override
     public boolean allowConstantFolding() {
-        return true;
+        return false;
     }
     
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/numeric/IncrFunction.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/numeric/IncrFunction.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/numeric/IncrFunction.java	(revision 44207)
@@ -26,7 +26,7 @@
 
     @Override
     public boolean allowConstantFolding() {
-        return true;
+        return false;
     }
     
     @Override
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/programming/RangeFunction.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/programming/RangeFunction.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/programming/RangeFunction.java	(revision 44207)
@@ -2,6 +2,7 @@
 
 import java.util.Iterator;
 import org.apache.commons.lang3.Range;
+import static org.gvsig.expressionevaluator.ExpressionBuilder.FUNCTION_RANGE;
 import org.gvsig.expressionevaluator.ExpressionRuntimeException;
 import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.Interpreter;
@@ -9,18 +10,16 @@
 
 public class RangeFunction extends AbstractFunction {
 
-    public static final String NAME = "RANGE";
-    
     public RangeFunction() {
         super(
             Function.GROUP_PROGRAMMING, 
-            NAME, 
+            FUNCTION_RANGE, 
             Range.between(1,3),
             "",
-            NAME+"({{start}}, stop, step)",
+            FUNCTION_RANGE+"({{start}}, stop, step)",
             null,
             "Iterable",
-            true
+            false
         );
     }
     
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultInterpreter.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultInterpreter.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultInterpreter.java	(revision 44207)
@@ -218,9 +218,9 @@
                     }
                     caller.function(function);
                 }
-                if( !function.isSQLCompatible() && this.sqlCompatible ) {
-                    throw new ExpressionRuntimeException(code, I18N.Cant_use_non_SQL_compatible_functions(function.name()));
-                }
+//                if( !function.isSQLCompatible() && this.sqlCompatible ) {
+//                    throw new ExpressionRuntimeException(code, I18N.Cant_use_non_SQL_compatible_functions(function.name()));
+//                }
                 Codes args = caller.parameters();
                 try {
                     switch( caller.type() ) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/ExpressionBuilder.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/ExpressionBuilder.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/ExpressionBuilder.java	(revision 44207)
@@ -11,22 +11,26 @@
 public interface ExpressionBuilder {
 
     public static final String OPERATOR_NOT = "NOT";
+    public static final String OPERATOR_NEGATE = "NEGATE";
     public static final String OPERATOR_IS = "IS";
     public static final String OPERATOR_AND = "AND";
     public static final String OPERATOR_OR = "OR";
-    public static final String OPERATOR_EQ = "EQ";
-    public static final String OPERATOR_NE = "NE";
-    public static final String OPERATOR_GT = "GT";
-    public static final String OPERATOR_GE = "GE";
-    public static final String OPERATOR_LT = "LT";
-    public static final String OPERATOR_LE = "LE";
+    public static final String OPERATOR_EQ = "=";
+    public static final String OPERATOR_NE = "<>";
+    public static final String OPERATOR_GT = ">";
+    public static final String OPERATOR_GE = ">=";
+    public static final String OPERATOR_LT = "<";
+    public static final String OPERATOR_LE = "<=";
     public static final String OPERATOR_LIKE = "LIKE";
     public static final String OPERATOR_ILIKE = "ILIKE";
-    public static final String OPERATOR_ADD = "ADD";
-    public static final String OPERATOR_SUBST = "SUBST";
-    public static final String OPERATOR_MULT = "MULT";
-    public static final String OPERATOR_DIV = "DIV";
-    public static final String OPERATOR_CONCAT = "CONCAT";
+    public static final String OPERATOR_ADD = "+";
+    public static final String OPERATOR_SUBST = "-";
+    public static final String OPERATOR_MULT = "*";
+    public static final String OPERATOR_DIV = "/";
+    public static final String OPERATOR_MOD = "%";
+    public static final String OPERATOR_CONCAT = "||";
+    public static final String OPERATOR_REGEXP = "~";
+    public static final String OPERATOR_AND2 = "&&";
     
     public static final String FUNCTION_ST_SRID = "ST_SRID";
     public static final String FUNCTION_ST_ASTEXT = "ST_AsText";
@@ -114,6 +118,8 @@
     public static final String FUNCTION_INCR = "INCR";
     public static final String FUNCTION_DECR = "DECR";
     
+    public static final String FUNCTION_RANGE = "RANGE";
+    
     public enum GeometrySupportType {
         WKT,
         WKB,
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/AbstractAutomaticExpressionChecker.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/AbstractAutomaticExpressionChecker.java	(revision 44206)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/AbstractAutomaticExpressionChecker.java	(revision 44207)
@@ -17,20 +17,29 @@
 import javax.swing.event.DocumentListener;
 import javax.swing.text.JTextComponent;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.mutable.Mutable;
+import org.apache.commons.lang3.mutable.MutableObject;
+import org.gvsig.expressionevaluator.Code;
+import org.gvsig.expressionevaluator.Code.Caller;
+import org.gvsig.expressionevaluator.Code.Identifier;
 import org.gvsig.expressionevaluator.Expression;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator;
 import org.gvsig.expressionevaluator.ExpressionEvaluatorManager;
 import org.gvsig.expressionevaluator.ExpressionRuntimeException;
 import org.gvsig.expressionevaluator.ExpressionSyntaxException;
+import org.gvsig.expressionevaluator.Function;
 import org.gvsig.expressionevaluator.MutableSymbolTable;
 import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
 import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.exception.BaseException;
 import org.gvsig.tools.i18n.I18nManager;
 import org.gvsig.tools.swing.api.ToolsSwingLocator;
 import org.gvsig.tools.swing.api.ToolsSwingManager;
 import org.gvsig.tools.swing.api.windowmanager.Dialog;
 import org.gvsig.tools.swing.api.windowmanager.WindowManager;
 import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2;
+import org.gvsig.tools.visitor.VisitCanceledException;
+import org.gvsig.tools.visitor.Visitor;
 
 /**
  *
@@ -173,7 +182,8 @@
             this.setMessage(JOptionPane.ERROR_MESSAGE, "Syntax error in expression");
             return;
         }
-        expression.setSQLCompatible(this.config.isSQLCompatible());
+        final Mutable<String> theTip = new MutableObject<>(null);
+        expression.setSQLCompatible(false);
         if (this.config.getPreviewSymbolTable() == null) {
             try {
                 ExpressionEvaluatorManager theManager = ExpressionEvaluatorLocator.getManager();
@@ -188,12 +198,44 @@
                 Object theValue = expression.execute(this.config.getPreviewSymbolTable());
                 this.setPreview(theValue);
             } catch (ExpressionRuntimeException ex) {
-                this.setTip(ex.getTip());
+                theTip.setValue(ex.getTip());
                 this.setMessage(JOptionPane.ERROR_MESSAGE, "Runtime error. " + ex.getMessage());
             } catch (Exception ex) {
                 this.setMessage(JOptionPane.ERROR_MESSAGE, "Runtime error. " + ex.getMessage());
             }
         }
+        if( this.config.isSQLCompatible() ) {
+            Code code = expression.getCode();
+            try {
+                code.accept(new Visitor() {
+                    @Override
+                    public void visit(Object obj) throws VisitCanceledException, BaseException {
+                        Code code = (Code) obj;
+                        switch(code.code()) {
+                            case Code.CALLER:
+                                Function function = ((Caller)code).function();
+                                if( function!=null && !function.isSQLCompatible() ) {
+                                    theTip.setValue(I18N.Avoid_the_use_of_functions_not_compatible_with_SQL_in_this_data_source(function.name()));
+                                }
+                                break;
+                            case Code.IDENTIFIER:
+                                if( config.getPreviewSymbolTable()!=null && 
+                                        !config.getPreviewSymbolTable().isSQLCompatible(((Identifier)code).name()) ) {
+                                    theTip.setValue(I18N.Avoid_the_use_of_functions_not_compatible_with_SQL_in_this_data_source(((Identifier)code).name()));
+                                }
+                                break;
+                            case Code.METHOD:
+                                theTip.setValue(I18N.Avoid_the_use_of_functions_not_compatible_with_SQL_in_this_data_source(((Caller)code).name()));
+                                break;
+                        }
+                    }
+                });
+            } catch (BaseException ex) {
+            }
+        }
+        if( !StringUtils.isBlank(theTip.getValue()) ) {
+            this.setTip(theTip.getValue());
+        }
     }
 
     protected boolean isTipEnabled() {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/I18N.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/I18N.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/I18N.java	(revision 44207)
@@ -0,0 +1,15 @@
+package org.gvsig.expressionevaluator.swing.impl;
+
+import org.apache.commons.lang3.Range;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class I18N {
+
+    static String Avoid_the_use_of_functions_not_compatible_with_SQL_in_this_data_source(String name) {
+        return String.format("Avoid the use of functions not compatible with SQL in this data source (%s).", name);
+    }
+
+}
