Ejemplo n.º 1
0
 private void init(boolean force) throws SQLException {
   try {
     // at least try to compile the class, otherwise the data type is not
     // initialized if it could be
     load();
   } catch (SQLException e) {
     if (!force) {
       throw e;
     }
   }
 }
Ejemplo n.º 2
0
 /**
  * Find the Java method that matches the arguments.
  *
  * @param args the argument list
  * @return the Java method
  * @throws SQLException if no matching method could be found
  */
 public JavaMethod findJavaMethod(Expression[] args) throws SQLException {
   load();
   int parameterCount = args.length;
   for (JavaMethod m : javaMethods) {
     int count = m.getParameterCount();
     if (count == parameterCount || (m.isVarArgs() && count <= parameterCount + 1)) {
       return m;
     }
   }
   throw Message.getSQLException(
       ErrorCode.METHOD_NOT_FOUND_1,
       methodName + " (" + className + ", parameter count: " + parameterCount + ")");
 }
Ejemplo n.º 3
0
 /**
  * Get the Java methods mapped by this function.
  *
  * @return the Java methods.
  */
 public JavaMethod[] getJavaMethods() throws SQLException {
   load();
   return javaMethods;
 }