Revision 44853 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/dataaccess/IsSelectedCurrentRowFunction.java

View differences:

IsSelectedCurrentRowFunction.java
26 26
import org.apache.commons.lang3.Range;
27 27
import org.gvsig.expressionevaluator.Interpreter;
28 28
import org.gvsig.expressionevaluator.impl.DALFunctions;
29
import org.gvsig.expressionevaluator.spi.AbstractFunction;
30
import static org.gvsig.fmap.dal.DataManager.FUNCTION_CURRENT_ROW;
31 29
import static org.gvsig.fmap.dal.DataManager.FUNCTION_ISSELECTED_CURRENT_ROW;
32 30
import org.gvsig.fmap.dal.feature.Feature;
33 31
import org.gvsig.fmap.dal.feature.FeatureSelection;
......
37 35
 *
38 36
 * @author jjdelcerro
39 37
 */
40
public class IsSelectedCurrentRowFunction extends AbstractFunction {
38
public class IsSelectedCurrentRowFunction extends AbstractFeatureFunction {
41 39
  
42 40
  public IsSelectedCurrentRowFunction() {
43 41
    super(
......
53 51
    );
54 52
  }
55 53

  
56
  private Feature current_row(Interpreter interpreter) {
57
    try {
58
      Feature f = (Feature) interpreter.call(FUNCTION_CURRENT_ROW);
59
      return f;
60
    } catch (Exception ex) {
61
      return null;
62
    }
63
  }
64

  
65 54
  @Override
66 55
  public Object call(Interpreter interpreter, Object[] args) throws Exception {
67
    Feature feature = current_row(interpreter);
56
    Feature feature = this.current_row(interpreter);
68 57
    if (feature == null) {
69 58
      return false;
70 59
    }

Also available in: Unified diff