wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
class.RoleRDBRDBMapper.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.RoleRDB.php");
8 
9 /**
10  * @class RoleRDBRDBMapper
11  * RoleRDBRDBMapper maps RoleRDB Nodes to the database.
12  * RoleRDB 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 'RoleRDB';
25  }
26  /**
27  * @see NodeRDBMapper::createObject()
28  */
29  function &createObject($oid=null)
30  {
31  return new RoleRDB($oid);
32  }
33  /**
34  * @see NodeUnifiedRDBMapper::getTableName()
35  */
36  function getTableName()
37  {
38  return 'role';
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  return '';
53  }
54  /**
55  * @see NodeUnifiedRDBMapper::getOrderBy()
56  */
57  function getOrderBy()
58  {
59  return array('name');
60  }
61  /**
62  * @see NodeUnifiedRDBMapper::getObjectDefinitionImpl()
63  */
65  {
66  $nodeDef = array();
67  $nodeDef['_properties'] = array
68  (
69  array('name' => 'is_searchable', 'value' => false),
70  array('name' => 'display_value', 'value' => 'name'),
71 // PROTECTED REGION ID(application/include/model/wcmf/class.RoleRDBRDBMapper.php/Properties) ENABLED START
72 // PROTECTED REGION END
73  );
74  $nodeDef['_datadef'] = array
75  (
76  /*
77  * Value description:
78  */
79  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'),
80  /*
81  * Value description:
82  */
83  array('name' => 'name', 'app_data_type' => DATATYPE_ATTRIBUTE, 'column_name' => 'name', 'db_data_type' => 'VARCHAR(50)', 'default' => '', 'restrictions_match' => '', 'restrictions_not_match' => '', 'restrictions_description' => '', 'is_editable' => true, 'input_type' => 'text', 'display_type' => 'text')
84  );
85  $nodeDef['_ref'] = array
86  (
87  );
88  $nodeDef['_parents'] = array
89  (
90  );
91  $nodeDef['_children'] = array
92  (
93  array('type' => 'NMUserRole', 'minOccurs' => 0, 'maxOccurs' => 'unbounded', 'aggregation' => true, 'composition' => true, 'is_navigable' => true, 'table_name' => 'nm_user_role', 'pk_columns' => array('fk_user_id', 'fk_role_id'), 'fk_columns' => 'fk_role_id', 'order_by' => array())
94  );
95  return $nodeDef;
96  }
97 }
98 ?>
const DATATYPE_ATTRIBUTE
const DATATYPE_IGNORE
getMyFKColumnNameImpl($parentType)
NodeUnifiedRDBMapper maps Node objects to a relational database schema where each Node type has its o...