Java objects - mapping from database.