app/soc/logic/models/host.py
changeset 410 2af7f84f4fc7
parent 409 9d24850db88f
child 429 e50e18936f06
--- a/app/soc/logic/models/host.py	Thu Oct 23 05:21:26 2008 +0000
+++ b/app/soc/logic/models/host.py	Thu Oct 23 05:21:41 2008 +0000
@@ -41,5 +41,22 @@
     self._keyName = key_name.nameHost
     self._skip_properties = []
 
+  def getKeyValues(self, entity):
+    """See base.Logic.getKeyNameValues.
+    """
+
+    return [entity.sponsor.link_name, entity.user.link_name]
+
+  def getKeyValuesFromFields(self, fields):
+    """See base.Logic.getKeyValuesFromFields.
+    """
+
+    return [fields['sponsor'].link_name, fields['user'].link_name]
+
+  def getKeyFieldNames(self):
+    """See base.Logic.getKeyFieldNames
+    """
+
+    return ['sponsor_ln', 'user_ln']
 
 logic = Logic()