001    package railo.intergral.fusiondebug.server.type.qry;
002    
003    import railo.intergral.fusiondebug.server.type.FDNodeValueSupport;
004    import railo.intergral.fusiondebug.server.util.FDCaster;
005    import railo.runtime.type.Query;
006    
007    import com.intergral.fusiondebug.server.FDLanguageException;
008    import com.intergral.fusiondebug.server.FDMutabilityException;
009    import com.intergral.fusiondebug.server.IFDStackFrame;
010    
011    public class FDQueryNode extends FDNodeValueSupport {
012    
013            private Query qry;
014            private int row;
015            private String column;
016    
017            public FDQueryNode(IFDStackFrame frame, Query qry, int row, String column) {
018                    super(frame);
019                    this.qry=qry;
020                    this.row=row;
021                    this.column=column;
022            }
023    
024            public String getName() {
025                    return column;
026            }
027    
028            @Override
029            protected Object getRawValue() {
030                    return qry.getAt(column, row,null);
031            }
032    
033            public boolean isMutable() {
034                    return true;
035            }
036    
037            public void set(String value) throws FDMutabilityException,FDLanguageException {
038                    qry.setAtEL(column,row, FDCaster.unserialize(value));
039            }
040    }