1 package olr.om; 2 3 import java.sql.Connection; 4 import java.sql.ResultSet; 5 import java.util.List; 6 7 import org.apache.torque.util.Criteria; 8 9 /*** 10 * The skeleton for this class was autogenerated by Torque on: 11 * 12 * [Wed Jun 16 21:12:50 CEST 2004] 13 * 14 * You should add additional methods to this class to meet the application requirements. This class 15 * will only be generated as long as it does not already exist in the output directory. 16 */ 17 public class RdfSchemaPeer extends olr.om.BaseRdfSchemaPeer { 18 19 public static List getAllSchemas() throws Exception { 20 return RdfSchemaPeer.doSelect(new Criteria()); 21 } 22 23 /*** 24 * @deprecated 25 * @param titel 26 * @return 27 */ 28 public static boolean isCourseSchema(String titel) { 29 Connection dbConn = null; 30 boolean course = false; 31 try { 32 dbConn = DBUtils.getConnection(); 33 String sql = "SELECT iscourseschema FROM rdf_schema WHERE rdf_schema.short_name='" 34 + titel + "'"; 35 ResultSet rs = dbConn.createStatement().executeQuery(sql); 36 while (rs.next()) { 37 38 if (rs.getString("iscourseschema").equalsIgnoreCase("Y")) 39 course = true; 40 } 41 rs.close(); 42 } catch (Exception e) { 43 e.printStackTrace(); 44 } 45 DBUtils.releaseConnection(dbConn); 46 return course; 47 } 48 }