Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.adf.model.adapter.dataformat
Class MethodDef

`java.lang.Object
oracle.adf.model.adapter.dataformat.MethodDef`

All Implemented Interfaces:
  Definition, NamedDefinition, OperationDefinition

public class MethodDef
extends java.lang.Object
implements OperationDefinition

Defines a method of a data control.

Since:
  10.1.3
Version:
  1.0

Field Summary
`static java.lang.String` | `RET_NAME`

Fields inherited from interface oracle.binding.meta.OperationDefinition
`CUSTOM`

Fields inherited from interface oracle.binding.meta.Definition
`TYPE_ACCESSOR, TYPE_ATTRIBUTE, TYPE_DATACONTROL, TYPE_DEFINITION, TYPE_DEFINITIONCONTEXT, TYPE_METHODRETURN, TYPE_NAMED, TYPE_OPERATION, TYPE_PARAMETER, TYPE_STRUCTURE, TYPE_VARIABLE`

Constructor Summary
`MethodDef(java.lang.String name, StructureDefinition parent)` Creates a method definition.
`MethodDef(java.lang.String name, StructureDefinition parent, java.lang.String retType)` Creates a method definition with a simple return type.

Method Summary
`void` | `addParameter(ParameterDefinition paramDef)` Adds a parameter to the method.
`void` | `addParameter(java.lang.String name, java.lang.String type)` Adds a parameter to the method.
`java.lang.String` | `getBindPath()` Gets the bind path of the definition if set.
`DataControlDefinition` | `getDataControlDefinition()` Returns the definition of the DataControl that this method belongs to.
`Definition` | `getDefinitionParent()` Returns the parent of this method.
`int` | `getDefinitionType()` Retrieves the type of this definition.
`java.lang.String` | `getFullName()` Returns the full name of the definition.
`java.lang.String` | `getName()` Returns the name of this method.
`int` | `getOperationId()` Retrieves the operation id of the operation.
`DefinitionContainer` | `getOperationParameters()` Gets the parameters defined for the method.
`MethodReturnDefinition` | `getOperationReturnType()` Returns the return type of the method.
`java.util.Hashtable` | `getProperties()` Gets the table of properties.
`java.lang.Object` | `getProperty(java.lang.String propertyName)` Retrieves the value of a property with the given name.
`void` | `setBindPath(java.lang.String path)` Sets the bind path.
`void` | `setReturnCollectionStructure(StructureDefinition def)` Sets the collection structure for the return type.
`void` | `setReturnName(java.lang.String name)` Sets the return name.
`void` | `setReturnType(MethodReturnDef def)` Sets a return type.
`void` | `setReturnType(java.lang.String type)` Sets a return type.
`void` | `setReturnType(java.lang.String type, boolean collection)` Sets a return type.
`void` | `setReturnType(StructureDefinition def)` Sets a return type.
`void` | `setReturnType(StructureDefinition def, boolean collection)` Sets a return type.

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

Field Detail

### RET_NAME

    public static final java.lang.String RET_NAME

Constructor Detail

### MethodDef

    public MethodDef(java.lang.String name,
                     StructureDefinition parent)

  Creates a method definition. The default return type is void.
Parameters:
  `name` - name of the method.
  `parent` - structure definition that contains this method.

### MethodDef

    public MethodDef(java.lang.String name,
                     StructureDefinition parent,
                     java.lang.String retType)

  Creates a method definition with a simple return type.
Parameters:
  `name` - name of the method.
  `parent` - structure definition that contains this method.
  `retType` - the class name of the simple return type.

Method Detail

### setReturnName

    public void setReturnName(java.lang.String name)

  Sets the return name. Return names are displayed when a method returns a complex structure. The default name is "Return".

### addParameter

    public void addParameter(ParameterDefinition paramDef)

  Adds a parameter to the method.
  Parameters:
    `paramDef` - definition of the parameter.

### addParameter

    public void addParameter(java.lang.String name,
                             java.lang.String type)

  Adds a parameter to the method.
  Parameters:
    `name` - name of the parameter.
    `type` - simple type name of the parameter.

### setReturnType

    public void setReturnType(MethodReturnDef def)

  Sets a return type.
  Parameters:
    `def` - a structure that describes a complex return type.

### setReturnType

    public void setReturnType(StructureDefinition def)

  Sets a return type.
  Parameters:
    `def` - a structure that describes a complex return type.

### setReturnType

    public void setReturnType(java.lang.String type)

  Sets a return type.
  Parameters:
    `type` - a simple java type.

### setReturnType

    public void setReturnType(StructureDefinition def,
                              boolean collection)

  Sets a return type.
  Parameters:
    `def` - a structure that describes a complex return type.
    `collection` - true if the return type is a collection.

### setReturnType

    public void setReturnType(java.lang.String type,
                              boolean collection)

  Sets a return type.
  Parameters:
    `type` - a simple java type.
    `collection` - true if the return type is a collection.

### setReturnCollectionStructure

    public void setReturnCollectionStructure(StructureDefinition def)

  Sets the collection structure for the return type. Collection structures usually contain methods applicable for the collection.

### setBindPath

    public void setBindPath(java.lang.String path)

  Sets the bind path.

### getBindPath

    public java.lang.String getBindPath()

  Gets the bind path of the definition if set.

### getName

    public java.lang.String getName()

  Returns the name of this method.
  Specified by:
    `getName` in interface `NamedDefinition`
  Returns:
    method name.

### getDefinitionParent

    public Definition getDefinitionParent()

  Returns the parent of this method.
  Specified by:
    `getDefinitionParent` in interface `NamedDefinition`
  Returns:
    a `StructureDefinition` that contains this method.

### getFullName

    public java.lang.String getFullName()

  Returns the full name of the definition.
  Specified by:
    `getFullName` in interface `NamedDefinition`
  Returns:
    If the bind path is defined it returns the bind path. If bind path is not defined and the parent is defined then it returns <parent_path>.<this_name>. Otherwise it returns the name of the definition.

### getProperty

    public java.lang.Object getProperty(java.lang.String propertyName)

  Description copied from interface: `NamedDefinition`
  Retrieves the value of a property with the given name. Properties can be used for UI hints such as display width and height.
  Specified by:
    `getProperty` in interface `NamedDefinition`
  Parameters:
    `propertyName` - Name of the property to be retrieved.
  Returns:
    Value of the property with the given property name.

### getProperties

    public java.util.Hashtable getProperties()

  Description copied from interface: `NamedDefinition`
  Gets the table of properties. This returns a hashtable to ensure any modification done by caller would be synchronized. Note that this API has not been added to the JSR yet.
  Specified by:
    `getProperties` in interface `NamedDefinition`
  Returns:
    a hashtable of properties.

### getDefinitionType

    public int getDefinitionType()

  Description copied from interface: `Definition`
  Retrieves the type of this definition. It can be one of the TYPE_* constants defined in this class. This is useful to find out the actual type of the Definition without doing an instanceof operations.
  Specified by:
    `getDefinitionType` in interface `Definition`
  Returns:
    The type of definition that this Definition implementation class implements.

### getOperationReturnType

    public MethodReturnDefinition getOperationReturnType()

  Returns the return type of the method.
  Specified by:
    `getOperationReturnType` in interface `OperationDefinition`
  Returns:
    a `MethodReturnDefinition` for the return type.

### getDataControlDefinition

    public DataControlDefinition getDataControlDefinition()

  Returns the definition of the DataControl that this method belongs to.
  Specified by:
    `getDataControlDefinition` in interface `OperationDefinition`
  Returns:
    a `DataControlDefinition` of the DataControl that this method belongs to.

### getOperationId

    public int getOperationId()

  Description copied from interface: `OperationDefinition`
  Retrieves the operation id of the operation.
  Specified by:
    `getOperationId` in interface `OperationDefinition`
  Returns:
    CUSTOM as the operation id since this class is used for custom methods.

### getOperationParameters

    public DefinitionContainer getOperationParameters()

  Gets the parameters defined for the method.
  Specified by:
    `getOperationParameters` in interface `OperationDefinition`
  Returns:
    a `DefinitionContainer` containing the parameter definitions.
  See Also:
    `ParameterDefinition`, `EmptyDefinitionContainer`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.