Documentation Archive Developer
Search
PATH  WebObjects 4.0 Documentation > EOControl Reference



EONull

Inherits From:
NSObject

Conforms To: NSCoding
NSCopying
NSObject (NSObject)

Declared in: EOControl/EONull.h

The EONull class defines a unique object used to represent null values in collection objects (which don't allow nil values). For example, NSDictionaries fetched by an EOAdaptorChannel contain an EONull instance for such values. EONull is automatically translated to nil in enterprise objects, however, so most applications should rarely need to account for this class. See the NSObject Additions class specification for details on where this translation is performed.

EONull has exactly one instance, returned by the null class method. This object isn't reference-counted, can't be copied (copyWithZone: returns self ), and is never deallocated. You can thus safely cache this instance and use pointer comparison to test for the presence of a null value:

static id NULL_VALUE;

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
/* ... */
NULL_VALUE = [EONull null];
return;
}

if (value == NULL_VALUE) {
/* ... */
}


Adopted Protocols

NSCoding
- encodeWithCoder:
- initWithCoder:
EOSortOrderingComparison
- compareAscending:
- compareCaseInsensitiveAscending:
- compareCaseInsensitiveDescending:
- compareDescending:
NSCopying
- copyWithZone:


null

+ (EONull *)null

Returns the unique instance of EONull.





Copyright © 1998, Apple Computer, Inc. All rights reserved.