home *** CD-ROM | disk | FTP | other *** search
- // EOKeyGlobalID.h
- // Copyright (c) 1995, NeXT Software, Inc. All rights reserved.
- //
- // The EOKeyGlobalID is used by the EODatabaseContext to identify objects
- // fetched from the database. The combination of entity name and primary key
- // values are used as the unique identifier.
- //
- #import <EOControl/EOControl.h>
-
- // GID subtype for objects produced by the EOF Access Layer.
- @interface EOKeyGlobalID : EOGlobalID <NSCoding>
- {
- unsigned int _hasExternalRefCount:1;
- unsigned int _refs:15;
- unsigned short _keyCount;
- NSString *_entityName;
-
- // Extended ivars hold key values
- }
- + (id)globalIDWithEntityName:(NSString *)entityName keys:(id *)keys keyCount:(unsigned)count zone:(NSZone *)zone;
- // these are best created using -[EOEntity globalIDForRow:]
-
- - (NSString *)entityName;
-
- - (id *)keyValues;
- // returns a pointer vector containing the values
- - (unsigned)keyCount;
- - (NSArray *)keyValuesArray;
-
- - (BOOL)isEqual:other;
- - (unsigned)hash;
- // hash and isEqual operate on the entityName and all key values
-
- - (void)encodeWithCoder:(NSCoder *)aCoder;
- - (id)initWithCoder:(NSCoder *)aDecoder;
-
- @end
-
-