code: public Object mapToResultType(ControlBeanContext context, Method m, ResultSet resultSet, Calendar cal) {
  
          final Class returnType = m.getReturnType();
          final boolean isArray = returnType.isArray();
  
          try {
              if (isArray) {
                  final SQL methodSQL = context.getMethodPropertySet(m, SQL.class);
                  return arrayFromResultSet(resultSet, methodSQL.arrayMaxLength(), returnType, cal);
              } else {
                  if (!resultSet.next()) {
                      return _tmf.fixNull(m.getReturnType());
                  }
                  return RowMapperFactory.getRowMapper(resultSet, returnType, cal).mapRowToReturnType();
              }
          } catch (SQLException e) {
              throw new ControlException(e.getMessage(), e);
          }
      }
docs: Map the ResultSet to the method's return type. The object type returned is defined by the return type of the method.
  
  @param context   A ControlBeanContext instance, see Beehive controls javadoc for additional information
  @param m         Method assoicated with this call.
  @param resultSet Result set to map.
  @param cal       A Calendar instance for time/date value resolution.
  @return The Object resulting from the ResultSet