model/entity/activity.php
protected function _findActivityObject()
    {
        $db     = $this->getTable()->getAdapter();
        $table  = $this->_object_table;
        $column = $this->_object_column;

        $query = $this->getObject('lib:database.query.select');
        $query->columns('COUNT(*)')->table($table)->where($column . ' = :value')
              ->bind(array('value' => $this->row));

        // Need to catch exceptions here as table may not longer exist.
        try {
            $result = $db->select($query, KDatabase::FETCH_FIELD);
        } catch (Exception $e) {
            $result = 0;
        }

        return $result;
    }
protected function _findActivityObject()
    {
        $db     = $this->getTable()->getAdapter();
        $table  = $this->_object_table;
        $column = $this->_object_column;

        $query = $this->getObject('lib:database.query.select');
        $query->columns('COUNT(*)')->table($table)->where($column . ' = :value')
              ->bind(array('value' => $this->row));

        // Need to catch exceptions here as table may not longer exist.
        try {
            $result = $db->select($query, KDatabase::FETCH_FIELD);
        } catch (Exception $e) {
            $result = 0;
        }

        return $result;
    }
protected function _findActivityObject ( ) { $ db = $ this -> getTable ( ) -> getAdapter ( ) ; $ table = $ this -> _object_table ; $ column = $ this -> _object_column ; $ query = $ this -> getObject ( 'lib:database.query.select' ) ; $ query -> columns ( 'COUNT(*)' ) -> table ( $ table ) -> where ( $ column . ' = :value' ) -> bind ( array ( 'value' => $ this -> row ) ) ; // Need to catch exceptions here as table may not longer exist. try { $ result = $ db -> select ( $ query , KDatabase :: FETCH_FIELD ) ; } catch ( Exception $ e ) { $ result = 0 ; } return $ result ; }
Finds the activity object.

This method may be overridden for activities persisting objects on storage systems other than local database
tables.

@return boolean True if found, false otherwise.
Finds the activity object .