Package org.boxsql.logEngine

Examples of org.boxsql.logEngine.LogEngine


      }catch (SQLException sqlex){
         sqlex.printStackTrace();
         return null;
      }catch (ClassNotFoundException cnfex){
         if(GlobalSettings.logActive)
            new LogEngine().logMessage(cnfex.getStackTrace().toString(), GlobalSettings.logPath, "ERROR");
         cnfex.printStackTrace();
         return null;
      }
      return connection;
   }
View Full Code Here


      try{
         final ResultSetHandler bean = new BeanListHandler(clazz);
         return (List) runner.query(conn, sql, null, bean);
      }catch (final SQLException e){
         if(GlobalSettings.logActive)
            new LogEngine().logMessage(e.getStackTrace().toString(), GlobalSettings.logPath, "ERROR");
         throw new RuntimeException(e);
      }
   }
View Full Code Here

      try{
         final ResultSetHandler bean = new BeanHandler(clazz);
         return runner.query(conn, sql, null, bean);
      }catch (final SQLException e){
         if(GlobalSettings.logActive)
            new LogEngine().logMessage(e.getStackTrace().toString(), GlobalSettings.logPath, "ERROR");
         throw new RuntimeException(e);
      }
   }
View Full Code Here

   public int update(final String sql) {
      try{
         return runner.update(conn, sql);
      }catch (final SQLException e){
         if(GlobalSettings.logActive)
            new LogEngine().logMessage(e.getStackTrace().toString(), GlobalSettings.logPath, "ERROR");

         throw new RuntimeException(e);
      }
   }
View Full Code Here

         return csmt.getUpdateCount();

      }catch (final SQLException ex){
         if(GlobalSettings.logActive)
            new LogEngine().logMessage(ex.getStackTrace().toString(), GlobalSettings.logPath, "ERROR");

         throw new RuntimeException(ex);

      }
   }
View Full Code Here

      try{
         conn.close();
         conn = null;
      }catch (final SQLException ex){
         if(GlobalSettings.logActive)
            new LogEngine().logMessage(ex.getStackTrace().toString(), GlobalSettings.logPath, "ERROR");

         throw new RuntimeException(ex);
      }
   }
View Full Code Here

      try{
         // TODO: Transaction treatment must be implemented.
         conn.commit();
      }catch (final SQLException ex){
         if(GlobalSettings.logActive)
            new LogEngine().logMessage(ex.getStackTrace().toString(), GlobalSettings.logPath, "ERROR");
         throw new RuntimeException(ex);
      }
   }
View Full Code Here

      try{
         // TODO: Transaction treatment must be implemented.
         conn.rollback();
      }catch (final SQLException ex){
         if(GlobalSettings.logActive)
            new LogEngine().logMessage(ex.getStackTrace().toString(), GlobalSettings.logPath, "ERROR");
         throw new RuntimeException(ex);
      }
   }
View Full Code Here

      final StringBuffer query = new StringBuffer();
      query.append(newSQL);

      if (GlobalSettings.logActive) {
         new LogEngine().logMessage(query.toString(), GlobalSettings.logPath, "INFO");
      }

      return query.toString().trim();
   }
View Full Code Here

        final StringBuffer query = new StringBuffer();
        query.append(sql);

        if (GlobalSettings.logActive) {
           new LogEngine().logMessage(query.toString(), GlobalSettings.logPath, "INFO");
        }

        return query.toString().trim();
     }
View Full Code Here

TOP

Related Classes of org.boxsql.logEngine.LogEngine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.