com.ibm.as400.access

Class AS400JDBCParameterMetaData

  • java.lang.Object
    • com.ibm.as400.access.AS400JDBCParameterMetaData
  • All Implemented Interfaces:
    java.sql.ParameterMetaData, java.sql.Wrapper


    public class AS400JDBCParameterMetaData
    extends java.lang.Object
    implements java.sql.ParameterMetaData
    The AS400JDBCParameterMetaData class can be used to retrieve information about the parameters of a PreparedStatement. Use PreparedStatement.getParameterMetaData() to create new ParameterMetaData objects.
    • Field Summary

      • Fields inherited from interface java.sql.ParameterMetaData

        parameterModeIn, parameterModeInOut, parameterModeOut, parameterModeUnknown, parameterNoNulls, parameterNullable, parameterNullableUnknown
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String getDB2ParameterName(int parameterIndex)
      Returns the name of the specified parameter.
      int getParameterCCSID(int parameterIndex)
      Returns the CCSID of the specified parameter.
      java.lang.String getParameterClassName(int parameterIndex)
      Returns the fully-qualified name of the Java class of the specified parameter.
      int getParameterCount()
      Returns the number of parameters in this ParameterMetaData object.
      int getParameterMode(int parameterIndex)
      Returns the mode of the specified parameter or if that information is unknown.
      int getParameterType(int parameterIndex)
      Returns the SQL type of the specified parameter.
      java.lang.String getParameterTypeName(int parameterIndex)
      Returns the database-specific type name of the specified parameter.
      int getPrecision(int parameterIndex)
      Returns the number of decimal digits of the specified parameter.
      int getScale(int parameterIndex)
      Returns the number of digits to the right of the decimal point of the specified parameter.
      protected java.lang.String[] getValidWrappedList() 
      int isNullable(int parameterIndex)
      Returns if the specified parameter can be null or that information is unknown.
      boolean isSigned(int parameterIndex)
      Returns if values can be signed numbers for the specified parameter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.sql.Wrapper

        isWrapperFor, unwrap
    • Method Detail

      • getDB2ParameterName

        public java.lang.String getDB2ParameterName(int parameterIndex)
                                             throws java.sql.SQLException
        Returns the name of the specified parameter.
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        The parameter name
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getParameterClassName

        public java.lang.String getParameterClassName(int parameterIndex)
                                               throws java.sql.SQLException
        Returns the fully-qualified name of the Java class of the specified parameter.
        Specified by:
        getParameterClassName in interface java.sql.ParameterMetaData
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        The fully-qualified name of the Java class.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getParameterCount

        public int getParameterCount()
                              throws java.sql.SQLException
        Returns the number of parameters in this ParameterMetaData object.
        Specified by:
        getParameterCount in interface java.sql.ParameterMetaData
        Returns:
        The number of parameters in the ParameterMetaData object.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getParameterMode

        public int getParameterMode(int parameterIndex)
                             throws java.sql.SQLException
        Returns the mode of the specified parameter or if that information is unknown.
        Specified by:
        getParameterMode in interface java.sql.ParameterMetaData
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        The mode of the parameter. Valid values are ParameterMetaData.parameterModeIn, ParameterMetaData.parameterModeOut, ParameterMetaData.parameterModeInOut, and ParameterMetaData.parameterModeUnknown.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getParameterType

        public int getParameterType(int parameterIndex)
                             throws java.sql.SQLException
        Returns the SQL type of the specified parameter.
        Specified by:
        getParameterType in interface java.sql.ParameterMetaData
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        The SQL type of the parameter.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getParameterCCSID

        public int getParameterCCSID(int parameterIndex)
                              throws java.sql.SQLException
        Returns the CCSID of the specified parameter.
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        The ccisd of the parameter.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getParameterTypeName

        public java.lang.String getParameterTypeName(int parameterIndex)
                                              throws java.sql.SQLException
        Returns the database-specific type name of the specified parameter.
        Specified by:
        getParameterTypeName in interface java.sql.ParameterMetaData
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        The type name of the parameter.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getPrecision

        public int getPrecision(int parameterIndex)
                         throws java.sql.SQLException
        Returns the number of decimal digits of the specified parameter.
        Specified by:
        getPrecision in interface java.sql.ParameterMetaData
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        The precision of the parameter.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getScale

        public int getScale(int parameterIndex)
                     throws java.sql.SQLException
        Returns the number of digits to the right of the decimal point of the specified parameter.
        Specified by:
        getScale in interface java.sql.ParameterMetaData
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        The scale of the parameter.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • isNullable

        public int isNullable(int parameterIndex)
                       throws java.sql.SQLException
        Returns if the specified parameter can be null or that information is unknown.
        Specified by:
        isNullable in interface java.sql.ParameterMetaData
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        Returns if the parameter can be null. The valid values are ParameterMetaData.parameterNoNulls, ParameterMetaData.parameterNullable, and ParameterMetaData.parameterNullableUnknown.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • isSigned

        public boolean isSigned(int parameterIndex)
                         throws java.sql.SQLException
        Returns if values can be signed numbers for the specified parameter.
        Specified by:
        isSigned in interface java.sql.ParameterMetaData
        Parameters:
        parameterIndex - The parameter index (1-based).
        Returns:
        Returns true if values for the specified parameter can be signed numbers, false otherwise.
        Throws:
        java.sql.SQLException - If the prepared statement is not open.
      • getValidWrappedList

        protected java.lang.String[] getValidWrappedList()