Package org.apache.cayenne.map
Class ProcedureParameter
java.lang.Object
org.apache.cayenne.map.ProcedureParameter
- All Implemented Interfaces:
Serializable,ConfigurationNode,CayenneMapEntry,XMLSerializable
public class ProcedureParameter
extends Object
implements ConfigurationNode, CayenneMapEntry, XMLSerializable, Serializable
A descriptor for the Procedure parameter.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates unnamed ProcedureParameter.ProcedureParameter(String name) ProcedureParameter(String name, int type, int direction) -
Method Summary
Modifier and TypeMethodDescription<T> TacceptVisitor(ConfigurationNodeVisitor<T> visitor) voidencodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate) Prints itself as XML to the provided PrintWriter.intReturns the direction of this parameter.intgetName()Returns the name property of this object.Returns the parent map.intReturns the procedure that holds this parameter.intgetType()booleanbooleanvoidsetDirection(int direction) Sets the direction of this parameter.voidsetMaxLength(int i) voidvoidStores the parent map.voidsetPrecision(int i) voidsetProcedure(Procedure procedure) Sets the procedure that holds this parameter.voidsetType(int i)
-
Field Details
-
IN_OUT_PARAMETER
public static final int IN_OUT_PARAMETER- See Also:
-
IN_PARAMETER
public static final int IN_PARAMETER- See Also:
-
OUT_PARAMETER
public static final int OUT_PARAMETER- See Also:
-
name
-
procedure
-
direction
protected int direction -
maxLength
protected int maxLength -
precision
protected int precision -
type
protected int type
-
-
Constructor Details
-
ProcedureParameter
public ProcedureParameter()Creates unnamed ProcedureParameter. -
ProcedureParameter
-
ProcedureParameter
-
-
Method Details
-
acceptVisitor
- Specified by:
acceptVisitorin interfaceConfigurationNode
-
getName
Description copied from interface:CayenneMapEntryReturns the name property of this object.- Specified by:
getNamein interfaceCayenneMapEntry- Returns:
- name of this entry.
-
setName
-
getParent
Description copied from interface:CayenneMapEntryReturns the parent map.- Specified by:
getParentin interfaceCayenneMapEntry
-
setParent
Description copied from interface:CayenneMapEntryStores the parent map.- Specified by:
setParentin interfaceCayenneMapEntry
-
encodeAsXML
Prints itself as XML to the provided PrintWriter.- Specified by:
encodeAsXMLin interfaceXMLSerializable- Since:
- 1.1
-
getDirection
public int getDirection()Returns the direction of this parameter. Possible values can be IN_PARAMETER, OUT_PARAMETER, IN_OUT_PARAMETER, VOID_PARAMETER. -
getMaxLength
public int getMaxLength() -
getPrecision
public int getPrecision() -
getType
public int getType() -
isInParameter
public boolean isInParameter()- Returns:
trueif this is IN or INOUT parameter.
-
isOutParam
public boolean isOutParam()- Returns:
trueif this is OUT or INOUT parameter.
-
setDirection
public void setDirection(int direction) Sets the direction of this parameter. Acceptable values of direction are defined as int constants in ProcedureParam class. If an attempt is made to set an invalid attribute's direction, an IllegalArgumentException is thrown by this method. -
setMaxLength
public void setMaxLength(int i) -
setPrecision
public void setPrecision(int i) -
setType
public void setType(int i) -
getProcedure
Returns the procedure that holds this parameter. -
setProcedure
Sets the procedure that holds this parameter.
-