QueryResult.class.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************************
00003  *   Copyright (C) 2004-2007 by Konstantin V. Arkhipov                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation; either version 3 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  ***************************************************************************/
00011 /* $Id: QueryResult.class.php 4687 2007-12-09 18:57:18Z voxus $ */
00012 
00018     final class QueryResult implements Identifiable
00019     {
00020         private $list       = array();
00021         
00022         private $count      = 0;
00023         private $affected   = 0;
00024         
00025         private $query      = null;
00026         
00030         public static function create()
00031         {
00032             return new self;
00033         }
00034         
00035         public function getId()
00036         {
00037             return '_result_'.$this->query->getId();
00038         }
00039         
00040         public function setId($id)
00041         {
00042             throw new UnsupportedMethodException();
00043         }
00044         
00048         public function getQuery()
00049         {
00050             return $this->query;
00051         }
00052         
00056         public function setQuery(SelectQuery $query)
00057         {
00058             $this->query = $query;
00059             
00060             return $this;
00061         }
00062 
00063         public function getList()
00064         {
00065             return $this->list;
00066         }
00067         
00071         public function setList($list)
00072         {
00073             $this->list = $list;
00074             
00075             return $this;
00076         }
00077         
00078         public function getCount()
00079         {
00080             return $this->count;
00081         }
00082         
00086         public function setCount($count)
00087         {
00088             $this->count = $count;
00089             
00090             return $this;
00091         }
00092         
00093         public function getAffected()
00094         {
00095             return $this->affected;
00096         }
00097         
00101         public function setAffected($affected)
00102         {
00103             $this->affected = $affected;
00104             
00105             return $this;
00106         }
00107     }
00108 ?>

Generated on Sun Dec 9 21:56:23 2007 for onPHP by  doxygen 1.5.4