当前位置: 首页>>代码示例>>PHP>>正文


PHP Monitor::setId方法代码示例

本文整理汇总了PHP中Monitor::setId方法的典型用法代码示例。如果您正苦于以下问题:PHP Monitor::setId方法的具体用法?PHP Monitor::setId怎么用?PHP Monitor::setId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Monitor的用法示例。


在下文中一共展示了Monitor::setId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: removeMonitor

 /**
  * Eliminar un Monitor Dado el $monitorId
  * 
  * @param $monitorId
  */
 public function removeMonitor($monitorId)
 {
     $tareaBean = new TareaBean($this->persistenceManager);
     $monitorSalonBean = new MonitorSalonBean($this->persistenceManager);
     $monitor = new Monitor();
     $monitor->setId($monitorId);
     # Validamos los campos
     if (!EntityValidator::validateId($monitorId)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 104);
     }
     # Verificamos que la entidad exista.
     if (!$this->monitorBean->getMonitor($monitor)) {
         throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 105);
     }
     # Verificamos que la entidad no esté siendo utilziada en alguna otra.
     # Verificamos que la entidad no esté siendo utilziada en Tarea->tareaMonitor
     $tareas = $tareaBean->getTareasByTareaMonitor($monitor);
     if (count($tareas) > 0) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_LINKED_FAIL, $this->ID + 102);
     }
     # Verificamos que la entidad no esté siendo utilziada en MonitorSalon->monitor
     $monitorSalons = $monitorSalonBean->getMonitorSalonsByMonitor($monitor);
     if (count($monitorSalons) > 0) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_LINKED_FAIL, $this->ID + 103);
     }
     # Eliminamos la entidad
     if (!$this->monitorBean->removeMonitor($monitor)) {
         throw new Exception(SALAS_COMP_ALERT_E_PERSISTENCE_REMOVE_FAIL, $this->ID + 106);
     }
 }
开发者ID:AtsumiK,项目名称:ClasesComputadoras,代码行数:35,代码来源:MonitorController.php

示例2: listTareasByTareaMonitorId

 /**
  * Listar algunos Tarea dado el $tareaMonitorId
  * 
  * @param $tareaMonitorId
  * @param $performSize
  * @param $firstResultNumber
  * @param $numResults
  */
 public function listTareasByTareaMonitorId($tareaMonitorId, $performSize = false, $firstResultNumber = null, $numResults = null, $orderBy = null, $orderPriority = SQL_ASCENDING_ORDER)
 {
     $objBean = new MonitorBean($this->persistenceManager);
     $obj = new Monitor();
     $obj->setId($tareaMonitorId);
     # Validamos los campos
     if ($firstResultNumber !== null && !EntityValidator::validatePositiveNumber($firstResultNumber)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 143);
     }
     if (!EntityValidator::validateGlobalOrderPriority($orderPriority)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 145);
     }
     if (!EntityValidator::validateId($tareaMonitorId)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 147);
     }
     # Verificamos que la entidad exista
     if (!$objBean->getMonitor($obj)) {
         throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 149);
     }
     # Listamos las entidades
     if ($performSize) {
         $this->lastRequestSize = $this->tareaBean->countGetTareasByTareaMonitor($obj);
     }
     return TareaDTO::loadFromEntities($this->tareaBean->listTareasByTareaMonitor($obj, $firstResultNumber, $numResults, $orderBy, $orderPriority));
 }
开发者ID:AtsumiK,项目名称:ClasesComputadoras,代码行数:33,代码来源:TareaController.php

示例3: toEntity

 public static function toEntity(MonitorDTO $monitorDTO)
 {
     $monitor = new Monitor();
     $monitor->setId($monitorDTO->getId());
     $monitor->setMonitorTipo($monitorDTO->getMonitorTipo());
     $monitor->setMonitorHorario($monitorDTO->getMonitorHorario());
     $monitor->setMonitorEstudiante($monitorDTO->getMonitorEstudiante());
     return $monitor;
 }
开发者ID:AtsumiK,项目名称:ClasesComputadoras,代码行数:9,代码来源:MonitorDTO.php


注:本文中的Monitor::setId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。