Pap_Api_Object::load PHP Method

load() public method

public load ( )
        public function load()
        {
            if (!$this->primaryKeyIsDefined()) {
                if ($this->getGridRequest() == null) {
                    throw new Exception("You have to set " . $this->getPrimaryKey() . " before calling load()!");
                }
                if (!$this->someFieldIsFilled()) {
                    throw new Exception("You have to set at least one field before calling load()!");
                }
                $this->getPrimaryKeyFromFields();
            }
            $this->setField("Id", $this->getField($this->getPrimaryKey()));
            return $this->callRequest("load");
        }