Skip to Content
avatar image
Former Member

Calling builtin functions from user defined functions

Hello

Can we call mapping builtin methods from our simple or advance java functions? e.g. can we have like

if(a.equals(ResultList.CC))

removeContexts();

I tried using this but was giving error of undefined method. I hope our GUI mappings ultimately creates one Java class and these methods are the part of it. so can we call them inside our custom functions?

Thanks in advance.

Regards

Rajeev

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 24, 2007 at 05:58 AM

    >>Can we call mapping builtin methods from our simple or advance java functions?

    This is not possible. But you can chain them to get the desired result. For example the output of the UDF can be mapped as the input of "removeContext" node function and the output of the "removeContext" can be mapped to the target.

    Regards,

    Jai Shankar

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 24, 2007 at 06:01 AM

    Rajeev,

    Any special reason for this?

    In an User Defined Function, you can write any Java Code and so it provides more independence to manipulate and write your logic as per requirements which the standard functions do not allow.

    If you are writing a user defined function, you can always write you won java codde to handle any requirement that you want and so , I dont see any value in calling built in functions from user Defined Functions. I woudl rather write the custom code and have more flexibilty for the same.

    Regards

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

    • Rajeev,

      if you want to make a UDF generic across your Software components , one option which we have used successfully.

      1. Create a Generic Software Component.

      2. All other software components you create for your projecrt should have a Usage Dependency on this Software Component created in the SLD.

      3. Now, write a class with the code for the UDF and create a JAR file for this and import it under imported archive of the Generic Software Component.

      4. You can now, use this Class in any UDF across any Software Compoenent by creating an Object of this class and calling the corresponding methods this class.

      Regards

      Bhavesh

  • avatar image
    Former Member
    Jan 24, 2007 at 06:04 AM

    Can we call mapping builtin methods from our simple or advance java functions? e.g. can we have like

    It is not possible,But you can use both UDF and builtin functions in your mapping.

    ex: source structure->udf>builtinfunciton-->target strucutre.

    This can be possible.Please let me know if you have any quieries.

    Thanks and Regards,

    Sekhar

    Add comment
    10|10000 characters needed characters exceeded