public function load($stateId) { $data = $this->objectStateGateway->loadObjectStateData($stateId); if (empty($data)) { throw new NotFoundException('ObjectState', $stateId); } return $this->objectStateMapper->createObjectStateFromData($data); }