/**
  * Sets a field from the object by Position as specified in the xml schema.
  * Zero-based.
  *
  * @param int $pos position in xml schema
  * @param mixed $value field value
  * @return void
  */
 public function setByPosition($pos, $value)
 {
     switch ($pos) {
         case 0:
             $this->setId($value);
             break;
         case 1:
             $this->setPersonalId($value);
             break;
         case 2:
             $this->setAgendaId($value);
             break;
         case 3:
             $this->setPersonalNombre($value);
             break;
         case 4:
             $valueSet = PersonalcirugiaPeer::getValueSet(PersonalcirugiaPeer::TIPO);
             if (isset($valueSet[$value])) {
                 $value = $valueSet[$value];
             }
             $this->setTipo($value);
             break;
         case 5:
             $this->setStatus($value);
             break;
         case 6:
             $this->setPrograma($value);
             break;
         case 7:
             $this->setInicia($value);
             break;
         case 8:
             $this->setTransoperatorio($value);
             break;
         case 9:
             $this->setFinaliza($value);
             break;
         case 10:
             $this->setTurno($value);
             break;
         case 11:
             $this->setCreatedAt($value);
             break;
     }
     // switch()
 }
 /**
  * Filter the query on the tipo column
  *
  * @param     mixed $tipo The value to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return PersonalcirugiaQuery The current query, for fluid interface
  * @throws PropelException - if the value is not accepted by the enum.
  */
 public function filterByTipo($tipo = null, $comparison = null)
 {
     $valueSet = PersonalcirugiaPeer::getValueSet(PersonalcirugiaPeer::TIPO);
     if (is_scalar($tipo)) {
         if (!in_array($tipo, $valueSet)) {
             throw new PropelException(sprintf('Value "%s" is not accepted in this enumerated column', $tipo));
         }
         $tipo = array_search($tipo, $valueSet);
     } elseif (is_array($tipo)) {
         $convertedValues = array();
         foreach ($tipo as $value) {
             if (!in_array($value, $valueSet)) {
                 throw new PropelException(sprintf('Value "%s" is not accepted in this enumerated column', $value));
             }
             $convertedValues[] = array_search($value, $valueSet);
         }
         $tipo = $convertedValues;
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
     }
     return $this->addUsingAlias(PersonalcirugiaPeer::TIPO, $tipo, $comparison);
 }