SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Originally posted by Hanna Habashy:
In my design, I don't hard code anything even the number of fields. My schema object reads the databse schema at runtime, then store the information in instance variables. I state in my instruction that, if the number of fields is == 1, then the first field is used as primary key, and if the number of fields is >= 2, the first and the secoond field are used as primary key.I have to add a case if the number of fields is 0, just to be able to handle all possible values.
In my design, I don't hard code anything even the number of fields. My schema object reads the databse schema at runtime, then store the information in instanc variables. I state in my instruction that, if the number of fields is == 1, then the first field is used as primary key, and if the number of fields is >= 2, the first and the secoond field are used as primary key.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |