Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
public class myUDFunctionProvider extends UDFunctionProvider {
	public myUDFunctionProvider() {
		// any state implementations can occur here...
		super.setFunctionClasses(new Class<?>[] { ns1_func1.class, ns2_func2.class, ns1_func3.class });
	}

	public Object lookupFunctionClass(String namespace, String name) {
		switch( String.join("_", namespace, name)) {
			case "ns1_func1":
				return new func1();
			case "ns2_func2":
				return new func2();
			case "ns1_func3":
				return new func3_randomName();
			default:
				return null;
		}
	}
}

...

  • Warning: No annotation present in function class(es). Class will be ignored
  • Error: No User Defined function class with specified name/namespace found
  • Error: No evaluate function found in function class object

Testing

  • Bad UDFs
    • Provider Checks
      • No provider class
      • No
      annotationNo
      • or empty functionClass list (i.e getFunctionClasses is empty)
    • Function Class Checks
      • No evaluate function
      • Annotations Checks
        • No FunctionClassInfo annotation
        • Elements not filled in/empty
  • All Providers found
  • All functionClasses of providers found 
  • Evaluate method for all function classes can be called

Prototype

UDF Jars: HAEMSLConversions.jar and UDFunctionProviderImpl.jar. Both extend UDFunctionProvider.jar.

...