ERXAbstractRestDelegate Class Reference

Inherits er::rest::IERXRestDelegate.

Inherited by JavaMonitorRestDelegate, ERXEORestDelegate, ERXNoOpRestDelegate, ClientCompanyRestDelegate, CarRestDelegate, ManufacturerRestDelegate, EOEntityRestDelegate, EOModelGroupRestDelegate, and EOModelRestDelegate.

Collaboration diagram for ERXAbstractRestDelegate:

Collaboration graph
[legend]

List of all members.

Public Member Functions

boolean __hasNumericPrimaryKeys (EOClassDescription classDescription)
Object createObjectOfEntityWithID (EOClassDescription entity, Object id)
EOEditingContext editingContext ()
 ERXAbstractRestDelegate (EOEditingContext editingContext)
 ERXAbstractRestDelegate ()
Object objectOfEntityWithID (EOClassDescription entity, Object id)
Object primaryKeyForObject (Object obj)
void setCreateMissingObjects (boolean createMissingObjects)
void setEditingContext (EOEditingContext editingContext)
boolean shouldCreateMissingObjects ()

Protected Member Functions

abstract Object _createObjectOfEntityWithID (EOClassDescription entity, Object id)
abstract Object _fetchObjectOfEntityWithID (EOClassDescription entity, Object id)
abstract boolean _isDelegateForEntity (EOClassDescription entity)
abstract Object _primaryKeyForObject (EOClassDescription entity, Object obj)

Private Attributes

boolean _createMissingObjects
EOEditingContext _editingContext


Detailed Description

ERXAbstractRestDelegate is the default implementation of the IERXRestDelegate interface that can handle looking up delegates for non-eo classes, etc.

Author:
mschrag

Constructor & Destructor Documentation

ERXAbstractRestDelegate ( EOEditingContext  editingContext  ) 


Member Function Documentation

boolean __hasNumericPrimaryKeys ( 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

Implements IERXRestDelegate.

Reimplemented in ERXEORestDelegate.

abstract Object _createObjectOfEntityWithID ( EOClassDescription  entity,
Object  id 
) [protected, pure virtual]

abstract Object _fetchObjectOfEntityWithID ( EOClassDescription  entity,
Object  id 
) [protected, pure virtual]

abstract boolean _isDelegateForEntity ( EOClassDescription  entity  )  [protected, pure virtual]

abstract Object _primaryKeyForObject ( EOClassDescription  entity,
Object  obj 
) [protected, pure virtual]

Object createObjectOfEntityWithID ( EOClassDescription  entity,
Object  id 
)

Creates a new instance of the entity.

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

Implements IERXRestDelegate.

EOEditingContext editingContext (  ) 

Object objectOfEntityWithID ( EOClassDescription  entity,
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

Implements IERXRestDelegate.

Object primaryKeyForObject ( 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

Implements IERXRestDelegate.

void setCreateMissingObjects ( boolean  createMissingObjects  ) 

void setEditingContext ( 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

Implements IERXRestDelegate.

boolean shouldCreateMissingObjects (  ) 

Reimplemented in ClientCompanyRestDelegate.


Member Data Documentation

boolean _createMissingObjects [private]

EOEditingContext _editingContext [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:27 2012 for Project Wonder by  doxygen 1.5.8