//
//  ModeledObjectCategories.m
//  drachma
//
//  Created by Niko Matsakis on 7/23/06.
//  Copyright 2006 __MyCompanyName__. All rights reserved.
//

#import "ModeledObjectTypes.h"

@implementation Payee (CustomCode)

- (int) countOfExpenses
{
    return [[self mutableSetValueForKey:@"expenses"] count];
}

@end

@implementation Category (CustomCode)

// Returns a TRUE NSNumber if the "distributesInto" list is empty
// for this category.
- (NSNumber*) doesNotDistributeIntoAnyone {
    return [NSNumber numberWithInt:[[self valueForKey:@"distributeInfo"] isEmpty]];
}

@end