コード例 #1
0
ファイル: MainController.java プロジェクト: zdavatz/amiko-web
 private Medication cursorToMedi(ResultSet result) {
   Medication medi = new Medication();
   try {
     medi.setId(result.getLong(1)); // KEY_ROWID
     medi.setTitle(result.getString(2)); // KEY_TITLE
     medi.setAuth(result.getString(3)); // KEY_AUTH
     medi.setAtcCode(result.getString(4)); // KEY_ATCCODE
     medi.setSubstances(result.getString(5)); // KEY_SUBSTANCES
     medi.setRegnrs(result.getString(6)); // KEY_REGNRS
     medi.setAtcClass(result.getString(7)); // KEY_ATCCLASS
     medi.setTherapy(result.getString(8)); // KEY_THERAPY
     medi.setApplication(result.getString(9)); // KEY_APPLICATION
     medi.setIndications(result.getString(10)); // KEY_INDICATIONS
     medi.setCustomerId(result.getInt(11)); // KEY_CUSTOMER_ID
     medi.setPackInfo(result.getString(12)); // KEY_PACK_INFO
     medi.setAddInfo(result.getString(13)); // KEY_ADD_INFO
     medi.setSectionIds(result.getString(14)); // KEY_SECTION_IDS
     medi.setSectionTitles(result.getString(15)); // KEY_SECTION_TITLES
     medi.setContent(result.getString(16)); // KEY_CONTENT
     // KEY_STYLE... (ignore)
     medi.setPackages(result.getString(18)); // KEY_PACKAGES
   } catch (SQLException e) {
     System.err.println(">> SqlDatabase: SQLException in cursorToMedi");
   }
   return medi;
 }