PATH  WebObjects 4.0 Documentation > EOControl Reference



EOKeyGlobalID

Inherits From:
EOGlobalID : Object (Java Client)
EOGlobalID : NSObject (Yellow Box)

Implements:
com.apple.client.foundation.NSCoding (Java Client only)
java.lang.Cloneable (Java Client only)

Package:
com.apple.client.eocontrol (Java Client)
com.apple.yellow.eocontrol (WebObjects and Yellow Box)

Class Description

EOKeyGlobalID is a concrete subclass of EOGlobalID whose instances represent persistent IDs based on EOModel information: an entity and the primary key values for the object being identified. When creating an EOKeyGlobalID, the key values must be supplied following alphabetical order for their attribute names. EOKeyGlobalID defines the globalIDWithEntityName for creating instances, but it's much more convenient to create instances from fetched rows using EOEntity's globalIDForRow method. (EOEntity and EOModel are defined in EOAccess.) Note that you don't use a constructor to create EOKeyGlobalIDs.

Interfaces Implemented

NSCoding
classForCoder (Java Client only)
encodeWithCoder (Java Client only)

Method Types

Creating instances
+ globalIDWithEntityName
Getting the entity name
- entityName
Getting the key values
- keyValues
- keyCount
- keyValuesArray
Comparison
- equals

Static Methods


globalIDWithEntityName

public static EOKeyGlobalID globalIDWithEntityName (
java.lang.String entityName,
NSArray keyValues)

Returns an EOKeyGlobalID based on entityName and keyValues.

EOKeyGlobalIDs are more conveniently created using EOEntity's globalIDForRow method (EOAccess).

Instance Methods


entityName

public java.lang.String entityName ()

Returns the name of the entity governing the object identified by the receiver. This is used by EODatabaseContexts (EOAccess) to identify an EOEntity (EOAccess) in methods such as faultForGlobalID .


equals

public boolean equals (java.lang.Object anObject)

Returns true if the receiver and anObject share the same entity name and key values, false if they don't.

See also: - entityName , - keyValues


hashcode

public int hashCode ()

Returns an integer that can be used as a table address in a hash table structure. If two objects are equal (as determined by equals ), they must have the same hash value.


keyCount

public int keyCount ()

Returns the number of key values in the receiver.


keyValues

public java.lang.Object[] keyValues ()

Returns the receiver's key values.


keyValuesArray

public NSArray keyValuesArray ()

Returns the receiver's key values as an NSArray.





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