code: static int getParameterSQLTypeNumber(Class c) {
  
          String name;
          int    type;
  
          if (c == null) {
              throw Error.runtimeError(ErrorCode.U_S0500, "Types");
          }
  
          if (Void.TYPE.equals(c)) {
              return Types.SQL_ALL_TYPES;
          }
  
          name = c.getName();
          type = javaTypeNumbers.get(name, Integer.MIN_VALUE);
  
          if (type == Integer.MIN_VALUE) {
  
              // byte[] is already covered as BINARY in typeAliases
              if (c.isArray()) {
                  while (c.isArray()) {
                      c = c.getComponentType();
                  }
  
                  if (c.isPrimitive()
                          || java.io.Serializable.class.isAssignableFrom(c)) {
                      type = OTHER;
                  }
              } else if (java.io.Serializable.class.isAssignableFrom(c)) {
                  type = OTHER;
              }
          }
  
          if (type == Integer.MIN_VALUE) {
              throw Error.error(ErrorCode.X_42561);
          }
  
          return type;
      }
docs: Retrieves the type number corresponding to the class
  of an IN, IN OUT or OUT parameter.  <p>
  
  This method extends getTypeNr to return OTHER for
  primitive arrays, classes that directly implement
  java.io.Serializable and non-primitive arrays whose
  base component implements java.io.Serializable,
  allowing, for instance, arguments and return types of
  primitive arrays, Serializable objects and arrays,
  of Serializable objects.  Direct primitive types
  other than those mapping directly to the internal
  wrapper form are not yet handled.  That is, HSQLDB
  cannot yet properly deal with CALLs involving methods
  with primitive byte, short, float or their
  corresponding wrappers, due to the way internal
  conversion works and lack of detection and narrowing
  code in Function to allow this.  In other words,
  passing in or retrieving any of the mentioned types
  always causes conversion to a wider internal wrapper
  which is genrally incompatible under reflective
  invocation, resulting in an IllegalArgumentException.
  
  @param  c a Class instance
  @return java.sql.Types int value
  @throws  HsqlException