Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.map
Class Procedure

    java.lang.Object
      org.apache.cayenne.map.Procedure

All Implemented Interfaces:
  Serializable, CayenneMapEntry, XMLSerializable

    public class Procedure

extends Object
implements CayenneMapEntry, XMLSerializable, Serializable

A mapping descriptor for a database stored procedure.

See Also:
  Serialized Form

Field Summary
`protected List<ProcedureParameter>` | `callParameters`
`protected String` | `catalog`
`protected DataMap` | `dataMap`
`protected String` | `name`
`protected boolean` | `returningValue`
`protected String` | `schema`

Constructor Summary
`Procedure()` Creates an unnamed procedure object.
`Procedure(String name)` Creates a named Procedure object.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### name

    protected String name

### dataMap

    protected DataMap dataMap

### catalog

    protected String catalog

### schema

    protected String schema

### returningValue

    protected boolean returningValue

### callParameters

    protected List<ProcedureParameter> callParameters

Constructor Detail

### Procedure

    public Procedure()

  Creates an unnamed procedure object.

### Procedure

    public Procedure(String name)

  Creates a named Procedure object.

Method Detail

### getName

    public String getName()

  Description copied from interface: `CayenneMapEntry`
  Returns the name property of this object.

  Specified by:
    `getName` in interface `CayenneMapEntry`
  Returns:
    name of this entry.

### setName

    public void setName(String name)

### getParent

    public Object getParent()

  Description copied from interface: `CayenneMapEntry`
  Returns the parent map.

  Specified by:
    `getParent` in interface `CayenneMapEntry`

### setParent

    public void setParent(Object parent)

  Description copied from interface: `CayenneMapEntry`
  Stores the parent map.

  Specified by:
    `setParent` in interface `CayenneMapEntry`

### encodeAsXML

    public void encodeAsXML(XMLEncoder encoder)

  Prints itself as XML to the provided XMLEncoder.

  Specified by:
    `encodeAsXML` in interface `XMLSerializable`
  Since:
    1.1

### getFullyQualifiedName

    public String getFullyQualifiedName()

  Returns procedure name including schema, if present.

### getDataMap

    public DataMap getDataMap()

  Returns:
    parent DataMap of this entity.

### setDataMap

    public void setDataMap(DataMap dataMap)

  Sets parent DataMap of this entity.

### setCallParameters

    public void setCallParameters(List<ProcedureParameter> parameters)

### addCallParameter

    public void addCallParameter(ProcedureParameter param)

  Adds new call parameter to the stored procedure. Also sets `param`'s parent to be this procedure.

### removeCallParameter

    public void removeCallParameter(String name)

  Removes a named call parameter.

### clearCallParameters

    public void clearCallParameters()

### getCallParameters

    public List<ProcedureParameter> getCallParameters()

  Returns an unmodifiable list of call parameters.

### getCallOutParameters

    public List<ProcedureParameter> getCallOutParameters()

  Returns a list of OUT and INOUT call parameters. If procedure has a return value, it will also be included as a call parameter.

### getResultParam

    public ProcedureParameter getResultParam()

  Returns 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.

### isReturningValue

    public boolean isReturningValue()

  Returns `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.

  Returns:
    boolean

### setReturningValue

    public void setReturningValue(boolean returningValue)

### getCatalog

    public String getCatalog()

### getSchema

    public String getSchema()

### setCatalog

    public void setCatalog(String string)

  Sets stored procedure's catalog.

### setSchema

    public void setSchema(String string)

  Sets stored procedure's database schema.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.