|
@@ -11,12 +11,11 @@
|
11
|
11
|
# @note LeObject will be generated by leapi.lefactory.LeFactory
|
12
|
12
|
|
13
|
13
|
import leapi
|
14
|
|
-from leapi.leclass import LeClass
|
15
|
14
|
from leapi.leobject import LeObjectError
|
16
|
15
|
|
17
|
16
|
## @brief Represent an EmType data instance
|
18
|
17
|
# @note Is not a derivated class of LeClass because the concrete class will be a derivated class from LeClass
|
19
|
|
-class LeType(object):
|
|
18
|
+class _LeType(object):
|
20
|
19
|
|
21
|
20
|
## @brief Stores selected fields with key = name
|
22
|
21
|
_fields = list()
|
|
@@ -193,19 +192,3 @@ class LeType(object):
|
193
|
192
|
def update(cls, filters, datas):
|
194
|
193
|
return leapi.lefactory.LeFactory.leobject().update(letype = cls, filters = filters, datas = datas)
|
195
|
194
|
|
196
|
|
- ## @brief Insert a new LeType in the datasource
|
197
|
|
- # @param **datas list : A list of dict containing the datas
|
198
|
|
- # @return The lodel id of the new LeType or False
|
199
|
|
- # @thorw A leo exception if invalid stuff
|
200
|
|
- # @throw InvalidArgumentError if invalid argument
|
201
|
|
- @classmethod
|
202
|
|
- def insert(cls, datas):
|
203
|
|
- return super(LeType, cls).insert(letype=cls, datas=datas)
|
204
|
|
-
|
205
|
|
- @classmethod
|
206
|
|
- def prepare_datas(cls, datas, complete = False, allow_internal = True):
|
207
|
|
- ret_dats = self.check_datas_value(cls, datas, complete, allow_internal)
|
208
|
|
- ret_datas = self.construct_data(cls, ret_datas)
|
209
|
|
- ret_datas = self.check_data_consistency(cls, ret_datas)
|
210
|
|
- return ret_datas
|
211
|
|
-
|