I have a question.
I am developing GUI modules first to start with for the assignment.
I am trying to extend Data class and add methods like
String[] getFieldNames(), String[] getValuesFor(String fieldName), etc.
getFieldNames gives me all the field names. I thought writing this way makes it dynamic. Even if a new fields are added to database, still this code works.
Similarly, getValuesFor method gives me list of values for a particular fieldName like source or destination.
Is there anyone who tried like this. What is the best way to do in this kind of situations.
- Sai