Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > EOControl Reference

Table of Contents

EONull


Inherits from:
NSObject
Conforms to:
NSCoding
NSCopying
NSObject (NSObject)
Declared in:
EOControl/EONull.h




Class Description


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 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:


Class Methods



null

+ (EONull *)null

Returns the unique instance of EONull.


Table of Contents