|
WebObjects 5.4.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.eocontrol.EOGlobalID com.webobjects.eocontrol.EOKeyGlobalID
public abstract class EOKeyGlobalID
EOKeyGlobalID is a concrete subclass of EOGlobalID whose instances, an entity and the primary key values for the object being identified, represent persistent IDs based on EOModel information. When creating an EOKeyGlobalID, the key values must be supplied following alphabetical order for their
attribute names. EOKeyGlobalID defines the globalIDWithEntityName
method 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 a
constructor can't be used to create EOKeyGlobalIDs
EOKeyGlobalID.globalIDWithEntityName(String entityName, Object[] values)
,
EOEntity.globalIDForRow(NSDictionary row)
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSCoding |
---|
NSCoding.Support |
Field Summary |
---|
Fields inherited from class com.webobjects.eocontrol.EOGlobalID |
---|
GlobalIDChangedNotification |
Constructor Summary | |
---|---|
protected |
EOKeyGlobalID(String entityName,
int hashCode)
Returns an EOKeyGlobalID object |
Method Summary | |
---|---|
Class |
classForCoder()
Allows the receiver to substitute a class other than its own (for example, a public superclass) for use during archiving (encoding) by an NSCoder. |
static Object |
decodeObject(NSCoder coder)
(Re)creates an object based on type information and data stored in coder . |
void |
encodeWithCoder(NSCoder coder)
Archives the receiver's type information and data into coder . |
String |
entityName()
Returns the name of the entity governing the object identified by the receiver. |
static EOKeyGlobalID |
globalIDWithEntityName(String entityName,
Object[] values)
Returns an EOKeyGlobalID based on entityName and values . |
int |
hashCode()
Returns an integer that can be used as a hash key in a hash table structure. |
abstract int |
keyCount()
Returns the number of keys that form the (potentially composite) primary key of the receiver. |
abstract Object[] |
keyValues()
Returns the keys that form the (potentially composite) primary key of the receiver. |
NSArray |
keyValuesArray()
Returns the keys that form the (potentially composite) primary key of the receiver as an NSArray. |
protected Object |
readResolve()
|
Methods inherited from class com.webobjects.eocontrol.EOGlobalID |
---|
clone, equals, isTemporary |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected EOKeyGlobalID(String entityName, int hashCode)
entityName
- specifies name of entityhashCode
- specifies hashcodeMethod Detail |
---|
public static EOKeyGlobalID globalIDWithEntityName(String entityName, Object[] values)
entityName
and values
. EOKeyGlobalIDs are more conveniently created using EOEntity's globalIDForRow
method (EOAccess).
entityName
- name of entity for which the new EOKeyGlobalID will be createdvalues
- specifies primary key values for entityName
EOEntity.globalIDForRow(NSDictionary row)
public String entityName()
faultForGlobalID
.
public int hashCode()
equals
method), they must have the same hash value.
hashCode
in class EOGlobalID
int
that can be used as a hash key in a hash table structurepublic abstract Object[] keyValues()
EOKeyGlobalID.keyValuesArray()
public abstract int keyCount()
int
number of primary key values in the receiverpublic NSArray keyValuesArray()
EOKeyGlobalID.keyValues()
public static Object decodeObject(NSCoder coder)
coder
.
coder
- stores object type information along with an object's data
coder
EOKeyGlobalID.encodeWithCoder(NSCoder coder)
,
NSCoder
,
NSCoding
public void encodeWithCoder(NSCoder coder)
coder
. The receiver can then be recreated using decodeObject
. Custom type information can be used by overriding classForCoder
.
encodeWithCoder
in interface NSCoding
coder
- stores object type information along with an object's dataEOKeyGlobalID.decodeObject(NSCoder coder)
,
EOKeyGlobalID.classForCoder()
,
NSCoder
,
NSCoding
public Class classForCoder()
getClass
method.
classForCoder
in interface NSCoding
EOKeyGlobalID.encodeWithCoder(NSCoder coder)
,
EOKeyGlobalID.decodeObject(NSCoder coder)
,
NSCoder
,
NSCoding
protected Object readResolve() throws ObjectStreamException
ObjectStreamException
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |