id; } /** * Set order_master_id * * @param integer $orderMasterId * @return OrderElement */ public function setOrderMasterId($orderMasterId) { $this->orderMasterId = $orderMasterId; return $this; } /** * Get order_master_id * * @return integer */ public function getOrderMasterId() { return $this->orderMasterId; } /** * * Returns the username matching to the order_master_id * * @param Application $app * @return string */ public function getOrderMasterName(Application $app) { if (isset($this->orderMasterId) && null !== $this->orderMasterId) { $user = \User_Adapter::getInstance($this->orderMasterId, $app); return $user->get_firstname(); } return null; } /** * Set deny * * @param boolean $deny * @return OrderElement */ public function setDeny($deny) { $this->deny = $deny; return $this; } /** * Get deny * * @return boolean */ public function getDeny() { return $this->deny; } /** * Set order * * @param Order $order * @return OrderElement */ public function setOrder(Order $order = null) { $this->order = $order; return $this; } /** * Get order * * @return Order */ public function getOrder() { return $this->order; } /** * Set base_id * * @param integer $baseId * @return OrderElement */ public function setBaseId($baseId) { $this->baseId = $baseId; return $this; } /** * Get base_id * * @return integer */ public function getBaseId() { return $this->baseId; } /** * Set record_id * * @param integer $recordId * @return OrderElement */ public function setRecordId($recordId) { $this->recordId = $recordId; return $this; } /** * Get record_id * * @return integer */ public function getRecordId() { return $this->recordId; } /** * Returns a record from the element's base_id and record_id * * @param Application $app * @return \record_adapter */ public function getRecord(Application $app) { return new \record_adapter($app, $this->getSbasId($app), $this->getRecordId()); } /** * Returns the matching sbasId * * @param Application $app * @return int */ public function getSbasId(Application $app) { return \phrasea::sbasFromBas($app, $this->getBaseId()); } }