Project Wonder 5.0

er.rest
Interface IERXRestDelegate

All Known Implementing Classes:
EOEntityRestDelegate, EOModelGroupRestDelegate, EOModelRestDelegate, ERXAbstractRestDelegate, ERXEORestDelegate, ERXNoOpRestDelegate

public interface IERXRestDelegate

The delegate interface used to convert objects to and from request nodes.

Author:
mschrag

Nested Class Summary
static class IERXRestDelegate.Factory
          A Factory for creating IERXRestDelegates.
 
Method Summary
 boolean __hasNumericPrimaryKeys(com.webobjects.eocontrol.EOClassDescription classDescription)
          This API will likely change.
 java.lang.Object createObjectOfEntityWithID(com.webobjects.eocontrol.EOClassDescription entity, java.lang.Object id)
          Creates a new instance of the entity.
 java.lang.Object objectOfEntityWithID(com.webobjects.eocontrol.EOClassDescription entity, java.lang.Object id)
          Returns the object with the given entity and ID.
 java.lang.Object primaryKeyForObject(java.lang.Object obj)
          Returns the primary key for the specified object.
 void setEditingContext(com.webobjects.eocontrol.EOEditingContext editingContext)
          Sets the editing context fort his rest delegate (which might not be necessary, but EO delegates require it).
 

Method Detail

setEditingContext

void setEditingContext(com.webobjects.eocontrol.EOEditingContext editingContext)
Sets the editing context fort his rest delegate (which might not be necessary, but EO delegates require it).

Parameters:
editingContext - the editing context for this delegate

primaryKeyForObject

java.lang.Object primaryKeyForObject(java.lang.Object obj)
Returns the primary key for the specified object.

Parameters:
obj - the object to return a pk for
Returns:
the primary key of the object

createObjectOfEntityWithID

java.lang.Object createObjectOfEntityWithID(com.webobjects.eocontrol.EOClassDescription entity,
                                            java.lang.Object id)
Creates a new instance of the entity.

Parameters:
entity - the entity
Returns:
a new instance of the entity

objectOfEntityWithID

java.lang.Object objectOfEntityWithID(com.webobjects.eocontrol.EOClassDescription entity,
                                      java.lang.Object id)
Returns the object with the given entity and ID.

Parameters:
entity - the entity
id - the ID of the object
Returns:
the object with the given entity and ID

__hasNumericPrimaryKeys

boolean __hasNumericPrimaryKeys(com.webobjects.eocontrol.EOClassDescription classDescription)
This API will likely change. Override if you have to for now, but I'm not sure if it makes more sense to return an array of pk classes, a map of pk to pk class, this boolean, or an array of pk attribute names. If we return pk names, we could probably get rid of primaryKeyForObject, or at least fully implement it in ERXAbstractRestDelegate, but I don't want to fully commit to this API yet. In the meantime, this at least provides a stapgap for automatic registration.

Parameters:
classDescription - the class description in question
Returns:
whether or not the given class description has numeric pks

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.