Package com.salas.bb.persistence

Examples of com.salas.bb.persistence.PersistenceException


        if (e instanceof PersistenceException)
        {
            throw (PersistenceException)e;
        } else
        {
            throw new PersistenceException(message, e);
        }
    }
View Full Code Here


            stmt.executeUpdate();
            commit();
        } catch (SQLException e)
        {
            rollback();
            throw new PersistenceException("Failed to add deleted object record.", e);
        } finally
        {
            close(stmt);
        }
    }
View Full Code Here

            stmt.executeUpdate();
            commit();
        } catch (SQLException e)
        {
            rollback();
            throw new PersistenceException("Failed to delete deleted object record.", e);
        } finally
        {
            close(stmt);
        }
    }
View Full Code Here

            rs.close();
            commit();
        } catch (SQLException e)
        {
            rollback();
            throw new PersistenceException("Failed to fetch a deleted object record.", e);
        } finally
        {
            close(stmt);
        }
View Full Code Here

            stmt.executeUpdate();
            commit();
        } catch (SQLException e)
        {
            rollback();
            throw new PersistenceException("Failed to purge deleted object records.", e);
        } finally
        {
            close(stmt);
        }
    }
View Full Code Here

        try
        {
            getConnection().createStatement().execute("CHECKPOINT DEFRAG");
        } catch (SQLException e)
        {
            throw new PersistenceException("Compacting failed.", e);
        }
    }
View Full Code Here

        try
        {
            makeBackup(directory);
        } catch (IOException e)
        {
            throw new PersistenceException("Failed to backup the database.", e);
        }
    }
View Full Code Here

            ResultSet rs = stmt.executeQuery();
            if (rs.next()) value = rs.getString(1);
        } catch (SQLException e)
        {
            throw new PersistenceException("Failed to get application property (" + key + ")", e);
        }

        return value;
    }
View Full Code Here

                stmt.setString(2, value);
                rows = stmt.executeUpdate();

                if (rows == 0)
                {
                    throw new PersistenceException(
                        "Failed to insert new application property (" + key + ")");
                }
            }
        } catch (SQLException e)
        {
            throw new PersistenceException(
                "Failed to set application property (" + key + ")", e);
        }
    }
View Full Code Here

                if (stmt != null) stmt.close();
            }
        } catch (SQLException e)
        {
            LOG.log(Level.SEVERE, "Failed to get most visited guides", e);
            throw new PersistenceException("Error finding most visited guides", e);
        }

        return stats;
    }
View Full Code Here

TOP

Related Classes of com.salas.bb.persistence.PersistenceException

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.