wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
class.LocktableBase.php
Go to the documentation of this file.
1 <?php
2 /**
3  * This file was generated by wCMFGenerator 2.6.1.0033 from cookbook1.xmi on 23.02.09 21:34.
4  * Manual modifications should be placed inside the protected regions.
5  */
6 require_once(BASE."wcmf/lib/model/class.Node.php");
7 
8 /**
9  * @class Locktable
10  * Locktable description:
11  *
12  * @author <ingo@wemove.com>
13  * @version 1.0
14  */
15 class LocktableBase extends Node
16 {
17  function LocktableBase($oid=null, $type=null)
18  {
19  if ($type == null)
20  parent::Node('Locktable', $oid);
21  else
22  parent::Node($type, $oid);
23  }
24  /**
25  * @see PersistentObject::getObjectDisplayName()
26  */
28  {
29  return Message::get("Locktable");
30  }
31  /**
32  * @see PersistentObject::getObjectDescription()
33  */
35  {
36  return Message::get("");
37  }
38  /**
39  * @see PersistentObject::getValueDisplayName()
40  */
41  function getValueDisplayName($name, $type=null)
42  {
43  $displayName = $name;
44  if ($name == 'id') $displayName = Message::get("id");
45  if ($name == 'fk_user_id') $displayName = Message::get("fk_user_id");
46  if ($name == 'objectid') $displayName = Message::get("objectid");
47  if ($name == 'sessionid') $displayName = Message::get("sessionid");
48  if ($name == 'since') $displayName = Message::get("since");
49  return Message::get($displayName);
50  }
51  /**
52  * @see PersistentObject::getValueDescription()
53  */
54  function getValueDescription($name, $type=null)
55  {
56  $description = $name;
57  if ($name == 'id') $description = Message::get("");
58  if ($name == 'fk_user_id') $description = Message::get("");
59  if ($name == 'objectid') $description = Message::get("");
60  if ($name == 'sessionid') $description = Message::get("");
61  if ($name == 'since') $description = Message::get("");
62  return Message::get($description);
63  }
64  /**
65  * See if the node is an association object, that implements a many to many relation
66  */
67  function isManyToManyObject()
68  {
69  return false;
70  }
71  /**
72  * Getter/Setter
73  */
74  function getId($unconverted=false)
75  {
76  if ($unconverted)
77  return $this->getUnconvertedValue('id', DATATYPE_IGNORE);
78  else
79  return $this->getValue('id', DATATYPE_IGNORE);
80  }
81  function setId($id)
82  {
83  return $this->setValue('id', $id, DATATYPE_IGNORE);
84  }
85  function getFkUserId($unconverted=false)
86  {
87  if ($unconverted)
88  return $this->getUnconvertedValue('fk_user_id', DATATYPE_IGNORE);
89  else
90  return $this->getValue('fk_user_id', DATATYPE_IGNORE);
91  }
92  function setFkUserId($fk_user_id)
93  {
94  return $this->setValue('fk_user_id', $fk_user_id, DATATYPE_IGNORE);
95  }
96  function getObjectid($unconverted=false)
97  {
98  if ($unconverted)
99  return $this->getUnconvertedValue('objectid', DATATYPE_ATTRIBUTE);
100  else
101  return $this->getValue('objectid', DATATYPE_ATTRIBUTE);
102  }
103  function setObjectid($objectid)
104  {
105  return $this->setValue('objectid', $objectid, DATATYPE_ATTRIBUTE);
106  }
107  function getSessionid($unconverted=false)
108  {
109  if ($unconverted)
110  return $this->getUnconvertedValue('sessionid', DATATYPE_ATTRIBUTE);
111  else
112  return $this->getValue('sessionid', DATATYPE_ATTRIBUTE);
113  }
114  function setSessionid($sessionid)
115  {
116  return $this->setValue('sessionid', $sessionid, DATATYPE_ATTRIBUTE);
117  }
118  function getSince($unconverted=false)
119  {
120  if ($unconverted)
121  return $this->getUnconvertedValue('since', DATATYPE_ATTRIBUTE);
122  else
123  return $this->getValue('since', DATATYPE_ATTRIBUTE);
124  }
125  function setSince($since)
126  {
127  return $this->setValue('since', $since, DATATYPE_ATTRIBUTE);
128  }
129  function getUserRDBOID()
130  {
131  $fkValue = $this->getValue('fk_user_id', DATATYPE_IGNORE);
132  if ($fkValue != null)
133  return PersistenceFacade::composeOID(array('type' => 'UserRDB', 'id' => array($fkValue)));
134  else
135  return null;
136  }
137  function setUserRDB(&$node)
138  {
139  if ($node != null)
140  $node->addChild($this);
141  }
142  function getUserRDBParents()
143  {
144  return $this->getParentsEx(null, 'UserRDB', null, null);
145  }
146 
147  /**
148  * Node class overrides
149  */
150 
151  /**
152  * @see Node::loadChildren()
153  * Override this to also load the children of many-to-many relations
154  */
155  function loadChildren($type, $buildDepth=BUILDDEPTH_SINGLE, $forceUpdate=false)
156  {
157  // do default
158  parent::loadChildren($type, $buildDepth, $forceUpdate);
159  }
160  /**
161  * @see Node::getChildrenEx()
162  * Override this to also get the children of many-to-many relations
163  */
164  function getChildrenEx($oid, $type, $values, $properties)
165  {
166  // do default
167  return parent::getChildrenEx($oid, $type, $values, $properties);
168  }
169  /**
170  * @see Node::addChild()
171  * Override this to insert association objects if necessary
172  */
173  function addChild(&$child, $addtype=ADDCHILD_BACK)
174  {
175  // do default
176  parent::addChild($child, $addtype);
177  }
178  /**
179  * @see Node::deleteChild()
180  * Override this to delete association objects if necessary
181  */
182  function deleteChild($childOID, $reallyDelete=false)
183  {
184  // do default
185  parent::deleteChild($childOID, $reallyDelete);
186  }
187 }
188 ?>
getSessionid($unconverted=false)
get($message, $parameters=null, $domain='', $lang='')
Node is the basic component for building trees (although a Node can have one than more parents)...
Definition: class.Node.php:118
getChildrenEx($oid, $type, $values, $properties)
deleteChild($childOID, $reallyDelete=false)
setFkUserId($fk_user_id)
const DATATYPE_ATTRIBUTE
getValueDescription($name, $type=null)
getObjectid($unconverted=false)
getFkUserId($unconverted=false)
getValue($name, $type=null)
loadChildren($type, $buildDepth=BUILDDEPTH_SINGLE, $forceUpdate=false)
getSince($unconverted=false)
getParentsEx($oid, $type, $values, $properties, $useRegExp=true)
Definition: class.Node.php:618
LocktableBase($oid=null, $type=null)
const DATATYPE_IGNORE
getValueDisplayName($name, $type=null)
setSessionid($sessionid)
const ADDCHILD_BACK
Definition: class.Node.php:31
addChild(&$child, $addtype=ADDCHILD_BACK)
setValue($name, $value, $type=null, $forceSet=false)
const BUILDDEPTH_SINGLE
getUnconvertedValue($name, $type=null)
getId($unconverted=false)