home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / EODEV.Z / EOKeyGlobalID.h < prev    next >
Encoding:
Text File  |  1996-09-09  |  1.1 KB  |  39 lines

  1. // EOKeyGlobalID.h
  2. // Copyright (c) 1995, NeXT Software, Inc. All rights reserved. 
  3. //
  4. // The EOKeyGlobalID is used by the EODatabaseContext to identify objects
  5. // fetched from the database.  The combination of entity name and primary key
  6. // values are used as the unique identifier.
  7. //
  8. #import <EOControl/EOControl.h>
  9.  
  10. // GID subtype for objects produced by the EOF Access Layer.
  11. @interface EOKeyGlobalID : EOGlobalID <NSCoding>
  12. {
  13.     unsigned int _hasExternalRefCount:1;
  14.     unsigned int _refs:15;
  15.     unsigned short _keyCount;
  16.     NSString *_entityName;  
  17.  
  18.     // Extended ivars hold key values
  19. }
  20. + (id)globalIDWithEntityName:(NSString *)entityName keys:(id *)keys keyCount:(unsigned)count zone:(NSZone *)zone;
  21.     // these are best created using -[EOEntity globalIDForRow:]
  22.  
  23. - (NSString *)entityName;
  24.  
  25. - (id *)keyValues;
  26.     // returns a pointer vector containing the values
  27. - (unsigned)keyCount;
  28. - (NSArray *)keyValuesArray;
  29.  
  30. - (BOOL)isEqual:other;
  31. - (unsigned)hash;
  32.     // hash and isEqual operate on the entityName and all key values
  33.  
  34. - (void)encodeWithCoder:(NSCoder *)aCoder;
  35. - (id)initWithCoder:(NSCoder *)aDecoder;
  36.  
  37. @end
  38.  
  39.