From: <kel...@us...> - 2010-10-22 15:33:39
|
Revision: 11617 http://wonder.svn.sourceforge.net/wonder/?rev=11617&view=rev Author: kelleherk Date: 2010-10-22 15:33:32 +0000 (Fri, 22 Oct 2010) Log Message: ----------- Freeze the eogen templates so that they don't change from what is in repository everytime I rebuild the workspace since the current WonderEntity templates bundled with WOLips are slightly different to the templates the generation gap files were originally generated with. Modified Paths: -------------- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Resources/ERAttachment.eogen trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERAttachment.java trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERAttachmentData.java trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERDatabaseAttachment.java trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERFileAttachment.java trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERS3Attachment.java Added Paths: ----------- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/WonderEntity.java trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/_WonderEntity.java Added: trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/WonderEntity.java =================================================================== --- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/WonderEntity.java (rev 0) +++ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/WonderEntity.java 2010-10-22 15:33:32 UTC (rev 11617) @@ -0,0 +1,10 @@ +#if ($entity.packageName) +package $entity.packageName; + +#end +import org.apache.log4j.Logger; + +public#if (${entity.abstractEntity}) abstract#end class ${entity.classNameWithoutPackage} extends ${entity.prefixClassNameWithOptionalPackage} { + @SuppressWarnings("unused") + private static Logger log = Logger.getLogger(${entity.classNameWithoutPackage}.class); +} Added: trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/_WonderEntity.java =================================================================== --- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/_WonderEntity.java (rev 0) +++ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/EOTemplates/_WonderEntity.java 2010-10-22 15:33:32 UTC (rev 11617) @@ -0,0 +1,346 @@ +// DO NOT EDIT. Make changes to ${entity.classNameWithOptionalPackage}.java instead. +#if ($entity.superclassPackageName) +package $entity.superclassPackageName; + +#end +import com.webobjects.eoaccess.*; +import com.webobjects.eocontrol.*; +import com.webobjects.foundation.*; +import java.math.*; +import java.util.*; +import org.apache.log4j.Logger; + +import er.extensions.eof.*; +import er.extensions.foundation.*; + +@SuppressWarnings("all") +public abstract class ${entity.prefixClassNameWithoutPackage} extends #if ($entity.parentClassNameSet)${entity.parentClassName}#elseif ($entity.partialEntitySet)er.extensions.partials.ERXPartial<${entity.partialEntity.className}>#elseif ($entity.parentSet)${entity.parent.classNameWithDefault}#elseif ($EOGenericRecord)${EOGenericRecord}#else ERXGenericRecord#end { +#if ($entity.partialEntitySet) + public static final String ENTITY_NAME = "$entity.partialEntity.name"; +#else + public static final String ENTITY_NAME = "$entity.name"; +#end + + // Attribute Keys +#foreach ($attribute in $entity.sortedClassAttributes) + public static final ERXKey<$attribute.javaClassName> ${attribute.uppercaseUnderscoreName} = new ERXKey<$attribute.javaClassName>("$attribute.name"); +#end + // Relationship Keys +#foreach ($relationship in $entity.sortedClassRelationships) + public static final ERXKey<$relationship.actualDestination.classNameWithDefault> ${relationship.uppercaseUnderscoreName} = new ERXKey<$relationship.actualDestination.classNameWithDefault>("$relationship.name"); +#end + + // Attributes +#foreach ($attribute in $entity.sortedClassAttributes) + public static final String ${attribute.uppercaseUnderscoreName}_KEY = ${attribute.uppercaseUnderscoreName}.key(); +#end + // Relationships +#foreach ($relationship in $entity.sortedClassRelationships) + public static final String ${relationship.uppercaseUnderscoreName}_KEY = ${relationship.uppercaseUnderscoreName}.key(); +#end + + private static Logger LOG = Logger.getLogger(${entity.prefixClassNameWithoutPackage}.class); + +#if (!$entity.partialEntitySet) + public $entity.classNameWithOptionalPackage localInstanceIn(EOEditingContext editingContext) { + $entity.classNameWithOptionalPackage localInstance = ($entity.classNameWithOptionalPackage)EOUtilities.localInstanceOfObject(editingContext, this); + if (localInstance == null) { + throw new IllegalStateException("You attempted to localInstance " + this + ", which has not yet committed."); + } + return localInstance; + } + +#end +#foreach ($attribute in $entity.sortedClassAttributes) +#if (!$attribute.inherited) +#if ($attribute.userInfo.ERXConstantClassName) + public $attribute.userInfo.ERXConstantClassName ${attribute.name}() { + Number value = (Number)storedValueForKey(${entity.prefixClassNameWithoutPackage}.${attribute.uppercaseUnderscoreName}_KEY); + return ($attribute.userInfo.ERXConstantClassName)value; + } + + public void set${attribute.capitalizedName}($attribute.userInfo.ERXConstantClassName value) { + takeStoredValueForKey(value, ${entity.prefixClassNameWithoutPackage}.${attribute.uppercaseUnderscoreName}_KEY); + } +#else + public $attribute.javaClassName ${attribute.name}() { + return ($attribute.javaClassName) storedValueForKey(${entity.prefixClassNameWithoutPackage}.${attribute.uppercaseUnderscoreName}_KEY); + } + + public void set${attribute.capitalizedName}($attribute.javaClassName value) { + if (${entity.prefixClassNameWithoutPackage}.LOG.isDebugEnabled()) { + ${entity.prefixClassNameWithoutPackage}.LOG.debug( "updating $attribute.name from " + ${attribute.name}() + " to " + value); + } + takeStoredValueForKey(value, ${entity.prefixClassNameWithoutPackage}.${attribute.uppercaseUnderscoreName}_KEY); + } +#end + +#end +#end +#foreach ($relationship in $entity.sortedClassToOneRelationships) +#if (!$relationship.inherited) + public $relationship.actualDestination.classNameWithDefault ${relationship.name}() { + return ($relationship.actualDestination.classNameWithDefault)storedValueForKey(${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + + public void set${relationship.capitalizedName}($relationship.actualDestination.classNameWithDefault value) { + takeStoredValueForKey(value, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + + public void set${relationship.capitalizedName}Relationship($relationship.actualDestination.classNameWithDefault value) { + if (${entity.prefixClassNameWithoutPackage}.LOG.isDebugEnabled()) { + ${entity.prefixClassNameWithoutPackage}.LOG.debug("updating $relationship.name from " + ${relationship.name}() + " to " + value); + } + if (er.extensions.eof.ERXGenericRecord.InverseRelationshipUpdater.updateInverseRelationships()) { + set${relationship.capitalizedName}(value); + } + else if (value == null) { + $relationship.actualDestination.classNameWithDefault oldValue = ${relationship.name}(); + if (oldValue != null) { + removeObjectFromBothSidesOfRelationshipWithKey(oldValue, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + } else { + addObjectToBothSidesOfRelationshipWithKey(value, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + } + +#end +#end +#foreach ($relationship in $entity.sortedClassToManyRelationships) +#if (!$relationship.inherited) + public NSArray<${relationship.actualDestination.classNameWithDefault}> ${relationship.name}() { + return (NSArray<${relationship.actualDestination.classNameWithDefault}>)storedValueForKey(${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + +#if (!$relationship.inverseRelationship || $relationship.flattened || !$relationship.inverseRelationship.classProperty) + public NSArray<${relationship.actualDestination.classNameWithDefault}> ${relationship.name}(EOQualifier qualifier) { + return ${relationship.name}(qualifier, null); + } +#else + public NSArray<${relationship.actualDestination.classNameWithDefault}> ${relationship.name}(EOQualifier qualifier) { + return ${relationship.name}(qualifier, null, false); + } + + public NSArray<${relationship.actualDestination.classNameWithDefault}> ${relationship.name}(EOQualifier qualifier, boolean fetch) { + return ${relationship.name}(qualifier, null, fetch); + } +#end + + public NSArray<${relationship.actualDestination.classNameWithDefault}> ${relationship.name}(EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings#if ($relationship.inverseRelationship && !$relationship.flattened && $relationship.inverseRelationship.classProperty), boolean fetch#end) { + NSArray<${relationship.actualDestination.classNameWithDefault}> results; +#if ($relationship.inverseRelationship && !$relationship.flattened && $relationship.inverseRelationship.classProperty) + if (fetch) { + EOQualifier fullQualifier; +#if (${relationship.actualDestination.genericRecord}) + EOQualifier inverseQualifier = new EOKeyValueQualifier("${relationship.inverseRelationship.name}", EOQualifier.QualifierOperatorEqual, this); +#else + EOQualifier inverseQualifier = new EOKeyValueQualifier(${relationship.actualDestination.classNameWithDefault}.${relationship.inverseRelationship.uppercaseUnderscoreName}_KEY, EOQualifier.QualifierOperatorEqual, this); +#end + + if (qualifier == null) { + fullQualifier = inverseQualifier; + } + else { + NSMutableArray<EOQualifier> qualifiers = new NSMutableArray<EOQualifier>(); + qualifiers.addObject(qualifier); + qualifiers.addObject(inverseQualifier); + fullQualifier = new EOAndQualifier(qualifiers); + } + +#if (${relationship.actualDestination.genericRecord}) + EOFetchSpecification fetchSpec = new EOFetchSpecification("${relationship.actualDestination.name}", qualifier, sortOrderings); + fetchSpec.setIsDeep(true); + results = (NSArray<${relationship.actualDestination.classNameWithDefault}>)editingContext().objectsWithFetchSpecification(fetchSpec); +#else + results = ${relationship.actualDestination.classNameWithDefault}.fetch${relationship.actualDestination.pluralName}(editingContext(), fullQualifier, sortOrderings); +#end + } + else { +#end + results = ${relationship.name}(); + if (qualifier != null) { + results = (NSArray<${relationship.actualDestination.classNameWithDefault}>)EOQualifier.filteredArrayWithQualifier(results, qualifier); + } + if (sortOrderings != null) { + results = (NSArray<${relationship.actualDestination.classNameWithDefault}>)EOSortOrdering.sortedArrayUsingKeyOrderArray(results, sortOrderings); + } +#if ($relationship.inverseRelationship && !$relationship.flattened && $relationship.inverseRelationship.classProperty) + } +#end + return results; + } + + public void addTo${relationship.capitalizedName}($relationship.actualDestination.classNameWithDefault object) { + includeObjectIntoPropertyWithKey(object, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + + public void removeFrom${relationship.capitalizedName}($relationship.actualDestination.classNameWithDefault object) { + excludeObjectFromPropertyWithKey(object, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + + public void addTo${relationship.capitalizedName}Relationship($relationship.actualDestination.classNameWithDefault object) { + if (${entity.prefixClassNameWithoutPackage}.LOG.isDebugEnabled()) { + ${entity.prefixClassNameWithoutPackage}.LOG.debug("adding " + object + " to ${relationship.name} relationship"); + } + if (er.extensions.eof.ERXGenericRecord.InverseRelationshipUpdater.updateInverseRelationships()) { + addTo${relationship.capitalizedName}(object); + } + else { + addObjectToBothSidesOfRelationshipWithKey(object, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + } + + public void removeFrom${relationship.capitalizedName}Relationship($relationship.actualDestination.classNameWithDefault object) { + if (${entity.prefixClassNameWithoutPackage}.LOG.isDebugEnabled()) { + ${entity.prefixClassNameWithoutPackage}.LOG.debug("removing " + object + " from ${relationship.name} relationship"); + } + if (er.extensions.eof.ERXGenericRecord.InverseRelationshipUpdater.updateInverseRelationships()) { + removeFrom${relationship.capitalizedName}(object); + } + else { + removeObjectFromBothSidesOfRelationshipWithKey(object, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + } + } + + public $relationship.actualDestination.classNameWithDefault create${relationship.capitalizedName}Relationship() { + EOClassDescription eoClassDesc = EOClassDescription.classDescriptionForEntityName(#if(${relationship.actualDestination.genericRecord})"${relationship.actualDestination.name}"#else ${relationship.actualDestination.classNameWithDefault}.ENTITY_NAME #end); + EOEnterpriseObject eo = eoClassDesc.createInstanceWithEditingContext(editingContext(), null); + editingContext().insertObject(eo); + addObjectToBothSidesOfRelationshipWithKey(eo, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); + return ($relationship.actualDestination.classNameWithDefault) eo; + } + + public void delete${relationship.capitalizedName}Relationship($relationship.actualDestination.classNameWithDefault object) { + removeObjectFromBothSidesOfRelationshipWithKey(object, ${entity.prefixClassNameWithoutPackage}.${relationship.uppercaseUnderscoreName}_KEY); +#if (!$relationship.ownsDestination) + editingContext().deleteObject(object); +#end + } + + public void deleteAll${relationship.capitalizedName}Relationships() { + Enumeration<$relationship.actualDestination.classNameWithDefault> objects = ${relationship.name}().immutableClone().objectEnumerator(); + while (objects.hasMoreElements()) { + delete${relationship.capitalizedName}Relationship(objects.nextElement()); + } + } + +#end +#end + + public #if (!$entity.partialEntitySet)static #end${entity.classNameWithOptionalPackage}#if (!$entity.partialEntitySet) create#else init#end${entity.name}(EOEditingContext editingContext#foreach ($attribute in $entity.sortedClassAttributes) +#if (!$attribute.allowsNull) +#set ($restrictingQualifierKey = 'false') +#foreach ($qualifierKey in $entity.restrictingQualifierKeys)#if ($attribute.name == $qualifierKey)#set ($restrictingQualifierKey = 'true')#end#end +#if ($restrictingQualifierKey == 'false') +#if ($attribute.userInfo.ERXConstantClassName), ${attribute.userInfo.ERXConstantClassName}#else, ${attribute.javaClassName}#end ${attribute.name} +#end +#end +#end +#foreach ($relationship in $entity.sortedClassToOneRelationships) +#if ($relationship.mandatory && !($relationship.ownsDestination && $relationship.propagatesPrimaryKey)), ${relationship.actualDestination.classNameWithDefault} ${relationship.name}#end +#end +) { + ${entity.classNameWithOptionalPackage} eo = (${entity.classNameWithOptionalPackage})#if ($entity.partialEntitySet)this;#else EOUtilities.createAndInsertInstance(editingContext, ${entity.prefixClassNameWithoutPackage}.ENTITY_NAME);#end + +#foreach ($attribute in $entity.sortedClassAttributes) +#if (!$attribute.allowsNull) +#set ($restrictingQualifierKey = 'false') +#foreach ($qualifierKey in $entity.restrictingQualifierKeys) +#if ($attribute.name == $qualifierKey) +#set ($restrictingQualifierKey = 'true') +#end +#end +#if ($restrictingQualifierKey == 'false') + eo.set${attribute.capitalizedName}(${attribute.name}); +#end +#end +#end +#foreach ($relationship in $entity.sortedClassToOneRelationships) +#if ($relationship.mandatory && !($relationship.ownsDestination && $relationship.propagatesPrimaryKey)) + eo.set${relationship.capitalizedName}Relationship(${relationship.name}); +#end +#end + return eo; + } +#if (!$entity.partialEntitySet) + + public static NSArray<${entity.classNameWithOptionalPackage}> fetchAll${entity.pluralName}(EOEditingContext editingContext) { + return ${entity.prefixClassNameWithoutPackage}.fetchAll${entity.pluralName}(editingContext, null); + } + + public static NSArray<${entity.classNameWithOptionalPackage}> fetchAll${entity.pluralName}(EOEditingContext editingContext, NSArray<EOSortOrdering> sortOrderings) { + return ${entity.prefixClassNameWithoutPackage}.fetch${entity.pluralName}(editingContext, null, sortOrderings); + } + + public static NSArray<${entity.classNameWithOptionalPackage}> fetch${entity.pluralName}(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { + ERXFetchSpecification<${entity.classNameWithOptionalPackage}> fetchSpec = new ERXFetchSpecification<${entity.classNameWithOptionalPackage}>(${entity.prefixClassNameWithoutPackage}.ENTITY_NAME, qualifier, sortOrderings); + fetchSpec.setIsDeep(true); + NSArray<${entity.classNameWithOptionalPackage}> eoObjects = fetchSpec.fetchObjects(editingContext); + return eoObjects; + } + + public static ${entity.classNameWithOptionalPackage} fetch${entity.name}(EOEditingContext editingContext, String keyName, Object value) { + return ${entity.prefixClassNameWithoutPackage}.fetch${entity.name}(editingContext, new EOKeyValueQualifier(keyName, EOQualifier.QualifierOperatorEqual, value)); + } + + public static ${entity.classNameWithOptionalPackage} fetch${entity.name}(EOEditingContext editingContext, EOQualifier qualifier) { + NSArray<${entity.classNameWithOptionalPackage}> eoObjects = ${entity.prefixClassNameWithoutPackage}.fetch${entity.pluralName}(editingContext, qualifier, null); + ${entity.classNameWithOptionalPackage} eoObject; + int count = eoObjects.count(); + if (count == 0) { + eoObject = null; + } + else if (count == 1) { + eoObject = eoObjects.objectAtIndex(0); + } + else { + throw new IllegalStateException("There was more than one ${entity.name} that matched the qualifier '" + qualifier + "'."); + } + return eoObject; + } + + public static ${entity.classNameWithOptionalPackage} fetchRequired${entity.name}(EOEditingContext editingContext, String keyName, Object value) { + return ${entity.prefixClassNameWithoutPackage}.fetchRequired${entity.name}(editingContext, new EOKeyValueQualifier(keyName, EOQualifier.QualifierOperatorEqual, value)); + } + + public static ${entity.classNameWithOptionalPackage} fetchRequired${entity.name}(EOEditingContext editingContext, EOQualifier qualifier) { + ${entity.classNameWithOptionalPackage} eoObject = ${entity.prefixClassNameWithoutPackage}.fetch${entity.name}(editingContext, qualifier); + if (eoObject == null) { + throw new NoSuchElementException("There was no ${entity.name} that matched the qualifier '" + qualifier + "'."); + } + return eoObject; + } + + public static ${entity.classNameWithOptionalPackage} localInstanceIn(EOEditingContext editingContext, ${entity.classNameWithOptionalPackage} eo) { + ${entity.classNameWithOptionalPackage} localInstance = (eo == null) ? null : ERXEOControlUtilities.localInstanceOfObject(editingContext, eo); + if (localInstance == null && eo != null) { + throw new IllegalStateException("You attempted to localInstance " + eo + ", which has not yet committed."); + } + return localInstance; + } +#end +#foreach ($fetchSpecification in $entity.sortedFetchSpecs) +#if (true || $fetchSpecification.distinctBindings.size() > 0) + public static NSArray#if ($fetchSpecification.fetchEnterpriseObjects)<${entity.className}>#else<NSDictionary>#end fetch${fetchSpecification.capitalizedName}(EOEditingContext editingContext, NSDictionary<String, Object> bindings) { + EOFetchSpecification fetchSpec = EOFetchSpecification.fetchSpecificationNamed("${fetchSpecification.name}", ${entity.prefixClassNameWithoutPackage}.ENTITY_NAME); + fetchSpec = fetchSpec.fetchSpecificationWithQualifierBindings(bindings); + return (NSArray#if ($fetchSpecification.fetchEnterpriseObjects)<${entity.className}>#else<NSDictionary>#end)editingContext.objectsWithFetchSpecification(fetchSpec); + } + +#end + public static NSArray#if ($fetchSpecification.fetchEnterpriseObjects)<${entity.className}>#else<NSDictionary>#end fetch${fetchSpecification.capitalizedName}(EOEditingContext editingContext#foreach ($binding in $fetchSpecification.distinctBindings), + ${binding.attributePath.childClassName} ${binding.name}Binding#end) + { + EOFetchSpecification fetchSpec = EOFetchSpecification.fetchSpecificationNamed("${fetchSpecification.name}", ${entity.prefixClassNameWithoutPackage}.ENTITY_NAME); +#if ($fetchSpecification.distinctBindings.size() > 0) + NSMutableDictionary<String, Object> bindings = new NSMutableDictionary<String, Object>(); +#foreach ($binding in $fetchSpecification.distinctBindings) + bindings.takeValueForKey(${binding.name}Binding, "${binding.name}"); +#end + fetchSpec = fetchSpec.fetchSpecificationWithQualifierBindings(bindings); +#end + return (NSArray#if ($fetchSpecification.fetchEnterpriseObjects)<${entity.className}>#else<NSDictionary>#end)editingContext.objectsWithFetchSpecification(fetchSpec); + } + +#end +} Modified: trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Resources/ERAttachment.eogen =================================================================== --- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Resources/ERAttachment.eogen 2010-10-22 15:33:05 UTC (rev 11616) +++ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Resources/ERAttachment.eogen 2010-10-22 15:33:32 UTC (rev 11617) @@ -1 +1 @@ - -destination Sources -java -javaTemplate _WonderEntity.java -model Resources/ERAttachment.eomodeld -packagedirs -subclassDestination Sources -subclassJavaTemplate WonderEntity.java -verbose -loadModelGroup -define-EOGenericRecord er.extensions.eof.ERXGenericRecord \ No newline at end of file + -destination Sources -extension java -java -javaTemplate _WonderEntity.java -model Resources/ERAttachment.eomodeld -packagedirs -subclassDestination Sources -subclassJavaTemplate WonderEntity.java -templatedir EOTemplates -verbose -loadModelGroup -define-EOGenericRecord er.extensions.eof.ERXGenericRecord \ No newline at end of file Modified: trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERAttachment.java =================================================================== --- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERAttachment.java 2010-10-22 15:33:05 UTC (rev 11616) +++ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERAttachment.java 2010-10-22 15:33:32 UTC (rev 11617) @@ -1,4 +1,4 @@ -// $LastChangedRevision: 4733 $ DO NOT EDIT. Make changes to ERAttachment.java instead. +// DO NOT EDIT. Make changes to ERAttachment.java instead. package er.attachment.model; import com.webobjects.eoaccess.*; @@ -62,154 +62,154 @@ } public Boolean available() { - return (Boolean) storedValueForKey("available"); + return (Boolean) storedValueForKey(_ERAttachment.AVAILABLE_KEY); } public void setAvailable(Boolean value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating available from " + available() + " to " + value); } - takeStoredValueForKey(value, "available"); + takeStoredValueForKey(value, _ERAttachment.AVAILABLE_KEY); } public String configurationName() { - return (String) storedValueForKey("configurationName"); + return (String) storedValueForKey(_ERAttachment.CONFIGURATION_NAME_KEY); } public void setConfigurationName(String value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating configurationName from " + configurationName() + " to " + value); } - takeStoredValueForKey(value, "configurationName"); + takeStoredValueForKey(value, _ERAttachment.CONFIGURATION_NAME_KEY); } public NSTimestamp creationDate() { - return (NSTimestamp) storedValueForKey("creationDate"); + return (NSTimestamp) storedValueForKey(_ERAttachment.CREATION_DATE_KEY); } public void setCreationDate(NSTimestamp value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating creationDate from " + creationDate() + " to " + value); } - takeStoredValueForKey(value, "creationDate"); + takeStoredValueForKey(value, _ERAttachment.CREATION_DATE_KEY); } public Integer height() { - return (Integer) storedValueForKey("height"); + return (Integer) storedValueForKey(_ERAttachment.HEIGHT_KEY); } public void setHeight(Integer value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating height from " + height() + " to " + value); } - takeStoredValueForKey(value, "height"); + takeStoredValueForKey(value, _ERAttachment.HEIGHT_KEY); } public String mimeType() { - return (String) storedValueForKey("mimeType"); + return (String) storedValueForKey(_ERAttachment.MIME_TYPE_KEY); } public void setMimeType(String value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating mimeType from " + mimeType() + " to " + value); } - takeStoredValueForKey(value, "mimeType"); + takeStoredValueForKey(value, _ERAttachment.MIME_TYPE_KEY); } public String originalFileName() { - return (String) storedValueForKey("originalFileName"); + return (String) storedValueForKey(_ERAttachment.ORIGINAL_FILE_NAME_KEY); } public void setOriginalFileName(String value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating originalFileName from " + originalFileName() + " to " + value); } - takeStoredValueForKey(value, "originalFileName"); + takeStoredValueForKey(value, _ERAttachment.ORIGINAL_FILE_NAME_KEY); } public String ownerID() { - return (String) storedValueForKey("ownerID"); + return (String) storedValueForKey(_ERAttachment.OWNER_ID_KEY); } public void setOwnerID(String value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating ownerID from " + ownerID() + " to " + value); } - takeStoredValueForKey(value, "ownerID"); + takeStoredValueForKey(value, _ERAttachment.OWNER_ID_KEY); } public Boolean proxied() { - return (Boolean) storedValueForKey("proxied"); + return (Boolean) storedValueForKey(_ERAttachment.PROXIED_KEY); } public void setProxied(Boolean value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating proxied from " + proxied() + " to " + value); } - takeStoredValueForKey(value, "proxied"); + takeStoredValueForKey(value, _ERAttachment.PROXIED_KEY); } public Integer size() { - return (Integer) storedValueForKey("size"); + return (Integer) storedValueForKey(_ERAttachment.SIZE_KEY); } public void setSize(Integer value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating size from " + size() + " to " + value); } - takeStoredValueForKey(value, "size"); + takeStoredValueForKey(value, _ERAttachment.SIZE_KEY); } public String storageType() { - return (String) storedValueForKey("storageType"); + return (String) storedValueForKey(_ERAttachment.STORAGE_TYPE_KEY); } public void setStorageType(String value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating storageType from " + storageType() + " to " + value); } - takeStoredValueForKey(value, "storageType"); + takeStoredValueForKey(value, _ERAttachment.STORAGE_TYPE_KEY); } public String thumbnail() { - return (String) storedValueForKey("thumbnail"); + return (String) storedValueForKey(_ERAttachment.THUMBNAIL_KEY); } public void setThumbnail(String value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating thumbnail from " + thumbnail() + " to " + value); } - takeStoredValueForKey(value, "thumbnail"); + takeStoredValueForKey(value, _ERAttachment.THUMBNAIL_KEY); } public String webPath() { - return (String) storedValueForKey("webPath"); + return (String) storedValueForKey(_ERAttachment.WEB_PATH_KEY); } public void setWebPath(String value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating webPath from " + webPath() + " to " + value); } - takeStoredValueForKey(value, "webPath"); + takeStoredValueForKey(value, _ERAttachment.WEB_PATH_KEY); } public Integer width() { - return (Integer) storedValueForKey("width"); + return (Integer) storedValueForKey(_ERAttachment.WIDTH_KEY); } public void setWidth(Integer value) { if (_ERAttachment.LOG.isDebugEnabled()) { _ERAttachment.LOG.debug( "updating width from " + width() + " to " + value); } - takeStoredValueForKey(value, "width"); + takeStoredValueForKey(value, _ERAttachment.WIDTH_KEY); } public er.attachment.model.ERAttachment parentAttachment() { - return (er.attachment.model.ERAttachment)storedValueForKey("parentAttachment"); + return (er.attachment.model.ERAttachment)storedValueForKey(_ERAttachment.PARENT_ATTACHMENT_KEY); } public void setParentAttachment(er.attachment.model.ERAttachment value) { - takeStoredValueForKey(value, "parentAttachment"); + takeStoredValueForKey(value, _ERAttachment.PARENT_ATTACHMENT_KEY); } public void setParentAttachmentRelationship(er.attachment.model.ERAttachment value) { @@ -222,15 +222,15 @@ else if (value == null) { er.attachment.model.ERAttachment oldValue = parentAttachment(); if (oldValue != null) { - removeObjectFromBothSidesOfRelationshipWithKey(oldValue, "parentAttachment"); + removeObjectFromBothSidesOfRelationshipWithKey(oldValue, _ERAttachment.PARENT_ATTACHMENT_KEY); } } else { - addObjectToBothSidesOfRelationshipWithKey(value, "parentAttachment"); + addObjectToBothSidesOfRelationshipWithKey(value, _ERAttachment.PARENT_ATTACHMENT_KEY); } } public NSArray<er.attachment.model.ERAttachment> childrenAttachments() { - return (NSArray<er.attachment.model.ERAttachment>)storedValueForKey("childrenAttachments"); + return (NSArray<er.attachment.model.ERAttachment>)storedValueForKey(_ERAttachment.CHILDREN_ATTACHMENTS_KEY); } public NSArray<er.attachment.model.ERAttachment> childrenAttachments(EOQualifier qualifier) { @@ -251,7 +251,7 @@ fullQualifier = inverseQualifier; } else { - NSMutableArray qualifiers = new NSMutableArray(); + NSMutableArray<EOQualifier> qualifiers = new NSMutableArray<EOQualifier>(); qualifiers.addObject(qualifier); qualifiers.addObject(inverseQualifier); fullQualifier = new EOAndQualifier(qualifiers); @@ -272,11 +272,11 @@ } public void addToChildrenAttachments(er.attachment.model.ERAttachment object) { - includeObjectIntoPropertyWithKey(object, "childrenAttachments"); + includeObjectIntoPropertyWithKey(object, _ERAttachment.CHILDREN_ATTACHMENTS_KEY); } public void removeFromChildrenAttachments(er.attachment.model.ERAttachment object) { - excludeObjectFromPropertyWithKey(object, "childrenAttachments"); + excludeObjectFromPropertyWithKey(object, _ERAttachment.CHILDREN_ATTACHMENTS_KEY); } public void addToChildrenAttachmentsRelationship(er.attachment.model.ERAttachment object) { @@ -287,7 +287,7 @@ addToChildrenAttachments(object); } else { - addObjectToBothSidesOfRelationshipWithKey(object, "childrenAttachments"); + addObjectToBothSidesOfRelationshipWithKey(object, _ERAttachment.CHILDREN_ATTACHMENTS_KEY); } } @@ -299,27 +299,27 @@ removeFromChildrenAttachments(object); } else { - removeObjectFromBothSidesOfRelationshipWithKey(object, "childrenAttachments"); + removeObjectFromBothSidesOfRelationshipWithKey(object, _ERAttachment.CHILDREN_ATTACHMENTS_KEY); } } public er.attachment.model.ERAttachment createChildrenAttachmentsRelationship() { - EOClassDescription eoClassDesc = EOClassDescription.classDescriptionForEntityName("ERAttachment"); + EOClassDescription eoClassDesc = EOClassDescription.classDescriptionForEntityName( er.attachment.model.ERAttachment.ENTITY_NAME ); EOEnterpriseObject eo = eoClassDesc.createInstanceWithEditingContext(editingContext(), null); editingContext().insertObject(eo); - addObjectToBothSidesOfRelationshipWithKey(eo, "childrenAttachments"); + addObjectToBothSidesOfRelationshipWithKey(eo, _ERAttachment.CHILDREN_ATTACHMENTS_KEY); return (er.attachment.model.ERAttachment) eo; } public void deleteChildrenAttachmentsRelationship(er.attachment.model.ERAttachment object) { - removeObjectFromBothSidesOfRelationshipWithKey(object, "childrenAttachments"); + removeObjectFromBothSidesOfRelationshipWithKey(object, _ERAttachment.CHILDREN_ATTACHMENTS_KEY); editingContext().deleteObject(object); } public void deleteAllChildrenAttachmentsRelationships() { - Enumeration objects = childrenAttachments().immutableClone().objectEnumerator(); + Enumeration<er.attachment.model.ERAttachment> objects = childrenAttachments().immutableClone().objectEnumerator(); while (objects.hasMoreElements()) { - deleteChildrenAttachmentsRelationship((er.attachment.model.ERAttachment)objects.nextElement()); + deleteChildrenAttachmentsRelationship(objects.nextElement()); } } @@ -352,9 +352,9 @@ } public static NSArray<ERAttachment> fetchERAttachments(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { - EOFetchSpecification fetchSpec = new EOFetchSpecification(_ERAttachment.ENTITY_NAME, qualifier, sortOrderings); + ERXFetchSpecification<ERAttachment> fetchSpec = new ERXFetchSpecification<ERAttachment>(_ERAttachment.ENTITY_NAME, qualifier, sortOrderings); fetchSpec.setIsDeep(true); - NSArray<ERAttachment> eoObjects = (NSArray<ERAttachment>)editingContext.objectsWithFetchSpecification(fetchSpec); + NSArray<ERAttachment> eoObjects = fetchSpec.fetchObjects(editingContext); return eoObjects; } @@ -370,7 +370,7 @@ eoObject = null; } else if (count == 1) { - eoObject = (ERAttachment)eoObjects.objectAtIndex(0); + eoObject = eoObjects.objectAtIndex(0); } else { throw new IllegalStateException("There was more than one ERAttachment that matched the qualifier '" + qualifier + "'."); @@ -391,7 +391,7 @@ } public static ERAttachment localInstanceIn(EOEditingContext editingContext, ERAttachment eo) { - ERAttachment localInstance = (eo == null) ? null : (ERAttachment)EOUtilities.localInstanceOfObject(editingContext, eo); + ERAttachment localInstance = (eo == null) ? null : ERXEOControlUtilities.localInstanceOfObject(editingContext, eo); if (localInstance == null && eo != null) { throw new IllegalStateException("You attempted to localInstance " + eo + ", which has not yet committed."); } Modified: trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERAttachmentData.java =================================================================== --- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERAttachmentData.java 2010-10-22 15:33:05 UTC (rev 11616) +++ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERAttachmentData.java 2010-10-22 15:33:32 UTC (rev 11617) @@ -1,4 +1,4 @@ -// $LastChangedRevision: 4733 $ DO NOT EDIT. Make changes to ERAttachmentData.java instead. +// DO NOT EDIT. Make changes to ERAttachmentData.java instead. package er.attachment.model; import com.webobjects.eoaccess.*; @@ -34,14 +34,14 @@ } public NSData data() { - return (NSData) storedValueForKey("data"); + return (NSData) storedValueForKey(_ERAttachmentData.DATA_KEY); } public void setData(NSData value) { if (_ERAttachmentData.LOG.isDebugEnabled()) { _ERAttachmentData.LOG.debug( "updating data from " + data() + " to " + value); } - takeStoredValueForKey(value, "data"); + takeStoredValueForKey(value, _ERAttachmentData.DATA_KEY); } @@ -59,9 +59,9 @@ } public static NSArray<ERAttachmentData> fetchERAttachmentDatas(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { - EOFetchSpecification fetchSpec = new EOFetchSpecification(_ERAttachmentData.ENTITY_NAME, qualifier, sortOrderings); + ERXFetchSpecification<ERAttachmentData> fetchSpec = new ERXFetchSpecification<ERAttachmentData>(_ERAttachmentData.ENTITY_NAME, qualifier, sortOrderings); fetchSpec.setIsDeep(true); - NSArray<ERAttachmentData> eoObjects = (NSArray<ERAttachmentData>)editingContext.objectsWithFetchSpecification(fetchSpec); + NSArray<ERAttachmentData> eoObjects = fetchSpec.fetchObjects(editingContext); return eoObjects; } @@ -77,7 +77,7 @@ eoObject = null; } else if (count == 1) { - eoObject = (ERAttachmentData)eoObjects.objectAtIndex(0); + eoObject = eoObjects.objectAtIndex(0); } else { throw new IllegalStateException("There was more than one ERAttachmentData that matched the qualifier '" + qualifier + "'."); @@ -98,7 +98,7 @@ } public static ERAttachmentData localInstanceIn(EOEditingContext editingContext, ERAttachmentData eo) { - ERAttachmentData localInstance = (eo == null) ? null : (ERAttachmentData)EOUtilities.localInstanceOfObject(editingContext, eo); + ERAttachmentData localInstance = (eo == null) ? null : ERXEOControlUtilities.localInstanceOfObject(editingContext, eo); if (localInstance == null && eo != null) { throw new IllegalStateException("You attempted to localInstance " + eo + ", which has not yet committed."); } Modified: trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERDatabaseAttachment.java =================================================================== --- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERDatabaseAttachment.java 2010-10-22 15:33:05 UTC (rev 11616) +++ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERDatabaseAttachment.java 2010-10-22 15:33:32 UTC (rev 11617) @@ -1,4 +1,4 @@ -// $LastChangedRevision: 4733 $ DO NOT EDIT. Make changes to ERDatabaseAttachment.java instead. +// DO NOT EDIT. Make changes to ERDatabaseAttachment.java instead. package er.attachment.model; import com.webobjects.eoaccess.*; @@ -66,22 +66,22 @@ } public NSData smallData() { - return (NSData) storedValueForKey("smallData"); + return (NSData) storedValueForKey(_ERDatabaseAttachment.SMALL_DATA_KEY); } public void setSmallData(NSData value) { if (_ERDatabaseAttachment.LOG.isDebugEnabled()) { _ERDatabaseAttachment.LOG.debug( "updating smallData from " + smallData() + " to " + value); } - takeStoredValueForKey(value, "smallData"); + takeStoredValueForKey(value, _ERDatabaseAttachment.SMALL_DATA_KEY); } public er.attachment.model.ERAttachmentData attachmentData() { - return (er.attachment.model.ERAttachmentData)storedValueForKey("attachmentData"); + return (er.attachment.model.ERAttachmentData)storedValueForKey(_ERDatabaseAttachment.ATTACHMENT_DATA_KEY); } public void setAttachmentData(er.attachment.model.ERAttachmentData value) { - takeStoredValueForKey(value, "attachmentData"); + takeStoredValueForKey(value, _ERDatabaseAttachment.ATTACHMENT_DATA_KEY); } public void setAttachmentDataRelationship(er.attachment.model.ERAttachmentData value) { @@ -94,10 +94,10 @@ else if (value == null) { er.attachment.model.ERAttachmentData oldValue = attachmentData(); if (oldValue != null) { - removeObjectFromBothSidesOfRelationshipWithKey(oldValue, "attachmentData"); + removeObjectFromBothSidesOfRelationshipWithKey(oldValue, _ERDatabaseAttachment.ATTACHMENT_DATA_KEY); } } else { - addObjectToBothSidesOfRelationshipWithKey(value, "attachmentData"); + addObjectToBothSidesOfRelationshipWithKey(value, _ERDatabaseAttachment.ATTACHMENT_DATA_KEY); } } @@ -130,9 +130,9 @@ } public static NSArray<ERDatabaseAttachment> fetchERDatabaseAttachments(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { - EOFetchSpecification fetchSpec = new EOFetchSpecification(_ERDatabaseAttachment.ENTITY_NAME, qualifier, sortOrderings); + ERXFetchSpecification<ERDatabaseAttachment> fetchSpec = new ERXFetchSpecification<ERDatabaseAttachment>(_ERDatabaseAttachment.ENTITY_NAME, qualifier, sortOrderings); fetchSpec.setIsDeep(true); - NSArray<ERDatabaseAttachment> eoObjects = (NSArray<ERDatabaseAttachment>)editingContext.objectsWithFetchSpecification(fetchSpec); + NSArray<ERDatabaseAttachment> eoObjects = fetchSpec.fetchObjects(editingContext); return eoObjects; } @@ -148,7 +148,7 @@ eoObject = null; } else if (count == 1) { - eoObject = (ERDatabaseAttachment)eoObjects.objectAtIndex(0); + eoObject = eoObjects.objectAtIndex(0); } else { throw new IllegalStateException("There was more than one ERDatabaseAttachment that matched the qualifier '" + qualifier + "'."); @@ -169,7 +169,7 @@ } public static ERDatabaseAttachment localInstanceIn(EOEditingContext editingContext, ERDatabaseAttachment eo) { - ERDatabaseAttachment localInstance = (eo == null) ? null : (ERDatabaseAttachment)EOUtilities.localInstanceOfObject(editingContext, eo); + ERDatabaseAttachment localInstance = (eo == null) ? null : ERXEOControlUtilities.localInstanceOfObject(editingContext, eo); if (localInstance == null && eo != null) { throw new IllegalStateException("You attempted to localInstance " + eo + ", which has not yet committed."); } Modified: trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERFileAttachment.java =================================================================== --- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERFileAttachment.java 2010-10-22 15:33:05 UTC (rev 11616) +++ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERFileAttachment.java 2010-10-22 15:33:32 UTC (rev 11617) @@ -1,4 +1,4 @@ -// $LastChangedRevision: 4733 $ DO NOT EDIT. Make changes to ERFileAttachment.java instead. +// DO NOT EDIT. Make changes to ERFileAttachment.java instead. package er.attachment.model; import com.webobjects.eoaccess.*; @@ -64,14 +64,14 @@ } public String filesystemPath() { - return (String) storedValueForKey("filesystemPath"); + return (String) storedValueForKey(_ERFileAttachment.FILESYSTEM_PATH_KEY); } public void setFilesystemPath(String value) { if (_ERFileAttachment.LOG.isDebugEnabled()) { _ERFileAttachment.LOG.debug( "updating filesystemPath from " + filesystemPath() + " to " + value); } - takeStoredValueForKey(value, "filesystemPath"); + takeStoredValueForKey(value, _ERFileAttachment.FILESYSTEM_PATH_KEY); } @@ -103,9 +103,9 @@ } public static NSArray<ERFileAttachment> fetchERFileAttachments(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { - EOFetchSpecification fetchSpec = new EOFetchSpecification(_ERFileAttachment.ENTITY_NAME, qualifier, sortOrderings); + ERXFetchSpecification<ERFileAttachment> fetchSpec = new ERXFetchSpecification<ERFileAttachment>(_ERFileAttachment.ENTITY_NAME, qualifier, sortOrderings); fetchSpec.setIsDeep(true); - NSArray<ERFileAttachment> eoObjects = (NSArray<ERFileAttachment>)editingContext.objectsWithFetchSpecification(fetchSpec); + NSArray<ERFileAttachment> eoObjects = fetchSpec.fetchObjects(editingContext); return eoObjects; } @@ -121,7 +121,7 @@ eoObject = null; } else if (count == 1) { - eoObject = (ERFileAttachment)eoObjects.objectAtIndex(0); + eoObject = eoObjects.objectAtIndex(0); } else { throw new IllegalStateException("There was more than one ERFileAttachment that matched the qualifier '" + qualifier + "'."); @@ -142,7 +142,7 @@ } public static ERFileAttachment localInstanceIn(EOEditingContext editingContext, ERFileAttachment eo) { - ERFileAttachment localInstance = (eo == null) ? null : (ERFileAttachment)EOUtilities.localInstanceOfObject(editingContext, eo); + ERFileAttachment localInstance = (eo == null) ? null : ERXEOControlUtilities.localInstanceOfObject(editingContext, eo); if (localInstance == null && eo != null) { throw new IllegalStateException("You attempted to localInstance " + eo + ", which has not yet committed."); } Modified: trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERS3Attachment.java =================================================================== --- trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERS3Attachment.java 2010-10-22 15:33:05 UTC (rev 11616) +++ trunk/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/model/_ERS3Attachment.java 2010-10-22 15:33:32 UTC (rev 11617) @@ -1,4 +1,4 @@ -// $LastChangedRevision: 4733 $ DO NOT EDIT. Make changes to ERS3Attachment.java instead. +// DO NOT EDIT. Make changes to ERS3Attachment.java instead. package er.attachment.model; import com.webobjects.eoaccess.*; @@ -64,14 +64,14 @@ } public String s3Path() { - return (String) storedValueForKey("s3Path"); + return (String) storedValueForKey(_ERS3Attachment.S3_PATH_KEY); } public void setS3Path(String value) { if (_ERS3Attachment.LOG.isDebugEnabled()) { _ERS3Attachment.LOG.debug( "updating s3Path from " + s3Path() + " to " + value); } - takeStoredValueForKey(value, "s3Path"); + takeStoredValueForKey(value, _ERS3Attachment.S3_PATH_KEY); } @@ -103,9 +103,9 @@ } public static NSArray<ERS3Attachment> fetchERS3Attachments(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) { - EOFetchSpecification fetchSpec = new EOFetchSpecification(_ERS3Attachment.ENTITY_NAME, qualifier, sortOrderings); + ERXFetchSpecification<ERS3Attachment> fetchSpec = new ERXFetchSpecification<ERS3Attachment>(_ERS3Attachment.ENTITY_NAME, qualifier, sortOrderings); fetchSpec.setIsDeep(true); - NSArray<ERS3Attachment> eoObjects = (NSArray<ERS3Attachment>)editingContext.objectsWithFetchSpecification(fetchSpec); + NSArray<ERS3Attachment> eoObjects = fetchSpec.fetchObjects(editingContext); return eoObjects; } @@ -121,7 +121,7 @@ eoObject = null; } else if (count == 1) { - eoObject = (ERS3Attachment)eoObjects.objectAtIndex(0); + eoObject = eoObjects.objectAtIndex(0); } else { throw new IllegalStateException("There was more than one ERS3Attachment that matched the qualifier '" + qualifier + "'."); @@ -142,7 +142,7 @@ } public static ERS3Attachment localInstanceIn(EOEditingContext editingContext, ERS3Attachment eo) { - ERS3Attachment localInstance = (eo == null) ? null : (ERS3Attachment)EOUtilities.localInstanceOfObject(editingContext, eo); + ERS3Attachment localInstance = (eo == null) ? null : ERXEOControlUtilities.localInstanceOfObject(editingContext, eo); if (localInstance == null && eo != null) { throw new IllegalStateException("You attempted to localInstance " + eo + ", which has not yet committed."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |