Commit 9c5e9f57 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

define CategoryMembershipDivergenceTester.generateHashKey().


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31388 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fd309511
......@@ -81,6 +81,20 @@ class CategoryMembershipDivergenceTester(Predicate, DivergenceTesterMixin):
dict(property_name=tested_property))
return None
def generateHashKey(self, movement):
"""
Returns a hash key which can be used to optimise the
matching algorithm between movements. The purpose
of this hash key is to reduce the size of lists of
movements which need to be compared using the compare
method (quadratic complexity).
If decision_movement is a simulation movement, use
the recorded properties instead of the native ones.
"""
return '%s/%s/%r' % (self.getPortalType(), self.getTestedProperty(),
movement.getPropertyList(self.getTestedProperty()))
def getUpdatablePropertyDict(self, prevision_movement, decision_movement):
"""
Returns a list of properties to update on decision_movement
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment