Package org.apache.cayenne.map
Class Procedure
java.lang.Object
org.apache.cayenne.map.Procedure
- All Implemented Interfaces:
- Serializable,- ConfigurationNode,- CayenneMapEntry,- XMLSerializable
public class Procedure extends Object implements ConfigurationNode, CayenneMapEntry, XMLSerializable, Serializable
A mapping descriptor for a database stored procedure.
- See Also:
- Serialized Form
- 
Field SummaryFields Modifier and Type Field Description protected List<ProcedureParameter>callParametersprotected Stringcatalogprotected DataMapdataMapprotected Stringnameprotected booleanreturningValueprotected Stringschema
- 
Constructor Summary
- 
Method SummaryModifier and Type Method Description <T> TacceptVisitor(ConfigurationNodeVisitor<T> visitor)voidaddCallParameter(ProcedureParameter param)Adds new call parameter to the stored procedure.voidclearCallParameters()voidencodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate)Prints itself as XML to the provided XMLEncoder.static StringgenerateFullyQualifiedName(String catalog, String schema, String name)Utility function to generate fully qualified name for procedureList<ProcedureParameter>getCallOutParameters()Returns a list of OUT and INOUT call parameters.List<ProcedureParameter>getCallParameters()Returns an unmodifiable list of call parameters.StringgetCatalog()DataMapgetDataMap()StringgetFullyQualifiedName()Returns procedure name including schema and catalog, if present.StringgetName()Returns the name property of this object.ObjectgetParent()Returns the parent map.ProcedureParametergetResultParam()Returns parameter describing the return value of the StoredProcedure, or null if procedure does not support return values.StringgetSchema()booleanisReturningValue()Returnstrueif a stored procedure returns a value.voidremoveCallParameter(String name)Removes a named call parameter.voidsetCallParameters(List<ProcedureParameter> parameters)voidsetCatalog(String string)Sets stored procedure's catalog.voidsetDataMap(DataMap dataMap)Sets parent DataMap of this entity.voidsetName(String name)voidsetParent(Object parent)Stores the parent map.voidsetReturningValue(boolean returningValue)voidsetSchema(String string)Sets stored procedure's database schema.
- 
Field Details- 
name
- 
dataMap
- 
catalog
- 
schema
- 
returningValueprotected boolean returningValue
- 
callParameters
 
- 
- 
Constructor Details- 
Procedurepublic Procedure()Creates an unnamed procedure object.
- 
ProcedureCreates a named Procedure object.
 
- 
- 
Method Details- 
acceptVisitor- Specified by:
- acceptVisitorin interface- ConfigurationNode
- Since:
- 3.1
 
- 
getNameDescription copied from interface:CayenneMapEntryReturns the name property of this object.- Specified by:
- getNamein interface- CayenneMapEntry
- Returns:
- name of this entry.
 
- 
setName
- 
getParentDescription copied from interface:CayenneMapEntryReturns the parent map.- Specified by:
- getParentin interface- CayenneMapEntry
 
- 
setParentDescription copied from interface:CayenneMapEntryStores the parent map.- Specified by:
- setParentin interface- CayenneMapEntry
 
- 
encodeAsXMLPrints itself as XML to the provided XMLEncoder.- Specified by:
- encodeAsXMLin interface- XMLSerializable
- Since:
- 1.1
 
- 
getFullyQualifiedNameReturns procedure name including schema and catalog, if present.
- 
generateFullyQualifiedNameUtility function to generate fully qualified name for procedure
- 
getDataMap- Returns:
- parent DataMap of this entity.
 
- 
setDataMapSets parent DataMap of this entity.
- 
setCallParameters
- 
addCallParameterAdds new call parameter to the stored procedure. Also setsparam's parent to be this procedure.
- 
removeCallParameterRemoves a named call parameter.
- 
clearCallParameterspublic void clearCallParameters()
- 
getCallParametersReturns an unmodifiable list of call parameters.
- 
getCallOutParametersReturns a list of OUT and INOUT call parameters. If procedure has a return value, it will also be included as a call parameter.
- 
getResultParamReturns parameter describing the return value of the StoredProcedure, or null if procedure does not support return values. If procedure supports return parameters, its first parameter is always assumed to be a return result.
- 
isReturningValuepublic boolean isReturningValue()Returnstrueif a stored procedure returns a value. The first parameter in a list of parameters will be assumed to be a descriptor of return value.- Returns:
- boolean
 
- 
setReturningValuepublic void setReturningValue(boolean returningValue)
- 
getCatalog
- 
getSchema
- 
setCatalogSets stored procedure's catalog.
- 
setSchemaSets stored procedure's database schema.
 
-