Sunday, March 11, 2007

ObjectFactory Class

I created a Java class on the server side called ObjectFactory. This class converts each record from the database into a Java Object.

Most of the column names in the database start with a capital letter. If I don't change the column names to start with a lowercase then I will violate the Java naming convention that variable names should start with a lowercase. If I change the column names when calling a stored procedure, I am afraid that this will not work. So I think the solution would be writing a Java class that take a column name from the database and then convert the first letter of the name to lowercase.

No comments: