|
@@ -1,171 +0,0 @@
|
1
|
|
-## @author LeFactory
|
2
|
|
-
|
3
|
|
-import EditorialModel
|
4
|
|
-from EditorialModel import fieldtypes
|
5
|
|
-from EditorialModel.fieldtypes import naturerelation, char, integer, datetime, pk
|
6
|
|
-
|
7
|
|
-import leapi
|
8
|
|
-import leapi.lecrud
|
9
|
|
-import leapi.leobject
|
10
|
|
-import leapi.lerelation
|
11
|
|
-from leapi.leclass import _LeClass
|
12
|
|
-from leapi.letype import _LeType
|
13
|
|
-
|
14
|
|
-import DataSource.MySQL.leapidatasource
|
15
|
|
-
|
16
|
|
-
|
17
|
|
-## @brief _LeCrud concret class
|
18
|
|
-# @see leapi.lecrud._LeCrud
|
19
|
|
-class LeCrud(leapi.lecrud._LeCrud):
|
20
|
|
- _datasource = DataSource.MySQL.leapidatasource.LeDataSourceSQL(**{})
|
21
|
|
- _uid_fieldtype = None
|
22
|
|
-
|
23
|
|
-## @brief _LeObject concret class
|
24
|
|
-# @see leapi.leobject._LeObject
|
25
|
|
-class LeObject(LeCrud, leapi.leobject._LeObject):
|
26
|
|
- _me_uid = {1: 'Textes', 2: 'Personnes', 19: 'Numero', 5: 'Article', 6: 'Personne', 13: 'Publication', 14: 'Rubrique'}
|
27
|
|
- _uid_fieldtype = { 'lodel_id': EditorialModel.fieldtypes.pk.EmFieldType(**{'internal': 'automatic'}) }
|
28
|
|
- _leo_fieldtypes = {
|
29
|
|
- 'creation_date': EditorialModel.fieldtypes.datetime.EmFieldType(**{'now_on_create': True, 'internal': 'automatic'}),
|
30
|
|
- 'string': EditorialModel.fieldtypes.char.EmFieldType(**{'max_length': 128, 'internal': 'automatic'}),
|
31
|
|
- 'modification_date': EditorialModel.fieldtypes.datetime.EmFieldType(**{'now_on_update': True, 'now_on_create': True, 'internal': 'automatic'}),
|
32
|
|
- 'type_id': EditorialModel.fieldtypes.integer.EmFieldType(**{'internal': 'automatic'}),
|
33
|
|
- 'class_id': EditorialModel.fieldtypes.integer.EmFieldType(**{'internal': 'automatic'})
|
34
|
|
- }
|
35
|
|
-
|
36
|
|
-## @brief _LeRelation concret class
|
37
|
|
-# @see leapi.lerelation._LeRelation
|
38
|
|
-class LeRelation(LeCrud, leapi.lerelation._LeRelation):
|
39
|
|
- _uid_fieldtype = { 'id_relation': EditorialModel.fieldtypes.pk.EmFieldType(**{'internal': 'automatic'}) }
|
40
|
|
- _rel_fieldtypes = {
|
41
|
|
- 'rank': EditorialModel.fieldtypes.integer.EmFieldType(**{'internal': 'automatic'}),
|
42
|
|
- 'nature': EditorialModel.fieldtypes.naturerelation.EmFieldType(**{}),
|
43
|
|
- 'depth': EditorialModel.fieldtypes.integer.EmFieldType(**{'internal': 'automatic'})
|
44
|
|
- }
|
45
|
|
- _rel_attr_fieldtypes = dict()
|
46
|
|
-
|
47
|
|
-class LeHierarch(LeRelation, leapi.lerelation._LeHierarch):
|
48
|
|
- _rel_attr_fieldtypes = dict()
|
49
|
|
-
|
50
|
|
-class LeRel2Type(LeRelation, leapi.lerelation._LeRel2Type):
|
51
|
|
- pass
|
52
|
|
-
|
53
|
|
-class LeClass(LeObject, _LeClass):
|
54
|
|
- pass
|
55
|
|
-
|
56
|
|
-class LeType(LeClass, _LeType):
|
57
|
|
- pass
|
58
|
|
-
|
59
|
|
-## @brief EmClass Textes LeClass child class
|
60
|
|
-# @see leapi.leclass.LeClass
|
61
|
|
-class Textes(LeClass, LeObject):
|
62
|
|
- _class_id = 1
|
63
|
|
-
|
64
|
|
-
|
65
|
|
-## @brief EmClass Personnes LeClass child class
|
66
|
|
-# @see leapi.leclass.LeClass
|
67
|
|
-class Personnes(LeClass, LeObject):
|
68
|
|
- _class_id = 2
|
69
|
|
-
|
70
|
|
-
|
71
|
|
-## @brief EmClass Publication LeClass child class
|
72
|
|
-# @see leapi.leclass.LeClass
|
73
|
|
-class Publication(LeClass, LeObject):
|
74
|
|
- _class_id = 13
|
75
|
|
-
|
76
|
|
-
|
77
|
|
-## @brief EmType Article LeType child class
|
78
|
|
-# @see leobject::letype::LeType
|
79
|
|
-class Article(LeType, Textes):
|
80
|
|
- _type_id = 5
|
81
|
|
-
|
82
|
|
-
|
83
|
|
-## @brief EmType Personne LeType child class
|
84
|
|
-# @see leobject::letype::LeType
|
85
|
|
-class Personne(LeType, Personnes):
|
86
|
|
- _type_id = 6
|
87
|
|
-
|
88
|
|
-
|
89
|
|
-## @brief EmType Rubrique LeType child class
|
90
|
|
-# @see leobject::letype::LeType
|
91
|
|
-class Rubrique(LeType, Publication):
|
92
|
|
- _type_id = 14
|
93
|
|
-
|
94
|
|
-
|
95
|
|
-## @brief EmType Numero LeType child class
|
96
|
|
-# @see leobject::letype::LeType
|
97
|
|
-class Numero(LeType, Publication):
|
98
|
|
- _type_id = 19
|
99
|
|
-
|
100
|
|
-
|
101
|
|
-class Rel_textes2personne(LeRel2Type):
|
102
|
|
- _rel_attr_fieldtypes = {
|
103
|
|
- 'adresse': EditorialModel.fieldtypes.char.EmFieldType(**{'uniq': False, 'nullable': True, 'internal': False})
|
104
|
|
-}
|
105
|
|
-
|
106
|
|
-
|
107
|
|
-#Initialisation of Textes class attributes
|
108
|
|
-Textes._fieldtypes = {
|
109
|
|
- 'modification_date': EditorialModel.fieldtypes.datetime.EmFieldType(**{'nullable': False, 'uniq': False, 'now_on_update': True, 'now_on_create': True, 'internal': 'automatic'}),
|
110
|
|
- 'soustitre': EditorialModel.fieldtypes.char.EmFieldType(**{'uniq': False, 'nullable': True, 'internal': False}),
|
111
|
|
- 'string': EditorialModel.fieldtypes.char.EmFieldType(**{'nullable': True, 'uniq': False, 'max_length': 128, 'internal': 'automatic'}),
|
112
|
|
- 'titre': EditorialModel.fieldtypes.char.EmFieldType(**{'uniq': False, 'nullable': True, 'internal': False}),
|
113
|
|
- 'bleu': EditorialModel.fieldtypes.char.EmFieldType(**{'uniq': False, 'nullable': True, 'internal': False}),
|
114
|
|
- 'lodel_id': EditorialModel.fieldtypes.pk.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'}),
|
115
|
|
- 'type_id': EditorialModel.fieldtypes.integer.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'}),
|
116
|
|
- 'class_id': EditorialModel.fieldtypes.integer.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'}),
|
117
|
|
- 'creation_date': EditorialModel.fieldtypes.datetime.EmFieldType(**{'uniq': False, 'nullable': False, 'now_on_create': True, 'internal': 'automatic'})
|
118
|
|
-}
|
119
|
|
-Textes._linked_types = [Personne]
|
120
|
|
-Textes._classtype = 'entity'
|
121
|
|
-
|
122
|
|
-#Initialisation of Personnes class attributes
|
123
|
|
-Personnes._fieldtypes = {
|
124
|
|
- 'nom': EditorialModel.fieldtypes.char.EmFieldType(**{'uniq': False, 'nullable': True, 'internal': False}),
|
125
|
|
- 'age': EditorialModel.fieldtypes.char.EmFieldType(**{'uniq': False, 'nullable': True, 'internal': False}),
|
126
|
|
- 'prenom': EditorialModel.fieldtypes.char.EmFieldType(**{'uniq': False, 'nullable': True, 'internal': False}),
|
127
|
|
- 'string': EditorialModel.fieldtypes.char.EmFieldType(**{'nullable': True, 'uniq': False, 'max_length': 128, 'internal': 'automatic'}),
|
128
|
|
- 'lodel_id': EditorialModel.fieldtypes.pk.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'}),
|
129
|
|
- 'modification_date': EditorialModel.fieldtypes.datetime.EmFieldType(**{'nullable': False, 'uniq': False, 'now_on_update': True, 'now_on_create': True, 'internal': 'automatic'}),
|
130
|
|
- 'type_id': EditorialModel.fieldtypes.integer.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'}),
|
131
|
|
- 'class_id': EditorialModel.fieldtypes.integer.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'}),
|
132
|
|
- 'creation_date': EditorialModel.fieldtypes.datetime.EmFieldType(**{'uniq': False, 'nullable': False, 'now_on_create': True, 'internal': 'automatic'})
|
133
|
|
-}
|
134
|
|
-Personnes._linked_types = []
|
135
|
|
-Personnes._classtype = 'person'
|
136
|
|
-
|
137
|
|
-#Initialisation of Publication class attributes
|
138
|
|
-Publication._fieldtypes = {
|
139
|
|
- 'modification_date': EditorialModel.fieldtypes.datetime.EmFieldType(**{'nullable': False, 'uniq': False, 'now_on_update': True, 'now_on_create': True, 'internal': 'automatic'}),
|
140
|
|
- 'creation_date': EditorialModel.fieldtypes.datetime.EmFieldType(**{'uniq': False, 'nullable': False, 'now_on_create': True, 'internal': 'automatic'}),
|
141
|
|
- 'string': EditorialModel.fieldtypes.char.EmFieldType(**{'nullable': True, 'uniq': False, 'max_length': 128, 'internal': 'automatic'}),
|
142
|
|
- 'lodel_id': EditorialModel.fieldtypes.pk.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'}),
|
143
|
|
- 'titre': EditorialModel.fieldtypes.char.EmFieldType(**{'uniq': False, 'nullable': True, 'internal': False}),
|
144
|
|
- 'type_id': EditorialModel.fieldtypes.integer.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'}),
|
145
|
|
- 'class_id': EditorialModel.fieldtypes.integer.EmFieldType(**{'uniq': False, 'nullable': False, 'internal': 'automatic'})
|
146
|
|
-}
|
147
|
|
-Publication._linked_types = []
|
148
|
|
-Publication._classtype = 'entity'
|
149
|
|
-
|
150
|
|
-#Initialisation of Article class attributes
|
151
|
|
-Article._fields = ['titre', 'class_id', 'soustitre', 'string', 'type_id', 'lodel_id', 'modification_date', 'creation_date']
|
152
|
|
-Article._superiors = {'parent': [Rubrique]}
|
153
|
|
-Article._leclass = Textes
|
154
|
|
-
|
155
|
|
-#Initialisation of Personne class attributes
|
156
|
|
-Personne._fields = ['nom', 'class_id', 'prenom', 'string', 'type_id', 'lodel_id', 'modification_date', 'creation_date']
|
157
|
|
-Personne._superiors = {}
|
158
|
|
-Personne._leclass = Personnes
|
159
|
|
-
|
160
|
|
-#Initialisation of Rubrique class attributes
|
161
|
|
-Rubrique._fields = ['titre', 'class_id', 'string', 'type_id', 'lodel_id', 'modification_date', 'creation_date']
|
162
|
|
-Rubrique._superiors = {'parent': [Rubrique, Numero]}
|
163
|
|
-Rubrique._leclass = Publication
|
164
|
|
-
|
165
|
|
-#Initialisation of Numero class attributes
|
166
|
|
-Numero._fields = ['titre', 'class_id', 'string', 'type_id', 'lodel_id', 'modification_date', 'creation_date']
|
167
|
|
-Numero._superiors = {}
|
168
|
|
-Numero._leclass = Publication
|
169
|
|
-
|
170
|
|
-## @brief Dict for getting LeClass and LeType child classes given an EM uid
|
171
|
|
-LeObject._me_uid = {1: Textes, 2: Personnes, 19: Numero, 5: Article, 6: Personne, 13: Publication, 14: Rubrique}
|