|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eocontrol.EOGlobalID | +--com.webobjects.eocontrol.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
globalIDWithEntityName(String entityName, Object[] values)
,
EOEntity.globalIDForRow(NSDictionary row)
, Serialized FormInner classes inherited from class com.webobjects.foundation.NSCoding |
NSCoding.Support |
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 Class classForCoder()
getClass
method.classForCoder
in interface NSCoding
encodeWithCoder(NSCoder coder)
,
decodeObject(NSCoder coder)
,
NSCoder
,
NSCoding
public static Object decodeObject(NSCoder coder)
coder
.coder
- stores object type information along with an object's datacoder
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 datadecodeObject(NSCoder coder)
,
classForCoder()
,
NSCoder
,
NSCoding
public String entityName()
faultForGlobalID
.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 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 int keyCount()
int
number of primary key values in the receiverpublic abstract Object[] keyValues()
keyValuesArray()
public NSArray keyValuesArray()
keyValues()
protected Object readResolve() throws ObjectStreamException
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |