//
//  {CLASS}.m
//  Generated by JSON Toolbox - http://itunes.apple.com/app/json-toolbox/id525015412
//
//  Created by {CURRENTUSER} on {DATE}
//

@interface {CLASS}()

+ (NSArray*) entitiesFromResultSet: (FMResultSet*) resultSet;

@end

@implementation {CLASS}

{SYNTHESIZE}

- ({CLASS}*) initWithResultSet: (FMResultSet*) resultSet
{
    self = [super init];
    if(nil != self)
    {
{INIT_WITH_RESULTSET_BODY}
    }
    
    return self;
}

+ (NSArray*) entitiesFromResultSet: (FMResultSet*) resultSet
{
    NSMutableArray * results = [[NSMutableArray alloc] init];

    while([resultSet next])
    {
        [results addObject: [[{CLASS} alloc] initWithResultSet: resultSet]];
    } // End of selectResultSet

    return [NSArray arrayWithArray: results];
}

{METHOD_BODIES}

- (NSString*) description
{
    NSMutableString * descriptionOutput = [[NSMutableString alloc] init];
{SECTION_DESCRIPTION}
    return JSONAutoRelease(descriptionOutput);
} // End of description

- (void)dealloc
{
#if ! __has_feature(objc_arc)
{ARC_RELEASE}
    [super dealloc];
#endif
} // End of dealloc

@end
