public function persist(DataAbstract $data)
    {
        if ($data->exists()) {
            return $this->update($data);
        } else {
            return $this->insert($data);
        }
    }
public function persist(DataAbstract $data)
    {
        if ($data->exists()) {
            return $this->update($data);
        } else {
            return $this->insert($data);
        }
    }
public function persist ( DataAbstract $ data ) { if ( $ data -> exists ( ) ) { return $ this -> update ( $ data ) ; } else { return $ this -> insert ( $ data ) ; } }
Persist data in database.

@param  DataAbstract $data
@return bool
Persist data in database .