GetEntityType() публичный Метод

The type of entities which the criterion represents.
public GetEntityType ( ) : string
Результат string
Пример #1
0
 public function __construct($EntityOrType, array $AssignmentExpressions, Object\ICriterion $Criterion = null)
 {
     if (count($AssignmentExpressions) === 0) {
         throw new Object\ObjectException('Procedure must contain atleast one assignment expression: none given');
     }
     $this->EntityType = is_object($EntityOrType) ? get_class($EntityOrType) : $EntityOrType;
     $this->AssignmentExpressions = $AssignmentExpressions;
     $this->Criterion = $Criterion ?: new Criterion($this->EntityType);
     if ($this->Criterion->GetEntityType() !== $this->EntityType) {
         throw new Object\TypeMismatchException('The supplied criterion must be for %s, %s given', $this->EntityType, $this->Criterion->GetEntityType());
     }
 }
Пример #2
0
 public function __construct($EntityOrType, array $Properties, $IsSingleEntity, Object\ICriterion $Criterion = null)
 {
     if (is_object($EntityOrType)) {
         $EntityOrType = get_class($EntityOrType);
     }
     $this->EntityType = $EntityOrType;
     foreach ($Properties as $Property) {
         $this->AddProperty($Property);
     }
     $this->IsSingleEntity = $IsSingleEntity;
     $this->Criterion = $Criterion ?: new Criterion($this->EntityType);
     if ($this->Criterion->GetEntityType() !== $this->EntityType) {
         throw new Object\TypeMismatchException('The supplied criterion must be for %s, %s given', $this->EntityType, $this->Criterion->GetEntityType());
     }
 }
Пример #3
0
 /**
  * @access private
  * 
  * Maps the supplied object criterion the the relational equivalent.
  * 
  * @param Object\ICriterion $ObjectCriterion The object criterion to map
  * @return Relational\Criterion The relational equivalent
  */
 private function MapObjectCriterion(Object\ICriterion $ObjectCriterion)
 {
     $EntityRelationalMap = $this->VerifyEntityTypeIsMapped($ObjectCriterion->GetEntityType());
     $RelationalCriterion = $EntityRelationalMap->GetCriterion();
     $this->MapCriterion($EntityRelationalMap, $ObjectCriterion, $RelationalCriterion);
     return $RelationalCriterion;
 }