Esempio n. 1
0
 /**
  * Select the topic data from the database
  *
  * @param name the name of the topic
  * @return <code>null</code> if no data was found
  * @throws Exception
  */
 public TopicData selectTopic(String name) throws Exception {
   TopicData topicData = new TopicData(name);
   fSelectContent.setString(1, name);
   ResultSet resultSet = fSelectContent.executeQuery();
   try {
     while (resultSet.next()) {
       topicData.setContent(resultSet.getString(1));
       return topicData;
     }
   } finally {
     resultSet.close();
   }
   return null;
 }