svn-gvsig-desktop / 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 / Expression.java @ 47301
History | View | Annotate | Download (1.59 KB)
1 |
package org.gvsig.expressionevaluator; |
---|---|
2 |
|
3 |
import org.gvsig.json.SupportJson; |
4 |
import org.gvsig.tools.annotation.NotThreadSafe; |
5 |
import org.gvsig.tools.evaluator.Evaluator; |
6 |
import org.gvsig.tools.persistence.Persistent; |
7 |
|
8 |
/**
|
9 |
*
|
10 |
* @author jjdelcerro
|
11 |
*/
|
12 |
@NotThreadSafe
|
13 |
public interface Expression extends Persistent, Cloneable, SupportJson { |
14 |
|
15 |
public static Expression cloneQuietly(Expression expression) { |
16 |
if( expression == null ) { |
17 |
return null; |
18 |
} |
19 |
try {
|
20 |
return expression.clone();
|
21 |
} catch (CloneNotSupportedException ex) { |
22 |
return null; // Esto nunca pasa. |
23 |
} |
24 |
} |
25 |
|
26 |
public void clear(); |
27 |
|
28 |
/**
|
29 |
* This symbol table don't persist with the expression.
|
30 |
*
|
31 |
* @return the symbol table of the expression
|
32 |
*/
|
33 |
public SymbolTable getSymbolTable();
|
34 |
|
35 |
public String getPhrase(); |
36 |
|
37 |
public Expression setPhrase(String phrase); |
38 |
|
39 |
public Object execute(SymbolTable symbolTable); |
40 |
|
41 |
public void link(SymbolTable symbolTable); |
42 |
|
43 |
public Code getCode();
|
44 |
|
45 |
@Deprecated
|
46 |
public String toJSON(); |
47 |
|
48 |
@Deprecated
|
49 |
public void fromJSON(String json); |
50 |
|
51 |
public Expression clone() throws CloneNotSupportedException; |
52 |
|
53 |
public boolean isPhraseEmpty(); |
54 |
|
55 |
public boolean isEmpty(); |
56 |
|
57 |
public void setSQLCompatible(boolean sqlCompatible); |
58 |
|
59 |
public boolean isSQLCompatible(); |
60 |
|
61 |
public void setUseBracketsForIdentifiers(boolean useBracketsForIdentifiers); |
62 |
|
63 |
public boolean getUseBracketsForIdentifiers(); |
64 |
|
65 |
public Evaluator toEvaluator();
|
66 |
} |