MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
selectioncriteria.class
Ir para a documentação deste ficheiro.
1<?php
3{
6 var $value;
7
9 {
10 $this->attributeMap = $attributeMap;
11 $this->operator = $operator;
12 $this->value = $value;
13 }
14
15 function _getValue()
16 {
17 if (is_array($this->value))
18 {
19 $value = "(";
20 $i = 0;
21
22 foreach ($this->value as $v)
23 {
24 $value .= ($i++ > 0) ? ", " : "";
25 $value .= "'$v'";
26 }
27
28 $value .= ")";
29 }
30 elseif (is_object($this->value))
31 {
32 if ($this->value instanceof RetrieveCriteria)
33 {
34 $value = "(" . $this->value->getSqlStatement()->Select() . ")";
35 }
36 }
37 else
38 {
40 }
41
42 return $value;
43 }
44
45 function setWhereStatement($statement)
46 {
47 $condition = "(";
48 $condition .= $this->attributeMap->getColumnMap()->getColumnName() . ' ' . $this->operator . ' ' . $this->_getValue();
49 $condition .= ")";
50 $statement->SetWhere($condition);
51 }
52
53 function getWhereSql()
54 {
55 $condition = "(";
56 $conv = $cm->getConverter();
57 $condition .= $this->attributeMap->getColumnMap()->getColumnName() . ' ' . $this->operator . ' ' . $this->_getValue();
58 $condition .= ")";
59 return $condition;
60 }
61}
62?>
setWhereStatement($statement)
SelectionCriteria($attributeMap, $operator, $value)