001    package railo.runtime.type;
002    
003    import java.util.Iterator;
004    import java.util.List;
005    
006    import railo.runtime.exp.DatabaseException;
007    
008    /**
009     * implementation of the query column
010     */
011    public final class DebugQueryColumn extends QueryColumnImpl implements QueryColumnPro,Sizeable,Objects {
012          
013            
014            private boolean used;
015    
016    
017            /**
018             * @return the used
019             */
020            public boolean isUsed() {
021                    return used;
022            }
023            
024    
025        public DebugQueryColumn(Object[] data, Key key, QueryImpl query,int size, int type,
026                            boolean typeChecked) {
027                    this.data=data;
028                    this.key=key;
029                    this.query=query;
030                    this.size=size;
031                    this.type=type;
032                    this.typeChecked=typeChecked;
033            }
034            
035            
036            /**
037             * Constructor of the class
038             * for internal usage only
039             */
040            public DebugQueryColumn() {
041                    super();
042            }
043    
044    
045            /**
046         * @see railo.runtime.type.QueryColumn#get(int)
047         */
048        public Object get(int row){
049            used=true;
050            return super.get(row);
051        }
052    
053        /**
054         * touch the given line on the column at given row
055         * @param row
056         * @return new row or existing
057         * @throws DatabaseException
058         */
059        public Object touch(int row) throws DatabaseException{
060            used=true;
061            return super.touch(row);
062        }
063        
064        /**
065         * touch the given line on the column at given row
066         * @param row
067         * @return new row or existing
068         * @throws DatabaseException
069         */
070        public Object touchEL(int row) {
071            used=true;
072            return super.touchEL(row);
073        }
074    
075            /**
076             * @see railo.runtime.type.QueryColumn#get(int, java.lang.Object)
077             */
078            public Object get(int row, Object defaultValue) {
079                    used=true;
080            return super.get(row,defaultValue);
081            }
082            
083        
084            public synchronized QueryColumnPro cloneColumn(QueryImpl query, boolean deepCopy) {
085            DebugQueryColumn clone=new DebugQueryColumn();
086            populate(this, clone, deepCopy);
087            return clone;
088        }
089    
090            /**
091             * @see railo.runtime.type.Iteratorable#valueIterator()
092             */
093            public Iterator valueIterator() {
094                    used=true;
095                    return super.valueIterator();
096            }
097            /**
098             * @see java.util.List#indexOf(java.lang.Object)
099             */
100            public int indexOf(Object o) {
101                    used=true;
102                    return super.indexOf(o);
103            }
104    
105            /**
106             * @see java.util.List#lastIndexOf(java.lang.Object)
107             */
108            public int lastIndexOf(Object o) {
109                    used=true;
110                    return super.lastIndexOf(o);
111            }
112    
113            /**
114             * @see java.util.List#subList(int, int)
115             */
116            public List<Object> subList(int fromIndex, int toIndex) {
117                    used=true;
118                    return super.subList(fromIndex, toIndex);
119            }
120    
121            /**
122             * @see java.util.List#toArray()
123             */
124            public Object[] toArray() {
125                    used=true;
126                    return super.toArray();
127            }
128    
129            /**
130             * @see java.util.List#toArray(T[])
131             */
132            public  Object[] toArray(Object[] trg) {
133                    used=true;
134                    return super.toArray(trg);
135            }
136            
137            public QueryColumnPro toDebugColumn() {
138                    return this;
139            }
140    }