Amir Rachum
Amir Rachum

Reputation: 79615

Database handlers for Servlets

I'm about to start developing a dynamic web application with Java (i.e., Servlets and JSP).
Obviously I will need to keep a database with all sorts of information (Users, etc.). My question is - is there a good library for saving/storing/retrieving from a database for this kind of application?
I don't mean JDBC, which is used to send queries and parse results, but some sort of abstraction for saving and loading my object to/from the database.

Currently, I am trying to develop some sort of generic classes for handling of these cases in django style (i.e., classes have a save() method), but since these are generic, I suppose something ought to exist already.

Upvotes: 4

Views: 113

Answers (1)

Jack Edmonds
Jack Edmonds

Reputation: 33171

It sounds like you are looking for an Object Relational Mapping (ORM) tool. ORMs map rows in a table to objects in your code. In fact, what you have been using in Django is an ORM.

Hibernate is one such ORM that will let you describe how your Java objects should be mapped.

Upvotes: 5

Related Questions