com.sibvisions.rad.persist.jdbc.param
Class AbstractParam

java.lang.Object
  extended by com.sibvisions.rad.persist.jdbc.param.AbstractParam
Direct Known Subclasses:
InOutParam, InParam, OutParam

public abstract class AbstractParam
extends java.lang.Object

The AbstractParam defines a parameter for JDBC calls.


Nested Class Summary
static class AbstractParam.ParameterType
          The possible parameter types.
 
Field Summary
static int SQLTYPE_AUTOMATIC
          Delegate the type decision to the JDBC driver.
static int SQLTYPE_DECIMAL
          VARCHAR SQL Type Types.DECIMAL.
static int SQLTYPE_TIMESTAMP
          VARCHAR SQL Type Types.TIMESTAMP.
static int SQLTYPE_VARCHAR
          VARCHAR SQL Type Types.VARCHAR.
 
Constructor Summary
protected AbstractParam(AbstractParam.ParameterType pType, int pSqlType, java.lang.Object pValue)
          Creates a new instance of AbstractParam.
protected AbstractParam(AbstractParam.ParameterType pType, int pSqlType, java.lang.String pTypeName, java.lang.Object pValue)
          Creates a new instance of AbstractParam.
protected AbstractParam(AbstractParam.ParameterType pType, java.lang.String pArrayType, java.lang.Object pValue)
          Creates a new instance of AbstractParam.
 
Method Summary
 java.lang.String getArrayType()
          Deprecated. use getTypeName() instead.
 int getSqlType()
          Gets the SQL type.
 AbstractParam.ParameterType getType()
          Gets the parameter type.
 java.lang.String getTypeName()
          Gets the SQL type name.
 java.lang.Object getValue()
          Gets the current value.
 void setValue(java.lang.Object pValue)
          Sets the current value.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SQLTYPE_AUTOMATIC

public static final int SQLTYPE_AUTOMATIC
Delegate the type decision to the JDBC driver.

See Also:
Constant Field Values

SQLTYPE_VARCHAR

public static final int SQLTYPE_VARCHAR
VARCHAR SQL Type Types.VARCHAR.

See Also:
Constant Field Values

SQLTYPE_DECIMAL

public static final int SQLTYPE_DECIMAL
VARCHAR SQL Type Types.DECIMAL.

See Also:
Constant Field Values

SQLTYPE_TIMESTAMP

public static final int SQLTYPE_TIMESTAMP
VARCHAR SQL Type Types.TIMESTAMP.

See Also:
Constant Field Values
Constructor Detail

AbstractParam

protected AbstractParam(AbstractParam.ParameterType pType,
                        int pSqlType,
                        java.lang.Object pValue)
Creates a new instance of AbstractParam.

Parameters:
pType - the parameter type
pSqlType - the SQL type
pValue - the value

AbstractParam

protected AbstractParam(AbstractParam.ParameterType pType,
                        java.lang.String pArrayType,
                        java.lang.Object pValue)
Creates a new instance of AbstractParam.

Parameters:
pType - the parameter type
pArrayType - the array type
pValue - the value

AbstractParam

protected AbstractParam(AbstractParam.ParameterType pType,
                        int pSqlType,
                        java.lang.String pTypeName,
                        java.lang.Object pValue)
Creates a new instance of AbstractParam.

Parameters:
pType - the parameter type
pSqlType - the SQL type
pTypeName - the array type
pValue - the value
Method Detail

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

getType

public AbstractParam.ParameterType getType()
Gets the parameter type.

Returns:
the type

getSqlType

public int getSqlType()
Gets the SQL type.

Returns:
the SQL Type
See Also:
Types

getArrayType

@Deprecated
public java.lang.String getArrayType()
Deprecated. use getTypeName() instead.

Gets the SQL type name.

Returns:
the SQL type name
See Also:
Types

getTypeName

public java.lang.String getTypeName()
Gets the SQL type name.

Returns:
the SQL type name
See Also:
Types

getValue

public java.lang.Object getValue()
Gets the current value.

Returns:
the value

setValue

public void setValue(java.lang.Object pValue)
Sets the current value.

Parameters:
pValue - the value


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.