<$comment
EO Template for use by "eogenerator" based upon MiscMerge engine.
You may customize this file to modify the templates generated
by this tool.  See the MiscMerge documentation for a description
of the parsing language.  The engine gets passed this file and an
EOEntity to process, so the methods used must be ones that an
EOEntity can respond to.

BE SURE NOT TO INCLUDE DATES IN THIS FILE.  Since the "eogenerator"
tool tries to compare the newly generated file with the old file,
adding dates to this file will guarantee the old file gets
overridden by the new file, forcing a recompilation of your EO.$>

// <$GEN_PREFIX$><$className$>.m
// 
// Created by eogenerator
// DO NOT EDIT.  Make changes to <$className$>.m instead.

#import "<$GEN_PREFIX$><$className$>.h"
<$foreach relationship referencedClasses.@reversedArray do
$>#import "<$relationship$>.h"
<$endforeach do$><$if FetchSpecs.@count gt 0$>
#import <EOAccess/EOUtilities.h>;<$endif$>
@implementation <$GEN_PREFIX$><$className$>

// EditingContext-based archiving support.  Useful for WebObjects
// applications that store state in the page or in cookies.

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [EOEditingContext encodeObject:self withCoder:aCoder];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    return [EOEditingContext initObject:self withCoder:aDecoder];
}<$foreach scalarAttribute classScalarAttributes do$>
- (void)set<$scalarAttribute.name.initialCapitalString$>:(<$scalarAttribute.cScalarTypeString$>)aValue
{
    [self willChange];
    <$scalarAttribute.name$> = aValue;
}
- (<$scalarAttribute.cScalarTypeString$>)<$scalarAttribute.name$> { return <$scalarAttribute.name$>; }
<$endforeach do$>
<$foreach nonScalarAttribute classNonScalarAttributes.@sortedNameArray do$>
- (void)set<$nonScalarAttribute.name.initialCapitalString$>:(<$nonScalarAttribute.valueClassName$> *)aValue
{
    [self willChange];
    [<$nonScalarAttribute.name$> autorelease];
    <$nonScalarAttribute.name$> = [aValue retain];
}
- (<$nonScalarAttribute.valueClassName$> *)<$nonScalarAttribute.name$> { return <$nonScalarAttribute.name$>; }
<$endforeach do
$><$foreach toOneRelationship classToOneRelationships.@sortedNameArray do$>
- (void)set<$toOneRelationship.name.initialCapitalString$>:(<$toOneRelationship.destinationEntity.referenceClassName$>)aValue
{
    // a to-one relationship
    [self willChange];
    [<$toOneRelationship.name$> autorelease];
    <$toOneRelationship.name$> = [aValue retain];
}
- (<$toOneRelationship.destinationEntity.referenceClassName$>)<$toOneRelationship.name$> { return <$toOneRelationship.name$>; }
<$endforeach do
$><$foreach toManyRelationship classToManyRelationships.@sortedNameArray do$>
- (void)addTo<$toManyRelationship.name.initialCapitalString$>:(<$toManyRelationship.destinationEntity.referenceClassName$>)object
{
    // a to-many relationship
    [self willChange];
    [<$toManyRelationship.name$> addObject:object];
}
- (void)removeFrom<$toManyRelationship.name.initialCapitalString$>:(<$toManyRelationship.destinationEntity.referenceClassName$>)object
{
    // a to-many relationship
    [self willChange];
    [<$toManyRelationship.name$> removeObject:object];
}
- (NSArray *)<$toManyRelationship.name$> { return <$toManyRelationship.name$>; }
<$endforeach do$>

- (void)dealloc
{
<$foreach nonScalarAttribute classNonScalarAttributes.@sortedNameArray do$>    [<$nonScalarAttribute.name$> release];
<$endforeach do$><$foreach toOneRelationship classToOneRelationships.@sortedNameArray do$>    [<$toOneRelationship.name$> release];
<$endforeach do$><$foreach toManyRelationship classToManyRelationships.@sortedNameArray do$>    [<$toManyRelationship.name$> release];
<$endforeach do$>
    [super dealloc];
}

@end