Changes for page EOF-Using EOF-EOGenerator
Last modified by Pascal Robert on 2012/01/21 22:03
From version 25.1
edited by Quinton Dolan
on 2007/07/16 22:42
on 2007/07/16 22:42
Change comment:
There is no comment for this version
To version 17.1
edited by David Holt
on 2007/08/14 11:27
on 2007/08/14 11:27
Change comment:
Corrected some slight errors in the code that were created in the transfer from the older Wiki
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. qdolan1 +XWiki.dholt - Content
-
... ... @@ -179,10 +179,18 @@ 179 179 return <$GEN_PREFIX$><$classNameWithoutPackage$>.fetchAll<$classNameWithoutPackage$>s(_editingContext, null); 180 180 } 181 181 182 +{{/code}} 183 + 184 +{{code}} 185 + 182 182 public static NSArray fetchAll<$classNameWithoutPackage$>s(EOEditingContext _editingContext, NSArray _sortOrderings) { 183 183 return <$GEN_PREFIX$><$classNameWithoutPackage$>.fetch<$classNameWithoutPackage$>s(_editingContext, null, _sortOrderings); 184 184 } 185 185 190 +{{/code}} 191 + 192 +{{code}} 193 + 186 186 public static NSArray fetch<$classNameWithoutPackage$>s(EOEditingContext _editingContext, EOQualifier _qualifier, NSArray _sortOrderings) { 187 187 EOFetchSpecification fetchSpec = new EOFetchSpecification(<$GEN_PREFIX$><$classNameWithoutPackage$>.ENTITY_NAME, _qualifier, _sortOrderings); 188 188 fetchSpec.setIsDeep(true); ... ... @@ -190,10 +190,18 @@ 190 190 return eoObjects; 191 191 } 192 192 201 +{{/code}} 202 + 203 +{{code}} 204 + 193 193 public static <$classNameWithoutPackage$> fetch<$classNameWithoutPackage$>(EOEditingContext _editingContext, String _keyName, Object _value) { 194 194 return <$GEN_PREFIX$><$classNameWithoutPackage$>.fetch<$classNameWithoutPackage$>(_editingContext, new EOKeyValueQualifier(_keyName, EOQualifier.QualifierOperatorEqual, _value)); 195 195 } 196 196 209 +{{/code}} 210 + 211 +{{code}} 212 + 197 197 public static <$classNameWithoutPackage$> fetch<$classNameWithoutPackage$>(EOEditingContext _editingContext, EOQualifier _qualifier) { 198 198 NSArray eoObjects = <$GEN_PREFIX$><$classNameWithoutPackage$>.fetch<$classNameWithoutPackage$>s(_editingContext, _qualifier, null); 199 199 <$classNameWithoutPackage$> eoObject; ... ... @@ -209,14 +209,22 @@ 209 209 } 210 210 return eoObject; 211 211 } 212 - 228 + 229 +{{/code}} 230 + 231 +{{code}} 232 + 213 213 public static <$classNameWithoutPackage$> fetchRequired<$classNameWithoutPackage$>(EOEditingContext _editingContext, String _keyName, Object _value) { 214 214 return <$GEN_PREFIX$><$classNameWithoutPackage$>.fetchRequired<$classNameWithoutPackage$>(_editingContext, new EOKeyValueQualifier(_keyName, EOQualifier.QualifierOperatorEqual, _value)); 215 215 } 216 216 237 +{{/code}} 238 + 239 +{{code}} 240 + 217 217 public static <$classNameWithoutPackage$> fetchRequired<$classNameWithoutPackage$>(EOEditingContext _editingContext, EOQualifier _qualifier) { 218 218 <$classNameWithoutPackage$> eoObject = <$GEN_PREFIX$><$classNameWithoutPackage$>.fetch<$classNameWithoutPackage$>(_editingContext, _qualifier); 219 - if (eoObject h1.null) {243 + if (eoObject == null) { 220 220 throw new NoSuchElementException("There was no <$classNameWithoutPackage$> that matched the qualifier '" + _qualifier + "'."); 221 221 } 222 222 return eoObject; ... ... @@ -232,8 +232,12 @@ 232 232 return (<$classNameWithoutPackage$>)EOUtilities.localInstanceOfObject(_editingContext, this); 233 233 } 234 234 259 +{{/code}} 260 + 261 +{{code}} 262 + 235 235 public static <$classNameWithoutPackage$> localInstanceOf<$classNameWithoutPackage$>(EOEditingContext _editingContext, <$classNameWithoutPackage$> _eo) { 236 - return (_eo null) ? null : (<$classNameWithoutPackage$>)EOUtilities.localInstanceOfObject(_editingContext, _eo); 264 + return (_eo == null) ? null : (<$classNameWithoutPackage$>)EOUtilities.localInstanceOfObject(_editingContext, _eo); 237 237 } 238 238 239 239 {{/code}}