This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hiya folks, Wonder if anyone can help me with my latest endeavor. I have a set of Java entities (POJOs) with getter and setter methods that will store data. These entities are going to be processed by stored procedures, but based on the application that consumes them, they need to be processed differently. So rather than writing a crazy "if" statement or multiple objects that do basically the same thing, just in different formats, and since all of the actual meat happens in stored procedures in the database...I want to create an xml document that stores some information about the entity, and appropriate stored procs that process them. I need to bind the strings stored within the xml to Java types but I am a little confused on how to get this done. In order to populate the CallableStatement that will execute the stored procedure, I need some values within the entity objects (i.e. I need to be able to call the getter methods). So for example: I have an entity named MyObject that has a method named getSomething() which returns a String. I can create MyObject by using: Class.forName("myClass").newInstance(); My problem is that I want to get the value that getSomething() returns but I am not sure how to do it. I have a string in the xml that corresponds to the getter method call in MyObject, but I don't know how to convert that string into an actual invocation of the getSomething method and have it return a value. I am almost positive this can be done, but I am unsure of how to do it. Can anyone give me an example or point me in the direction of how to do it? Thanks in advance! Matt [ October 23, 2003: Message edited by: M Givney ] [ October 23, 2003: Message edited by: M Givney ] [ October 23, 2003: Message edited by: M Givney ]