wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
class.LocktableRDBMapper.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/mapper/class.NodeUnifiedRDBMapper.php");
7 require_once(BASE."application/include/model/wcmf/class.Locktable.php");
8 
9 /**
10  * @class LocktableRDBMapper
11  * LocktableRDBMapper maps Locktable Nodes to the database.
12  * Locktable description:
13  *
14  * @author <ingo@wemove.com>
15  * @version 1.0
16  */
18 {
19  /**
20  * @see RDBMapper::getType()
21  */
22  function getType()
23  {
24  return 'Locktable';
25  }
26  /**
27  * @see NodeRDBMapper::createObject()
28  */
29  function &createObject($oid=null)
30  {
31  return new Locktable($oid);
32  }
33  /**
34  * @see NodeUnifiedRDBMapper::getTableName()
35  */
36  function getTableName()
37  {
38  return 'locktable';
39  }
40  /**
41  * @see PersistenceMapper::getPkNames()
42  */
43  function getPkNames()
44  {
45  return array('id' => DATATYPE_IGNORE);
46  }
47  /**
48  * @see NodeUnifiedRDBMapper::getMyFKColumnNameImpl()
49  */
50  function getMyFKColumnNameImpl($parentType)
51  {
52  if ($parentType == 'UserRDB') return 'fk_user_id';
53  if ($this->getType() == 'Locktable' && $parentType == 'UserRDB') return 'fk_user_id';
54  return '';
55  }
56  /**
57  * @see NodeUnifiedRDBMapper::getOrderBy()
58  */
59  function getOrderBy()
60  {
61  return array();
62  }
63  /**
64  * @see NodeUnifiedRDBMapper::getObjectDefinitionImpl()
65  */
67  {
68  $nodeDef = array();
69  $nodeDef['_properties'] = array
70  (
71  array('name' => 'is_searchable', 'value' => false),
72 // PROTECTED REGION ID(application/include/model/wcmf/class.LocktableRDBMapper.php/Properties) ENABLED START
73 // PROTECTED REGION END
74  );
75  $nodeDef['_datadef'] = array
76  (
77  /*
78  * Value description:
79  */
80  array('name' => 'id', 'app_data_type' => DATATYPE_IGNORE, 'column_name' => 'id', 'db_data_type' => 'INT(11) NOT NULL', 'default' => '', 'restrictions_match' => '', 'restrictions_not_match' => '', 'restrictions_description' => '', 'is_editable' => false, 'input_type' => 'text', 'display_type' => 'text'),
81  /*
82  * Value description:
83  */
84  array('name' => 'fk_user_id', 'app_data_type' => DATATYPE_IGNORE, 'column_name' => 'fk_user_id', 'db_data_type' => 'INT(11)', 'default' => '', 'restrictions_match' => '', 'restrictions_not_match' => '', 'restrictions_description' => '', 'is_editable' => false, 'input_type' => 'text', 'display_type' => 'text'),
85  /*
86  * Value description:
87  */
88  array('name' => 'objectid', 'app_data_type' => DATATYPE_ATTRIBUTE, 'column_name' => 'oid', 'db_data_type' => 'VARCHAR(255)', 'default' => '', 'restrictions_match' => '', 'restrictions_not_match' => '', 'restrictions_description' => '', 'is_editable' => false, 'input_type' => 'text', 'display_type' => 'text'),
89  /*
90  * Value description:
91  */
92  array('name' => 'sessionid', 'app_data_type' => DATATYPE_ATTRIBUTE, 'column_name' => 'sid', 'db_data_type' => 'VARCHAR(255)', 'default' => '', 'restrictions_match' => '', 'restrictions_not_match' => '', 'restrictions_description' => '', 'is_editable' => false, 'input_type' => 'text', 'display_type' => 'text'),
93  /*
94  * Value description:
95  */
96  array('name' => 'since', 'app_data_type' => DATATYPE_ATTRIBUTE, 'column_name' => 'since', 'db_data_type' => 'DATETIME', 'default' => '', 'restrictions_match' => '', 'restrictions_not_match' => '', 'restrictions_description' => '', 'is_editable' => false, 'input_type' => 'text', 'display_type' => 'text'),
97  );
98  $nodeDef['_ref'] = array
99  (
100  );
101  $nodeDef['_parents'] = array
102  (
103  array('type' => 'UserRDB', 'is_navigable' => true, 'table_name' => 'user', 'pk_columns' => array('id'), 'fk_columns' => 'fk_user_id')
104  );
105  $nodeDef['_children'] = array
106  (
107  );
108  return $nodeDef;
109  }
110 }
111 ?>
const DATATYPE_ATTRIBUTE
const DATATYPE_IGNORE
NodeUnifiedRDBMapper maps Node objects to a relational database schema where each Node type has its o...