equal
deleted
inserted
replaced
92 entity: the entity from which to extract the key values |
92 entity: the entity from which to extract the key values |
93 """ |
93 """ |
94 |
94 |
95 raise NotImplementedError |
95 raise NotImplementedError |
96 |
96 |
|
97 def getSuffixValues(self, entity): |
|
98 """Returns an array with the public values of the Key Fields |
|
99 |
|
100 Defaults to getKeyValues |
|
101 If any of the Key Fields should not be made public, this method |
|
102 should return their public counterparts instead. |
|
103 |
|
104 Args: |
|
105 entity: the entity for which to construct the suffix |
|
106 """ |
|
107 |
|
108 return self.getKeyValues(entity) |
|
109 |
97 def getKeyValuesFromFields(self, fields): |
110 def getKeyValuesFromFields(self, fields): |
98 """Exctracts the key values from a dict and returns them |
111 """Exctracts the key values from a dict and returns them |
99 |
112 |
100 Args: |
113 Args: |
101 fields: the dict from which to extract the key values |
114 fields: the dict from which to extract the key values |
117 """ |
130 """ |
118 |
131 |
119 if not entity: |
132 if not entity: |
120 return None |
133 return None |
121 |
134 |
122 key_values = self.getKeyValues(entity) |
135 key_values = self.getSuffixValues(entity) |
123 suffix = '/'.join(key_values) |
136 suffix = '/'.join(key_values) |
124 |
137 |
125 return suffix |
138 return suffix |
126 |
139 |
127 def getKeyFieldsFromDict(self, dictionary): |
140 def getKeyFieldsFromDict(self, dictionary): |