src/main/java/de/uapcore/lightpit/dao/ModuleDao.java

changeset 33
fd8c40ff78c3
parent 31
58f78f0142e8
child 34
824d4042c857
--- a/src/main/java/de/uapcore/lightpit/dao/ModuleDao.java	Sat May 09 14:58:41 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/dao/ModuleDao.java	Sat May 09 15:19:21 2020 +0200
@@ -44,7 +44,7 @@
      *
      * @param result the database result set
      * @param mod    the POJO
-     * @throws SQLException
+     * @throws SQLException on any kind of SQL errors
      */
     protected void mapColumns(ResultSet result, Module mod) throws SQLException {
         mod.setModID(result.getInt("modid"));
@@ -52,19 +52,19 @@
         mod.setVisible(result.getBoolean("visible"));
         mod.setPriority(result.getInt("priority"));
     }
-            
-    
+
+
     /**
      * Must return a prepared statement for a single object query with the specified properties.
-     * 
+     *
      * <ul>
      * <li>Parameter 1: classname</li>
      * <li>Result field 1: visible</li>
      * </ul>
-     * 
+     *
      * @param conn the connection to use
      * @return the prepared statement
-     * @throws SQLException 
+     * @throws SQLException on any kind of SQL errors
      */
     protected PreparedStatement moduleCheckStatement(Connection conn) throws SQLException {
         return conn.prepareStatement("SELECT visible FROM lpitcore_module WHERE classname = ?");
@@ -81,7 +81,7 @@
      *
      * @param conn the connection to use
      * @return the prepared statement
-     * @throws SQLException
+     * @throws SQLException on any kind of SQL errors
      */
     protected PreparedStatement moduleInsertStatement(Connection conn) throws SQLException {
         return conn.prepareStatement("INSERT INTO lpitcore_module (classname, visible, priority) VALUES (?, ?, ?)");
@@ -89,13 +89,13 @@
     
     /**
      * Synchronizes a set of registered module classes with the database.
-     * 
+     *
      * Inserts module classes which are not known to the database and sets them to be visible by default.
      * Module classes known to the database, which are not in the given set, are ignored.
-     * 
+     *
      * @param conn the connection to use
      * @param moduleSet the module set to synchronize
-     * @throws SQLException
+     * @throws SQLException on any kind of SQL errors
      */
     public final void syncRegisteredModuleClasses(Connection conn, Set<Map.Entry<String, LightPITModule>> moduleSet) throws SQLException {
                 
@@ -121,12 +121,12 @@
 
     /**
      * Returns a list of all modules known by the database.
-     * 
+     *
      * Keep in mind, that system modules are never known to the database.
-     * 
+     *
      * @param conn the connection to use
      * @return a list of all modules known by the database
-     * @throws SQLException 
+     * @throws SQLException on any kind of SQL errors
      */
     public List<Module> listAll(Connection conn) throws SQLException {
         List<Module> list = new ArrayList<>();

mercurial