com.metamatrix.query.function.metadata
Class FunctionParameter

java.lang.Object
  extended by com.metamatrix.query.function.metadata.FunctionParameter
All Implemented Interfaces:
java.io.Serializable

public class FunctionParameter
extends java.lang.Object
implements java.io.Serializable

A function parameter defines the name and description of an input or output parameter for a function. The name should not be null, but that is not verified by this class. Validation of this object can be done with the FunctionMetadataValidator. The type string used in the function parameter should be one of the standard type names defined in DataTypeManager.DefaultDataTypes.

See Also:
Serialized Form

Field Summary
static java.lang.String OUTPUT_PARAMETER_NAME
           
 
Constructor Summary
FunctionParameter()
          Construct a function parameter with no attributes.
FunctionParameter(java.lang.String name, java.lang.String type)
          Construct a function parameter with no description.
FunctionParameter(java.lang.String name, java.lang.String type, java.lang.String description)
          Construct a function parameter with all attributes.
FunctionParameter(java.lang.String name, java.lang.String type, java.lang.String description, boolean vararg)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare with other object for equality.
 java.lang.String getDescription()
          Get description of parameter
 java.lang.String getName()
          Return name of parameter.
 java.lang.String getType()
          Get type of parameter
 int hashCode()
          Return hash code for this parameter.
 boolean isVarArg()
           
 void setDescription(java.lang.String description)
          Set description of parameter
 void setName(java.lang.String name)
          Set name
 void setType(java.lang.String type)
          Set type of parameter
 void setVarArg(boolean isVarArg)
           
 java.lang.String toString()
          Return string version for debugging purposes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OUTPUT_PARAMETER_NAME

public static final java.lang.String OUTPUT_PARAMETER_NAME
See Also:
Constant Field Values
Constructor Detail

FunctionParameter

public FunctionParameter()
Construct a function parameter with no attributes.


FunctionParameter

public FunctionParameter(java.lang.String name,
                         java.lang.String type)
Construct a function parameter with no description.

Parameters:
name - Name
type - Type from standard set of types

FunctionParameter

public FunctionParameter(java.lang.String name,
                         java.lang.String type,
                         java.lang.String description)
Construct a function parameter with all attributes.

Parameters:
name - Name
type - Type from standard set of types
description - Description

FunctionParameter

public FunctionParameter(java.lang.String name,
                         java.lang.String type,
                         java.lang.String description,
                         boolean vararg)
Method Detail

getName

public java.lang.String getName()
Return name of parameter.

Returns:
Name

setName

public void setName(java.lang.String name)
Set name

Parameters:
name - Name

getDescription

public java.lang.String getDescription()
Get description of parameter

Returns:
Description

setDescription

public void setDescription(java.lang.String description)
Set description of parameter

Parameters:
description - Description

getType

public java.lang.String getType()
Get type of parameter

Returns:
Type name
See Also:
DataTypeManager.DefaultDataTypes

setType

public void setType(java.lang.String type)
Set type of parameter

Parameters:
type - Type of parameter
See Also:
DataTypeManager.DefaultDataTypes

hashCode

public int hashCode()
Return hash code for this parameter. The hash code is based only on the type of the parameter. Changing the type of the parameter after placing this object in a hashed collection will likely cause the object to be lost.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code

equals

public boolean equals(java.lang.Object obj)
Compare with other object for equality. Equality is based on whether the type is the same as the other parameter.

Overrides:
equals in class java.lang.Object
Returns:
True if equal to obj

toString

public java.lang.String toString()
Return string version for debugging purposes

Overrides:
toString in class java.lang.Object
Returns:
String representation of function parameter

setVarArg

public void setVarArg(boolean isVarArg)

isVarArg

public boolean isVarArg()


Copyright © 2009. All Rights Reserved.