svn-gvsig-desktop / tags / v1_1_Build_1008 / libraries / libGDBMS / src / main / java / com / hardcode / gdbms / engine / instruction / LValueAdapter.java @ 12520
History | View | Annotate | Download (971 Bytes)
1 | 3199 | fjp | /*
|
---|---|---|---|
2 | * Created on 12-oct-2004
|
||
3 | */
|
||
4 | package com.hardcode.gdbms.engine.instruction; |
||
5 | |||
6 | import com.hardcode.gdbms.engine.values.Value; |
||
7 | |||
8 | |||
9 | /**
|
||
10 | * Adaptador
|
||
11 | *
|
||
12 | * @author Fernando Gonz?lez Cort?s
|
||
13 | */
|
||
14 | public class LValueAdapter extends AbstractExpression { |
||
15 | /**
|
||
16 | * @see com.hardcode.gdbms.engine.instruction.Expression#getFieldName()
|
||
17 | */
|
||
18 | public String getFieldName() { |
||
19 | return ((Expression) getChilds()[0]).getFieldName(); |
||
20 | } |
||
21 | |||
22 | /**
|
||
23 | * @see com.hardcode.gdbms.engine.instruction.Expression#simplify()
|
||
24 | */
|
||
25 | public void simplify() { |
||
26 | getParent().replaceChild(this, getChilds()[0]); |
||
27 | } |
||
28 | |||
29 | /**
|
||
30 | * @see com.hardcode.gdbms.engine.instruction.CachedExpression#evaluate(long)
|
||
31 | */
|
||
32 | public Value evaluate(long row) throws EvaluationException { |
||
33 | return ((Expression) getChilds()[0]).evaluateExpression(row); |
||
34 | } |
||
35 | |||
36 | /**
|
||
37 | * @see com.hardcode.gdbms.engine.instruction.CachedExpression#isLiteral()
|
||
38 | */
|
||
39 | public boolean isLiteral() { |
||
40 | return ((Expression) getChilds()[0]).isLiteral(); |
||
41 | } |
||
42 | } |