org.objectweb.cjdbc.common.sql.schema
Class DatabaseProcedureParameter

java.lang.Object
  extended byorg.objectweb.cjdbc.common.sql.schema.DatabaseProcedureParameter

public class DatabaseProcedureParameter
extends java.lang.Object

Represents a parameter of procedure

Author:
Nicolas Modrzyk

Field Summary
private  int columnType
           
private  int dataType
           
private  int length
           
private  java.lang.String name
           
private  int nullable
           
private  float precision
           
static int ProcedureColumnIn
          IN parameter
static int ProcedureColumnInOut
          INOUT parameter
static int ProcedureColumnOut
          OUT parameter
static int ProcedureColumnResult
          procedure return value
static int ProcedureColumnReturn
          procedure return value
static int ProcedureColumnUnknown
          nobody knows
static int ProcedureNoNulls
          does not allow NULL values
static int ProcedureNullable
          allows NULL values
static int ProcedureNullableUnknown
          nullability unknown
private  int radix
           
private  java.lang.String remarks
           
private  int scale
           
private  java.lang.String typeName
           
 
Constructor Summary
DatabaseProcedureParameter(java.lang.String name, int columnType, int nullable)
          Reduced version of constructor for static schemas
DatabaseProcedureParameter(java.lang.String name, int columnType, int dataType, java.lang.String typeName, float precision, int length, int scale, int radix, int nullable, java.lang.String remarks)
           
 
Method Summary
 boolean equals(java.lang.Object other)
          Two DatabaseProcedureParameter are considered equal if they have the same name and the same descriptive attributes.
 int getColumnType()
           
static java.lang.String getColumnTypeFromInt(int type)
          get column type given an int
static int getColumnTypeFromString(java.lang.String type)
          get type from string
 int getDataType()
           
 int getLength()
           
 java.lang.String getName()
           
 int getNullable()
           
static java.lang.String getNullFromInt(int nullable)
          get null ability given an int
static int getNullFromString(java.lang.String nullable)
          get null ability given a string
 float getPrecision()
           
 int getRadix()
           
 java.lang.String getRemarks()
           
 int getScale()
           
 java.lang.String getTypeName()
           
 java.lang.String getXml()
          Get xml information about this procedure.
 void setColumnType(int columnType)
           
 void setDataType(int dataType)
           
 void setLength(int length)
           
 void setName(java.lang.String name)
           
 void setNullable(int nullable)
           
 void setPrecision(int precision)
           
 void setRadix(int radix)
           
 void setRemarks(java.lang.String remarks)
           
 void setScale(int scale)
           
 void setTypeName(java.lang.String typeName)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ProcedureColumnUnknown

public static final int ProcedureColumnUnknown
nobody knows

See Also:
Constant Field Values

ProcedureColumnIn

public static final int ProcedureColumnIn
IN parameter

See Also:
Constant Field Values

ProcedureColumnInOut

public static final int ProcedureColumnInOut
INOUT parameter

See Also:
Constant Field Values

ProcedureColumnOut

public static final int ProcedureColumnOut
OUT parameter

See Also:
Constant Field Values

ProcedureColumnReturn

public static final int ProcedureColumnReturn
procedure return value

See Also:
Constant Field Values

ProcedureColumnResult

public static final int ProcedureColumnResult
procedure return value

See Also:
Constant Field Values

ProcedureNoNulls

public static final int ProcedureNoNulls
does not allow NULL values

See Also:
Constant Field Values

ProcedureNullable

public static final int ProcedureNullable
allows NULL values

See Also:
Constant Field Values

ProcedureNullableUnknown

public static final int ProcedureNullableUnknown
nullability unknown

See Also:
Constant Field Values

name

private java.lang.String name

columnType

private int columnType

dataType

private int dataType

typeName

private java.lang.String typeName

precision

private float precision

length

private int length

scale

private int scale

radix

private int radix

nullable

private int nullable

remarks

private java.lang.String remarks
Constructor Detail

DatabaseProcedureParameter

public DatabaseProcedureParameter(java.lang.String name,
                                  int columnType,
                                  int nullable)
Reduced version of constructor for static schemas

Parameters:
name - column/parameter name
columnType - kind of column/parameter
nullable - can it contain NULL?

DatabaseProcedureParameter

public DatabaseProcedureParameter(java.lang.String name,
                                  int columnType,
                                  int dataType,
                                  java.lang.String typeName,
                                  float precision,
                                  int length,
                                  int scale,
                                  int radix,
                                  int nullable,
                                  java.lang.String remarks)
Parameters:
name - column/parameter name
columnType - kind of column/parameter
dataType - SQL type from java.sql.Types
typeName - SQL type name, for a UDT type the type name is fully qualified
precision - precision
length - length in bytes of data
scale - scale
radix - radix
nullable - can it contain NULL?
remarks - comment describing parameter/column
Method Detail

getNullFromString

public static int getNullFromString(java.lang.String nullable)
get null ability given a string

Parameters:
nullable - recognized are "nonulls" and "nullable"
Returns:
value given the java specification

getNullFromInt

public static java.lang.String getNullFromInt(int nullable)
get null ability given an int

Parameters:
nullable - as an integer
Returns:
a string conformed to dtd

getColumnTypeFromInt

public static java.lang.String getColumnTypeFromInt(int type)
get column type given an int

Parameters:
type - as an int from the java specification
Returns:
a description as a string

getColumnTypeFromString

public static int getColumnTypeFromString(java.lang.String type)
get type from string

Parameters:
type - of the parameter
Returns:
value given the java specification

getColumnType

public final int getColumnType()
Returns:
Returns the columnType.

setColumnType

public final void setColumnType(int columnType)
Parameters:
columnType - The columnType to set.

getDataType

public final int getDataType()
Returns:
Returns the dataType.

setDataType

public final void setDataType(int dataType)
Parameters:
dataType - The dataType to set.

getLength

public final int getLength()
Returns:
Returns the length.

setLength

public final void setLength(int length)
Parameters:
length - The length to set.

getName

public final java.lang.String getName()
Returns:
Returns the name.

setName

public final void setName(java.lang.String name)
Parameters:
name - The name to set.

getNullable

public final int getNullable()
Returns:
Returns the nullable.

setNullable

public final void setNullable(int nullable)
Parameters:
nullable - The nullable to set.

getPrecision

public final float getPrecision()
Returns:
Returns the precision.

setPrecision

public final void setPrecision(int precision)
Parameters:
precision - The precision to set.

getRadix

public final int getRadix()
Returns:
Returns the radix.

setRadix

public final void setRadix(int radix)
Parameters:
radix - The radix to set.

getRemarks

public final java.lang.String getRemarks()
Returns:
Returns the remarks.

setRemarks

public final void setRemarks(java.lang.String remarks)
Parameters:
remarks - The remarks to set.

getScale

public final int getScale()
Returns:
Returns the scale.

setScale

public final void setScale(int scale)
Parameters:
scale - The scale to set.

getTypeName

public final java.lang.String getTypeName()
Returns:
Returns the typeName.

setTypeName

public final void setTypeName(java.lang.String typeName)
Parameters:
typeName - The typeName to set.

equals

public boolean equals(java.lang.Object other)
Two DatabaseProcedureParameter are considered equal if they have the same name and the same descriptive attributes.

Parameters:
other - the object to compare with
Returns:
true if the DatabaseProcedureParameter are equal

getXml

public java.lang.String getXml()
Get xml information about this procedure.

Returns:
xml formatted information on this database procedure.


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.