function valid() { if($this->is_cached_rs) return $this->cached_rs->valid(); else return parent :: valid(); }