I have a requirement where value of one field in an object will be determined dynamically using a configurable table. For example, suppose I have the following table -
1 | TAB_REF.AMOUNT
where TAB_REF is a reference table and AMOUNT is one of the column of TAB_REF table.
If above value exists in the database, the amount in the application will be obtained from the TAB_REF.AMOUNT column.
My requirement is, for the above dataset I will have a class called TabRef and that class will have a method getAmount(). I have to identify the class and the method in my application using the above value.
My idea is to writing an API which will create the Class name with the substring before (.) and another API to generate the method with substring after (.). But I don't think this is a good idea. Is there any better idea to accomplish the requirement? Please suggest, thanks in advance.