org.springframework.jdbc.core.namedparam

Class AbstractSqlParameterSource

  • java.lang.Object
    • org.springframework.jdbc.core.namedparam.AbstractSqlParameterSource
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getSqlType(java.lang.String paramName)
      Return the SQL type for the given parameter, if registered.
      java.lang.String getTypeName(java.lang.String paramName)
      Return the type name for the given parameter, if registered.
      void registerSqlType(java.lang.String paramName, int sqlType)
      Register a SQL type for the given parameter.
      void registerTypeName(java.lang.String paramName, java.lang.String typeName)
      Register a SQL type for the given parameter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractSqlParameterSource

        public AbstractSqlParameterSource()
    • Method Detail

      • registerSqlType

        public void registerSqlType(java.lang.String paramName,
                                    int sqlType)
        Register a SQL type for the given parameter.
        Parameters:
        paramName - the name of the parameter
        sqlType - the SQL type of the parameter
      • registerTypeName

        public void registerTypeName(java.lang.String paramName,
                                     java.lang.String typeName)
        Register a SQL type for the given parameter.
        Parameters:
        paramName - the name of the parameter
        typeName - the type name of the parameter
      • getSqlType

        public int getSqlType(java.lang.String paramName)
        Return the SQL type for the given parameter, if registered.
        Specified by:
        getSqlType in interface SqlParameterSource
        Parameters:
        paramName - the name of the parameter
        Returns:
        the SQL type of the parameter, or TYPE_UNKNOWN if not registered
        See Also:
        SqlParameterSource.TYPE_UNKNOWN
      • getTypeName

        @Nullable
        public java.lang.String getTypeName(java.lang.String paramName)
        Return the type name for the given parameter, if registered.
        Specified by:
        getTypeName in interface SqlParameterSource
        Parameters:
        paramName - the name of the parameter
        Returns:
        the type name of the parameter, or null if not registered