001    package railo.runtime.type;
002    
003    import railo.runtime.exp.PageException;
004    import railo.runtime.op.Castable;
005    import railo.runtime.type.ref.Reference;
006    
007    /**
008     * represent a Single column of a query object
009     */
010    public interface QueryColumn extends Collection,Reference,Castable {
011        
012        /**
013         * removes the value but dont the index
014         * @param row
015         * @return removed Object
016         * @throws PageException
017         */
018        public Object remove(int row)throws PageException;
019        
020        /**
021         * remove a row from query
022         * @param row
023         * @return removed value
024         * @throws PageException
025         */
026        public Object removeRow(int row)throws PageException;
027        
028        /**
029         * removes method with int as key
030         * @param row
031         * @return removed Object
032         */
033        public Object removeEL(int row);
034        
035            /**
036             * get method with a int as key, return empty default value for invalid row
037             * @param row row to get value
038             * @return row value
039             * @throws PageException
040             * @deprecated use instead <code>get(int row, Object defaultValue)</code>
041             */
042            public Object get(int row) throws PageException;
043    
044            /**
045             * return the value in this row (can be null), when row number is invalid the default value is returned
046             * 
047             * @param row row to get value
048             * @return row value
049             */
050            public Object get(int row, Object defaultValue);
051    
052            /**
053             * set method with a int as key
054             * @param row row to set
055             * @param value value to set
056             * @return setted value
057             * @throws PageException
058             */
059            public Object set(int row, Object value) throws PageException;
060    
061            /**
062             * adds a value to the column
063             * @param value value to add
064             */
065            public void add(Object value);
066            
067    
068            /**
069             * setExpressionLess method with a int as key
070             * @param row row to set
071             * @param value value to set
072             * @return setted value
073             */
074            public Object setEL(int row, Object value);
075    
076    
077            /**
078             * @param count adds count row to the column
079             */
080            public void addRow(int count);
081    
082            /**
083             * @return returns the type of the Column (java.sql.Types.XYZ)
084             */
085            public int getType();
086            
087            /**
088             * @return returns the type of the Column as String
089             */
090            public String getTypeAsString();
091    
092        /**
093         * cuts row to defined size
094         * @param maxrows
095         */
096        public void cutRowsTo(int maxrows);
097            
098    }