## org.eclipse.datatools.sqltools.core.dbitem
Class ParameterDescriptor

    java.lang.Object
      org.eclipse.datatools.sqltools.core.dbitem.ParameterDescriptor

public class ParameterDescriptor
extends java.lang.Object

This class is the meta information of a parameter passed to a procedure call.

Author:
  Yang Liu

Constructor Summary
`ParameterDescriptor(DatabaseIdentifier databaseIdentifier, java.lang.String name, int parmType, int sqlDataType, int precision, short scale, java.lang.String typeName, short nullable, java.lang.String comment)` Constructs a ParameterDescriptor

Method Summary
`boolean` `canBeNull()`
`DatabaseIdentifier` `getDatabaseIdentifier()`
`java.lang.String` `getDefaultValue()`
`java.lang.String` `getName()`
`java.lang.String` `getParamTypeAsString()`
`int` `getParmType()`
`int` `getPrecision()` Retrieves the designated parameter's number of decimal digits.
`short` `getScale()` Retrieves the designated parameter's number of digits to right of the decimal point.
`int` `getSqlDataType()`
`java.lang.String` `getSqlTypeNameFromParser()`
`java.lang.String` `getTypeName()`
`boolean` `isOutput()`
`boolean` `isStringType()`
`void` `setDefaultValue(java.lang.String value)`
`void` `setParmType(int paramType)`
`void` `setSqlTypeNameFromParser(java.lang.String typeNameFromParser)`

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

Constructor Detail

### ParameterDescriptor

    public ParameterDescriptor(DatabaseIdentifier databaseIdentifier,
                               java.lang.String name,
                               int parmType,
                               int sqlDataType,
                               int precision,
                               short scale,
                               java.lang.String typeName,
                               short nullable,
                               java.lang.String comment)

  Constructs a ParameterDescriptor

Parameters:
  `databaseIdentifier` -
  `name` - parameter name
  `parmType` - @see #org.eclipse.datatools.modelbase.sql.routines.ParameterMode
  `sqlDataType` - data type defined in `java.sql.Types`
  `precision` - parameter precision
  `scale` - parameter scale
  `typeName` - parameter type name
  `nullable` - @see `DatabaseMetaData`
  `comment` - optional comment

Method Detail

### getName

    public java.lang.String getName()

  Returns:
    the parameter name

### canBeNull

    public boolean canBeNull()

  Returns:
    whether `NULL` values are allowed.

### getParmType

    public int getParmType()

  Returns:
    parameter in/out type

### setParmType

    public void setParmType(int paramType)

  Parameters:
    `paramType` - parameter in/out type

### getSqlDataType

    public int getSqlDataType()

  Returns:
    parameter data type

### getTypeName

    public java.lang.String getTypeName()

  Returns:
    parameter data type name

### getPrecision

    public int getPrecision()

  Retrieves the designated parameter's number of decimal digits.

  Returns:
    parameter data type precision

### getScale

    public short getScale()

  Retrieves the designated parameter's number of digits to right of the decimal point.

  Returns:
    parameter data type scale

### getParamTypeAsString

    public java.lang.String getParamTypeAsString()

  Returns:
    the string representation of the parameter in/out type

### isStringType

    public boolean isStringType()

  Returns:
    whether the parameter is a string type

### isOutput

    public boolean isOutput()

  Returns:
    whether this is a output parameter

### getDefaultValue

    public java.lang.String getDefaultValue()

  Returns:
    the default value.

### setDefaultValue

    public void setDefaultValue(java.lang.String value)

  Parameters:
    `value` - The default value to set.

### getDatabaseIdentifier

    public DatabaseIdentifier getDatabaseIdentifier()

### getSqlTypeNameFromParser

    public java.lang.String getSqlTypeNameFromParser()

  Returns:
    the sql type name given by parser.

### setSqlTypeNameFromParser

    public void setSqlTypeNameFromParser(java.lang.String typeNameFromParser)

  Parameters:
    `typeNameFromParser` - the sql type name given by parser.

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.