WebObjects 5.2.3

com.webobjects.eocontrol
Class EOArrayDataSource

java.lang.Object
  extended bycom.webobjects.eocontrol.EODataSource
      extended bycom.webobjects.eocontrol.EOArrayDataSource
All Implemented Interfaces:
Serializable

public class EOArrayDataSource
extends EODataSource
implements Serializable

EOArrayDataSource is a concrete subclass of EODataSource that can be used to provide enterprise objects to a display group (EODisplayGroup from EOInterface or WODisplayGroup from WebObjects) without having to fetch them from the database. In an EOArrayDataSource, objects are maintained in an NSArray.

EOArrayDataSource can fetch, insert, and delete objects by performing the operations directly on its array. It can also provide a detailed data source.

See Also:
Serialized Form

Constructor Summary
EOArrayDataSource(EOClassDescription desc, EOEditingContext ec)
          Creates and returns an EOArrayDataSource object where desc contains information about the objects provided by the EOArrayDataSource and ec is the EOArrayDataSource's editing context.
 
Method Summary
 EOClassDescription classDescriptionForObjects()
          Returns the receiver's class description.
 Object createObject()
          Creates a new object, inserts into the array of objects maintained by the receiver if appropriate, and returns the object.
 EODataSource dataSourceQualifiedByKey(String key)
          Creates an EODetailDataSource for relationship key.
 void deleteObject(Object eo)
          Deletes object from the array of objects maintained by the receiver.
 EOEditingContext editingContext()
          Returns the receiver's editing context.
 NSArray fetchObjects()
          Returns a copy of the array of objects maintained by the receiver.
 void insertObject(Object eo)
          Inserts object into the array of objects maintained by the receiver.
 void qualifyWithRelationshipKey(String key, Object source)
          EOArrayDataSource provides a null implementation of this method.
 void setArray(NSArray array)
          Sets the receiver's array of objects to array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOArrayDataSource

public EOArrayDataSource(EOClassDescription desc,
                         EOEditingContext ec)
Creates and returns an EOArrayDataSource object where desc contains information about the objects provided by the EOArrayDataSource and ec is the EOArrayDataSource's editing context. Either argument may be null.

Parameters:
desc - specifies class description that contains information about the objects provided by the EOArrayDataSource
ec - specifies EOArrayDataSource's editing context
Method Detail

classDescriptionForObjects

public EOClassDescription classDescriptionForObjects()
Returns the receiver's class description.

Overrides:
classDescriptionForObjects in class EODataSource
Returns:
returns an EOClassDescription that provides information about the objects provided by the receiver

createObject

public Object createObject()
Creates a new object, inserts into the array of objects maintained by the receiver if appropriate, and returns the object. Returns null if the receiver can't create the object or can't insert it.

Overrides:
createObject in class EODataSource
Returns:
newly created object that has been inserted into the receiver's collection of objects
See Also:
EODataSource.classDescriptionForObjects(), EODataSource.editingContext()

dataSourceQualifiedByKey

public EODataSource dataSourceQualifiedByKey(String key)
Creates an EODetailDataSource for relationship key.

Specified by:
dataSourceQualifiedByKey in class EODataSource
Parameters:
key - relationship key that is the destination object of the relationship
Returns:
detailed EODataSource that provides the destination objects of the relationship
See Also:
EODataSource.qualifyWithRelationshipKey(String key, Object sourceObject)

deleteObject

public void deleteObject(Object eo)
Deletes object from the array of objects maintained by the receiver.

Specified by:
deleteObject in class EODataSource
Parameters:
eo - object to be deleted

editingContext

public EOEditingContext editingContext()
Returns the receiver's editing context.

Overrides:
editingContext in class EODataSource
Returns:
receiver's EOEditingContext

fetchObjects

public NSArray fetchObjects()
Returns a copy of the array of objects maintained by the receiver.

Overrides:
fetchObjects in class EODataSource
Returns:
objects provided by the receiver

insertObject

public void insertObject(Object eo)
Inserts object into the array of objects maintained by the receiver.

Specified by:
insertObject in class EODataSource
Parameters:
eo - object to be inserted

qualifyWithRelationshipKey

public void qualifyWithRelationshipKey(String key,
                                       Object source)
EOArrayDataSource provides a null implementation of this method.

Specified by:
qualifyWithRelationshipKey in class EODataSource
Parameters:
key - names the relationship the objects is to be displayed with
source - destination objects belongs to this
See Also:
(String relationshipKey)

setArray

public void setArray(NSArray array)
Sets the receiver's array of objects to array.

Parameters:
array - specifies receiver's array of objects to array

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.