|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines a delegate to EOModelGroup to allow instances to modify how the model group finds and loads models. There is also an EOModelGroup class delegate that can be implemented to change the creation of the default model group.
EOModelGroup.ClassDelegate
Method Summary | |
Class |
classForObjectWithGlobalID(EOEntity entity,
EOGlobalID gid)
Used to fine-tune inheritance. |
Class |
failedToLookupClassNamed(EOEntity entity,
String className)
Invoked when the class name specified for entity
cannot be found at runtime. |
EOEntity |
relationshipFailedToLookupDestinationWithName(EORelationship relationship,
String name)
Invoked when relationship is being loaded and the
destination entity identified by name in the model
file cannot be found in the model group. |
EORelationship |
relationshipForRow(EOEntity entity,
NSDictionary dictionary,
EORelationship relationship)
Invoked when relationships are instantiated for a newly fetched object. |
EOEntity |
subEntityForEntity(EOEntity entity,
NSDictionary dic)
Allows the delegate to fine-tune inheritance by returning the sub-entity of entity from which an object should be
fetched based on the primary key in dic . |
Method Detail |
public Class classForObjectWithGlobalID(EOEntity entity, EOGlobalID gid)
gid
in place of the one specified in
entity
. If the delegate cannot provide an alternate
class, or if there is no delegate, EOGenericRecord is used.
entity
- An EOEntity object.gid
- The globalID of an Enterprise Object.
gid
, or
null
if unable to provide
an alternate class.public Class failedToLookupClassNamed(EOEntity entity, String className)
entity
cannot be found at runtime. The delegate can take action to provide
a different class to associate with entity
. If the
delegate cannot provide an alternate class, or
if there is no delegate, EOGenericRecord is used as
entity
's class.
entity
- An EOEntity object.className
- The class name specified for entity
,
which the runtime system has been unable to
locate.
entity
, or null
if
unable to provide an alternate class.public EOEntity relationshipFailedToLookupDestinationWithName(EORelationship relationship, String name)
relationship
is being loaded and the
destination entity identified by name
in the model
file cannot be found in the model group. This most often occurs
when a model references entities in another model file that
can't be found.
The delegate can implement this method to return a
different destination entity to set for
relationship
, or null
to set the
destination entity to null
. If the delegate doesn't
implement this method, an exception is thrown by the Enterprise
Objects Framework.
relationship
- A relationship whose destination entity
cannot be located during loading.name
- The name of the destination entity defined
for relationship
in the
EOModel.
relationship
's destination
entity, or null
.public EORelationship relationshipForRow(EOEntity entity, NSDictionary dictionary, EORelationship relationship)
relationship
for the
specified entity
. dictionary
is the
snapshot of the database row for the newly fetched object.
Should return relationship
to leave the default
behavior unchanged, or a different EORelationship object as
appropriate.
entity
- The entity for the newly fetched enterprise
object.dictionary
- The database snapshot for the Enterprise Object
associated with entity
.relationship
- The default relationship instantiated for
entity
.
entity
(either
relationship
or some other
relationship).public EOEntity subEntityForEntity(EOEntity entity, NSDictionary dic)
entity
from which an object should be
fetched based on the primary key in dic
.
entity
- An EOEntity.dic
- The snapshot of a database row from which to
extract the primary key of the object to fetch.
entity
which should
fetch the object based on the primary key
in dic
.
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |