MDCondition.inc
2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
require_once(KT_LIB_DIR . "/ktentity.inc");
require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc");
require_once(KT_LIB_DIR . "/documentmanagement/MetaData.inc");
class MDConditionNode extends KTEntity {
/** boilerplate DB code. */
/** primary key */
var $iId = -1;
var $iFieldId;
var $sName;
var $iParentNode;
var $_aFieldToSelect = array(
"iId" => "id",
"iFieldId" => "document_field_id",
"iLookupId" => "metadata_lookup_id",
"sName" => "name", // this can be null - if it isn't we are looking at a rooted subtree
);
var $_bUsePearError = true;
function getID() { return $this->iId; }
function setID($iId) { $this->iId = $iId; }
function getFieldId() { return $this->iFieldId; }
function setFieldId($iFieldId) { $this->iFieldId = $iFieldId; }
function getLookupId() { return $this->iLookupId; }
function setLookupId($iLookupId) { $this->$iLookupId = $iLookupId; }
function _table () {
global $default;
return $default->metadata_condition_table;
}
// Static Functions (dull)
function &get($iId) { return KTEntityUtil::get("MDConditionNode", $iId); }
function &createFromArray($aOptions) { return KTEntityUtil::createFromArray("MDConditionNode", $aOptions); }
function &getList($sWhereClause = null) { global $default; return KTEntityUtil::getList2("MDConditionNode", $sWhereClause); }
/** end boilerplate. anything interesting goes below here. */
}
class MDConditionChain extends KTEntity {
/** boilerplate DB code. */
/** primary key */
var $iId = -1;
var $iParentCondition;
var $iChildCondition;
var $_aFieldToSelect = array(
"iId" => "id",
"iChildCondition" => "child_condition",
"iParentCondition" => "parent_condition",
);
var $_bUsePearError = true;
function getID() { return $this->iId; }
function setID($iId) { $this->iId = $iId; }
function getParentConditionId() { return $this->iParentCondition; }
function setParentConditionId($iParentCondition) { $this->$iParentCondition = $iParentCondition; }
function getChildConditionId() { return $this->iChildCondition; }
function setChildConditionId($iChildCondition) { $this->$iChildCondition = $iParentCondition; }
function _table () {
global $default;
return $default->md_condition_chain_table;
}
// Static Functions (dull)
function &get($iId) { return KTEntityUtil::get("MDConditionChain", $iId); }
function &createFromArray($aOptions) { return KTEntityUtil::createFromArray("MDConditionChain", $aOptions); }
function &getList($sWhereClause = null) { global $default; return KTEntityUtil::getList2("MDConditionChain", $sWhereClause); }
/** end boilerplate. anything interesting goes below here. */
}