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            /**
029             * @see railo.intergral.fusiondebug.server.type.FDNodeVariableSupport#getRawValue()
030             */
031            protected Object getRawValue() {
032                    return qry.getAt(column, row,null);
033            }
034    
035            public boolean isMutable() {
036                    return true;
037            }
038    
039            public void set(String value) throws FDMutabilityException,FDLanguageException {
040                    qry.setAtEL(column,row, FDCaster.unserialize(value));
041            }
042    }