public function getResult(){
        if(isset($this->entity)){
            return $this->entity;
        }else if(isset($this->entities)){
            return $this->entities;
        } else{
           return null;
        }
    }