public class Procedure extends Object implements ConfigurationNode, CayenneMapEntry, XMLSerializable, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected List<ProcedureParameter> |
callParameters |
protected String |
catalog |
protected DataMap |
dataMap |
protected String |
name |
protected boolean |
returningValue |
protected String |
schema |
| Constructor and Description |
|---|
Procedure()
Creates an unnamed procedure object.
|
Procedure(String name)
Creates a named Procedure object.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
acceptVisitor(ConfigurationNodeVisitor<T> visitor) |
void |
addCallParameter(ProcedureParameter param)
Adds new call parameter to the stored procedure.
|
void |
clearCallParameters() |
void |
encodeAsXML(XMLEncoder encoder)
Prints itself as XML to the provided XMLEncoder.
|
List<ProcedureParameter> |
getCallOutParameters()
Returns a list of OUT and INOUT call parameters.
|
List<ProcedureParameter> |
getCallParameters()
Returns an unmodifiable list of call parameters.
|
String |
getCatalog() |
DataMap |
getDataMap() |
String |
getFullyQualifiedName()
Returns procedure name including schema, if present.
|
String |
getName()
Returns the name property of this object.
|
Object |
getParent()
Returns the parent map.
|
ProcedureParameter |
getResultParam()
Returns parameter describing the return value of the StoredProcedure, or null if
procedure does not support return values.
|
String |
getSchema() |
boolean |
isReturningValue()
Returns
true if a stored procedure returns a value. |
void |
removeCallParameter(String name)
Removes a named call parameter.
|
void |
setCallParameters(List<ProcedureParameter> parameters) |
void |
setCatalog(String string)
Sets stored procedure's catalog.
|
void |
setDataMap(DataMap dataMap)
Sets parent DataMap of this entity.
|
void |
setName(String name) |
void |
setParent(Object parent)
Stores the parent map.
|
void |
setReturningValue(boolean returningValue) |
void |
setSchema(String string)
Sets stored procedure's database schema.
|
protected String name
protected DataMap dataMap
protected String catalog
protected String schema
protected boolean returningValue
protected List<ProcedureParameter> callParameters
public Procedure()
public Procedure(String name)
public <T> T acceptVisitor(ConfigurationNodeVisitor<T> visitor)
acceptVisitor in interface ConfigurationNodepublic String getName()
CayenneMapEntrygetName in interface CayenneMapEntrypublic void setName(String name)
public Object getParent()
CayenneMapEntrygetParent in interface CayenneMapEntrypublic void setParent(Object parent)
CayenneMapEntrysetParent in interface CayenneMapEntrypublic void encodeAsXML(XMLEncoder encoder)
encodeAsXML in interface XMLSerializablepublic String getFullyQualifiedName()
public DataMap getDataMap()
public void setDataMap(DataMap dataMap)
public void setCallParameters(List<ProcedureParameter> parameters)
public void addCallParameter(ProcedureParameter param)
param's
parent to be this procedure.public void removeCallParameter(String name)
public void clearCallParameters()
public List<ProcedureParameter> getCallParameters()
public List<ProcedureParameter> getCallOutParameters()
public ProcedureParameter getResultParam()
public boolean isReturningValue()
true if a stored procedure returns a value. The first
parameter in a list of parameters will be assumed to be a descriptor of return
value.public void setReturningValue(boolean returningValue)
public String getCatalog()
public String getSchema()
public void setCatalog(String string)
public void setSchema(String string)
Copyright © 2001–2018 Apache Cayenne. All rights reserved.