private synchronized Object _get(int row) throws SQLException, IOException { if (data == null) { data = new Object[qry.getRecordcount()]; for (int i = 0; i < data.length; i++) { data[i] = SimpleQuery.DEFAULT_VALUE; } } return data[row - 1] = cast.toCFType(type, res, index); }
public SimpleQueryColumn( SimpleQuery qry, ResultSet res, Collection.Key key, int type, int index) { this.qry = qry; this.res = res; this.key = key; this.index = index; try { switch (type) { case Types.TIMESTAMP: cast = Cast.TIMESTAMP; break; case Types.TIME: cast = Cast.TIME; break; case Types.DATE: cast = Cast.DATE; break; case Types.CLOB: cast = Cast.CLOB; break; case Types.BLOB: cast = Cast.BLOB; break; case Types.BIT: cast = Cast.BIT; break; case Types.ARRAY: cast = Cast.ARRAY; break; case CFTypes.OPAQUE: if (SQLUtil.isOracle(res.getStatement().getConnection())) cast = Cast.ORACLE_OPAQUE; else cast = Cast.OTHER; break; default: cast = Cast.OTHER; break; } } catch (Exception e) { throw SimpleQuery.toRuntimeExc(e); } }
private Object getChildElement(Key key, Object defaultValue) { // column and query has same name if (key.equals(this.key)) { return get(qry.getCurrentrow(), defaultValue); } // get it from undefined scope PageContext pc = ThreadLocalPageContext.get(); if (pc != null) { UndefinedImpl undefined = ((UndefinedImpl) pc.undefinedScope()); boolean old = undefined.setAllowImplicidQueryCall(false); Object sister = undefined.get(this.key, null); undefined.setAllowImplicidQueryCall(old); if (sister != null) { try { return pc.get(sister, key); } catch (PageException e) { return defaultValue; } } } return defaultValue; }
public Object removeEL(PageContext pc) { throw SimpleQuery.notSupported(); }
public Object touch(PageContext pc) throws PageException { throw SimpleQuery.notSupported(); }
public Object clone() { throw SimpleQuery.notSupported(); }
public Object remove(Key key) throws PageException { throw SimpleQuery.notSupported(); }
public Object set(String key, Object value) throws PageException { throw SimpleQuery.notSupported(); }
public void addRow(int count) { throw SimpleQuery.notSupported(); }
public int compareTo(String str) throws PageException { throw SimpleQuery.notSupported(); }
public Object removeEL(int row) { throw SimpleQuery.notSupported(); }
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties) { throw SimpleQuery.notSupported(); }
public Iterator valueIterator() { throw SimpleQuery.notSupported(); }
public boolean containsKey(Key key) { throw SimpleQuery.notSupported(); }
public Collection duplicate(boolean deepCopy) { throw SimpleQuery.notSupported(); }
public Object setEL(Key key, Object value) { throw SimpleQuery.notSupported(); }
public Object touchEL(PageContext pc) { throw SimpleQuery.notSupported(); }
public Object set(int row, Object value) throws PageException { throw SimpleQuery.notSupported(); }
public Object removeRow(int row) throws PageException { throw SimpleQuery.notSupported(); }
public Object removeEL(Key key) { throw SimpleQuery.notSupported(); }
public int compareTo(boolean b) throws PageException { throw SimpleQuery.notSupported(); }
public void clear() { throw SimpleQuery.notSupported(); }
public void add(Object value) { throw SimpleQuery.notSupported(); }
public int compareTo(double d) throws PageException { throw SimpleQuery.notSupported(); }
public Object setEL(int row, Object value) { throw SimpleQuery.notSupported(); }
public int compareTo(DateTime dt) throws PageException { throw SimpleQuery.notSupported(); }
public void cutRowsTo(int maxrows) { throw SimpleQuery.notSupported(); }
public Object set(PageContext pc, Object value) throws PageException { throw SimpleQuery.notSupported(); }
public Object setEL(PageContext pc, Object value) { throw SimpleQuery.notSupported(); }
public String[] keysAsString() { throw SimpleQuery.notSupported(); }