Examples of PersistenceManagerException


Examples of de.nava.informa.utils.manager.PersistenceManagerException

          // We can do nothing here.
        }
      }

      LOG.log(Level.SEVERE, "Could not create item.", e);
      throw new PersistenceManagerException("Could not create item.", e);
    } finally {
      HibernateUtil.closeSession();
    }
  }
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

        if (instance == null) {
            try {
                instance = new PersistenceManager();
            } catch (Exception ex) {
                Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
                throw new PersistenceManagerException();
            }
        }
        return instance;
    }
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

                user.setAdmin(resultSet.getBoolean("admin"));
                authentic = true;
            }
        } catch (SQLException ex) {
            Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
            throw new PersistenceManagerException();
        } finally {
            this.close(statement);
            this.close(resultSet);
        }
        log("User '" + user.getUsername() + "' attempted to log into reception with password '******' [success = '" + authentic + "'].");
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

        } catch (SQLException ex) {
            if (ex.getErrorCode() == 30000) {
                throw new ExistingUserException();
            } else {
                Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
                throw new PersistenceManagerException();
            }
        } finally {
            this.close(statement);
        }
    }
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

            statement.executeUpdate("UPDATE " + userTable + " SET password = '" + new String(user.getPassword())
                    + "', admin = " + (user.isAdmin() ? 1 : 0) + " WHERE username = '" + user.getUsername() + "'");
            log("User '" + user.getUsername() + "' modified with password = '******' and admin = '" + user.isAdmin()+ "'");
        } catch (SQLException ex) {
            Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
            throw new PersistenceManagerException();
        } finally {
            this.close(statement);
        }
    }
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

            statement = this.getStatement();
            statement.executeUpdate("DELETE FROM " + userTable + " WHERE username = '" + user.getUsername() + "'");
           log("User '" + user.getUsername() + "' deleted with password = '******' and admin = '" + user.isAdmin()+ "'");
        } catch (SQLException ex) {
            Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
            throw new PersistenceManagerException();
        } finally {
            this.close(statement);
        }
    }
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

            statement.executeUpdate("INSERT INTO " + departmentTable + "(name, code) VALUES ('"
                    + department.getName() + "', '" + department.getCode() + "')");
            log("Department '" + department.getName() + "' created with code = '" + department.getCode()+ "'");
        } catch (SQLException ex) {
            Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
            throw new PersistenceManagerException();
        } finally {
            this.close(statement);
        }
    }
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

            statement.executeUpdate("UPDATE " + departmentTable + " SET code = '"
                    + department.getCode() + "' WHERE name = '" + department.getName() + "'");
            log("Department '" + department.getName() + "' modified with code = '" + department.getCode()+ "'");
        } catch (SQLException ex) {
            Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
            throw new PersistenceManagerException();
        } finally {
            this.close(statement);
        }
    }
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

            statement = this.getStatement();
            statement.executeUpdate("DELETE FROM " + departmentTable + " WHERE name = '" + department.getName() + "'");
            log("Department '" + department.getName() + "' deleted with code = '" + department.getCode()+ "'");
        } catch (SQLException ex) {
            Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
            throw new PersistenceManagerException();
        } finally {
            this.close(statement);
        }
    }
View Full Code Here

Examples of ke.go.moh.oec.reception.controller.exceptions.PersistenceManagerException

            if (resultSet.next()) {
                exist = false;
            }
        } catch (SQLException ex) {
            Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
            throw new PersistenceManagerException(ex.getMessage());
        }
        return exist;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.