WebObjects 5.2

com.webobjects.eoaccess
Class EOStoredProcedure

java.lang.Object
  |
  +--com.webobjects.eoaccess.EOStoredProcedure
All Implemented Interfaces:
EOPropertyListEncoding

public class EOStoredProcedure
extends Object
implements EOPropertyListEncoding

EOStoredProcedure encapsulates the information stored in an EOModel about a stored procedure which is stored in a database server. The main information is the name within the model, the external name (as defined in the database), the number of arguments and their types.


Constructor Summary
EOStoredProcedure(NSDictionary propertyList, Object owner)
          Creates a new EOStoredProcedure from a property list.
EOStoredProcedure(String name)
          The constructor for a EOStoredProcedure (which is a reference to the stored procedure in the database).
 
Method Summary
 NSArray arguments()
          Returns the EOAttribute objects that describe the stored procedure's arguments.
 void awakeWithPropertyList(NSDictionary propertyList)
          The second phase in a two-phase creation process of a model.
 void beautifyName()
          Renames the receiver's name and its arguments to conform to the Framework's naming conventions.
 void encodeIntoPropertyList(NSMutableDictionary result)
          Encodes the definitions of this EOStoredProcedure into a property list.
 String externalName()
          Returns the name of the stored procedure as it is defined in the database, or null if it doesn't have an external name.
 EOModel model()
          Returns the model to which the receiver belongs.
 String name()
          Returns the name of the stored procedure as it is defined in the EOModel.
 void setArguments(NSArray arguments)
          Sets arguments as the array of EOAttributes that describe the receiver's arguments.
 void setExternalName(String externalName)
          Sets the external name of the stored procedure to externalName.
 void setName(String name)
          Sets the name of this EOStoredProcedure.
 void setUserInfo(NSDictionary dictionary)
          Sets the dictionary of auxiliary data, which your application can use for whatever it needs.
 String toString()
          This constructs and return a string representation of this EOStoredProcedure.
 NSDictionary userInfo()
          Returns a dictionary of user data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOStoredProcedure

public EOStoredProcedure(String name)
The constructor for a EOStoredProcedure (which is a reference to the stored procedure in the database).
Parameters:
name - the name of the stored procedure within the EOModel

EOStoredProcedure

public EOStoredProcedure(NSDictionary propertyList,
                         Object owner)
Creates a new EOStoredProcedure from a property list.
Parameters:
propertyList - NSDictionary a property list conataining the definitions for this stored procedure
owner - this parameter should be of type EOModel; the EOStoredProcedure will store this parameter as its model, but will not yet add itself to the model's list of stored procedures
Method Detail

arguments

public NSArray arguments()
Returns the EOAttribute objects that describe the stored procedure's arguments.
Returns:
array with the arguments of this stored procedure

awakeWithPropertyList

public void awakeWithPropertyList(NSDictionary propertyList)
The second phase in a two-phase creation process of a model.
Specified by:
awakeWithPropertyList in interface EOPropertyListEncoding
Parameters:
propertyList - the property list defining this EOStoredProcedure

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(NSArray), EOModel.beautifyNames()

encodeIntoPropertyList

public void encodeIntoPropertyList(NSMutableDictionary result)
Encodes the definitions of this EOStoredProcedure into a property list.
Specified by:
encodeIntoPropertyList in interface EOPropertyListEncoding
Parameters:
result - the dictionary into which the definitions of this EOStoredProcedure will be written

externalName

public String externalName()
Returns the name of the stored procedure as it is defined in the database, or null if it doesn't have an external name.
Returns:
the external name of the stored procedure on the database server
See Also:
setExternalName(String)

model

public EOModel model()
Returns the model to which the receiver belongs.
Returns:
the model to which the receiver belongs
See Also:
EOModel.addStoredProcedure(EOStoredProcedure)

name

public String name()
Returns the name of the stored procedure as it is defined in the EOModel.
Returns:
the name of the stored procedure
See Also:
setName(String), EOStoredProcedure(String)

setArguments

public void setArguments(NSArray arguments)
Sets arguments as the array of EOAttributes that describe the receiver's arguments.
Parameters:
arguments - an ordered array of the EOAttributes defining the arguments of this EOStoredProcedure
See Also:
arguments()

setExternalName

public void setExternalName(String externalName)
Sets the external name of the stored procedure to externalName. The parameter externalName should be the name of the stored procedure as it is defined in the database.
Parameters:
externalName - external name as defined on the database
See Also:
externalName()

setName

public void setName(String name)
Sets the name of this EOStoredProcedure.
Parameters:
name - String name within the model
See Also:
name(), EOStoredProcedure(String)

setUserInfo

public void setUserInfo(NSDictionary 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).
Parameters:
dictionary - NSDictionary the user dictionary as described above
See Also:
userInfo()

toString

public String toString()
This constructs and return a string representation of this EOStoredProcedure.
Overrides:
toString in class Object
Returns:
a String representation of the receiver

userInfo

public NSDictionary userInfo()
Returns a dictionary of user data. Your application can use this to store any auxiliary information it needs.
Returns:
dictionary of additional user info
See Also:
setUserInfo(NSDictionary)

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.