PATH  WebObjects 4.0 Documentation > EOAccess Reference



EOStoredProcedure

Inherits From:
NSObject

EOPropertyListEncoding

Inherits From:
com.apple.yellow.eoaccess


Class Description

An EOStoredProcedure represents a stored procedure defined in a database, and associates a name internal to the Framework with an external name by which the stored procedure is known to the database. If a stored procedure has arguments, its EOStoredProcedure object also maintains a group of EOAttributes which represent the stored procedure's arguments. See the EOAttribute class specification for more information

You usually define stored procedures in your EOModel with the EOModeler application, which is documented in the Enterprise Objects Framework Developer's Guide. EOStoredProcedures are primarily used by the Enterprise Objects Framework to map operations for an EOEntity to stored procedures (see the description for EOEntity's setStoredProcedure method). You can assign stored procedures to an entity for any of the following scenarios:

Your code probably won't use EOStoredProcedures unless you're working at the adaptor level.

Like the other major modeling classes, EOStoredProcedure provides a user dictionary for your application to store any application-specific information related to the stored procedure.

EOPropertyListEncoding
awakeWithPropertyList
encodeIntoPropertyList

Method Types

Constructors
EOStoredProcedure
Accessing the model
model
Accessing the name
setName
beautifyName
name
Accessing the external name
setExternalName
externalName
Accessing the arguments
setArguments
arguments
Accessing the user dictionary
setUserInfo
userInfo

Constructors


EOStoredProcedure

public next.eo.EOStoredProcedure()

Creates and returns a new EOStoredProcedure.

public next.eo.EOStoredProcedure(java.lang.String name)

Creates and returns a new EOStoredProcedure named name.

public next.eo.EOStoredProcedure(next.util.ImmutableHashtable propertyList, java.lang.Object owner)

Creates and returns a new EOStoredProcedure initialized from propertyList-a dictionary containing only property list data types (that is, String, NSDictionary, NSArray, and NSData). This constructor is used by EOModeler when it reads in an EOModel object from a file, for example. The owner argument should be the EOStoredProcedure's EOModel. EOStoredProcedures created from a property list must receive an awakeWithPropertyList message immediately after creation before they are fully functional, but the awake... message should be deferred until the all of the other objects in the model have also been created.

See also: awakeWithPropertyList (PropertyListEncoding), encodeIntoPropertyList (PropertyListEncoding) setName, name


Instance Methods


arguments

public next.util.ImmutableVector arguments()

Returns the EOAttribute objects that describe the stored procedure's arguments or null if the stored procedure has no arguments.


beautifyName

public void beautifyName()

Renames the receiver's name and its arguments to conform to the Framework's naming conventions. For example, "NAME" is renamed "name" and "FIRST_NAME" is renamed "firstName". This method is used in reverse-engineering a model.

See also: setArguments, beautifyNames (EOModel)


externalName

public java.lang.String externalName()

Returns the name of the stored procedure as it is defined in the database, or null if the receiver doesn't have an external name.

See also: setExternalName


model

public next.eo.Model model()

Returns the model to which the receiver belongs.

See also: addStoredProcedure (EOModel)


name

public java.lang.String name()

Returns the name of the receiver.

See also: setName, "Constructors"


setArguments

public void setArguments(next.util.ImmutableVector arguments)

Sets arguments as the array of EOAttributes that describe the receiver's arguments. The EOAttribute objects in arguments must be ordered to match the database stored procedure definition.

See also: arguments


setExternalName

public void setExternalName(java.lang.String name)

Sets the external name of the stored procedure to name. name should be the name of the stored procedure as it is defined in the database.

See also: externalName


setName

public void setName(java.lang.String name)

Sets the name of the receiver.

See also: name, "Constructors"


setUserInfo

public void setUserInfo(next.util.ImmutableHashtable dictionary)

Sets the dictionary of auxiliary data, which your application can use for whatever it needs. dictionary can only contain property list data types (that is, String, NSDictionary, NSArray, and NSData).

See also: userInfo


userInfo

public next.util.ImmutableHashtable userInfo()

Returns a dictionary of user data. Your application can use this to store any auxiliary information it needs.

See also: setUserInfo





Copyright © 1998, Apple Computer, Inc. All rights reserved.