|
@@ -71,17 +71,18 @@ class LeType(object):
|
71
|
71
|
# @note equivalent to LeType::delete(this.lodel_id)
|
72
|
72
|
@classinstancemethod
|
73
|
73
|
def delete(self):
|
74
|
|
- pass
|
|
74
|
+ return self.__class__.delete(('lodel_id','=',self.lodel_id))
|
75
|
75
|
|
76
|
76
|
## @brief Delete a LeType from the datasource
|
77
|
|
- # @param lodel_id_l list : List of lodel_id to be deleted
|
|
77
|
+ # @param filters list : List of filters
|
78
|
78
|
# @param cls
|
79
|
79
|
# @return True if deleted False if not existing
|
80
|
80
|
# @throw InvalidArgumentError if invalid parameters
|
81
|
81
|
# @throw Leo exception if the lodel_id identify an object from another type
|
82
|
82
|
@delete.classmethod
|
83
|
|
- def delete(cls, lodel_id_l):
|
|
83
|
+ def delete(cls, filters):
|
84
|
84
|
pass
|
|
85
|
+
|
85
|
86
|
|
86
|
87
|
@classinstancemethod
|
87
|
88
|
## @brief Update a LeType in db
|
|
@@ -96,14 +97,15 @@ class LeType(object):
|
96
|
97
|
pass
|
97
|
98
|
|
98
|
99
|
## @brief Insert a new LeType in the datasource
|
99
|
|
- # @param **datas : A dict containing the datas
|
|
100
|
+ # @param **datas list : A list of dict containing the datas
|
100
|
101
|
# @return The lodel id of the new LeType or False
|
101
|
102
|
# @thorw A leo exception if invalid stuff
|
102
|
103
|
# @throw InvalidArgumentError if invalid argument
|
103
|
104
|
@classmethod
|
104
|
|
- def insert(cls, **datas):
|
105
|
|
- cls.check_datas_or_raise(datas, complete=True)
|
106
|
|
- super(LeType, cls).insert(typename=cls.__name__, **datas)
|
|
105
|
+ def insert(cls, datas):
|
|
106
|
+ for data in datas:
|
|
107
|
+ cls.check_datas_or_raise(data, complete=True)
|
|
108
|
+ super(LeType, cls).insert(letype=cls, datas=datas)
|
107
|
109
|
pass
|
108
|
110
|
|
109
|
111
|
## @brief Check that datas are valid for this type
|