Examples of DirectoryOutOfSyncException


Examples of fr.soleil.salsa.exception.persistence.DirectoryOutOfSyncException

                preStmt.setObject(3, _d.getId(), Types.INTEGER);
                // preStmt.setObject(4, _d.getTimestamp(), Types.TIMESTAMP);
                // System.out.println("preStmt=" + preStmt.toString());
                int r = preStmt.executeUpdate();
                if (r == 0) {
                    throw new DirectoryOutOfSyncException();
                }
                conn.commit();
            }
            // return _d;
        }
        catch (Exception exc) {
            exc.printStackTrace();
            throw new DirectoryOutOfSyncException();
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.exception.persistence.DirectoryOutOfSyncException

        directoryResult = getDirectoryById(directory.getId(), false);
        if (conn != null) {
            if (directoryResult == null
                    || !directoryResult.getTimestamp().equals(directory.getTimestamp())) {
                conn.rollback();
                throw new DirectoryOutOfSyncException();
            }

            preStmt = conn.prepareStatement(sql);
            preStmt.setObject(1, directory.getId(), Types.INTEGER);
            preStmt.setObject(2, directory.getTimestamp(), Types.TIMESTAMP);
View Full Code Here

Examples of fr.soleil.salsa.exception.persistence.DirectoryOutOfSyncException

            return true;
        }
        catch (SQLException e) {
            rollback();
            CommonsJDBC.catchException(e);
            throw new DirectoryOutOfSyncException();
        }
        finally {
            doCloseConn();
        }
        // return false;
View Full Code Here

Examples of fr.soleil.salsa.exception.persistence.DirectoryOutOfSyncException

                preStmt.setObject(4, _d.getId(), Types.INTEGER);
                preStmt.setObject(5, _d.getTimestamp(), Types.TIMESTAMP);

                int r = preStmt.executeUpdate();
                if (r == 0) {
                    throw new DirectoryOutOfSyncException();
                }
                conn.commit();
            }
            // return _d;
        }
        catch (Exception exc) {
            exc.printStackTrace();
            throw new DirectoryOutOfSyncException();
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.exception.persistence.DirectoryOutOfSyncException

        // Check if the DirectoryImpl exists in the database
        directoryResult = getDirectoryById(directory.getId(), false);
        if (conn != null) {
            if ((directoryResult == null) || !directoryResult.getTimestamp().equals(directory.getTimestamp())) {
                conn.rollback();
                throw new DirectoryOutOfSyncException();
            }

            preStmt = conn.prepareStatement(sql);
            preStmt.setObject(1, directory.getId(), Types.INTEGER);
            preStmt.setObject(2, directory.getTimestamp(), Types.TIMESTAMP);
View Full Code Here

Examples of fr.soleil.salsa.exception.persistence.DirectoryOutOfSyncException

            conn.commit();
            return true;
        } catch (SQLException e) {
            rollback();
            CommonsJDBC.catchException(e);
            throw new DirectoryOutOfSyncException();
        } finally {
            doCloseConn();
        }
        // return false;
    }
View Full Code Here

Examples of fr.soleil.salsa.exception.persistence.DirectoryOutOfSyncException

                preStmt.setObject(2, parentDirectoryId, Types.INTEGER);
                preStmt.setObject(3, _d.getId(), Types.INTEGER);
                LOGGER.trace("SQL request ={}", preStmt.toString());
                int r = preStmt.executeUpdate();
                if (r == 0) {
                    throw new DirectoryOutOfSyncException();
                }
                conn.commit();
            }
        } catch (Exception exc) {
            String errorMessage = "Cannot updateDirectory " + _d + " " + exc.getMessage();
            LOGGER.error(errorMessage);
            LOGGER.debug("Stack trace", exc);
            throw new DirectoryOutOfSyncException();
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.persistence.exception.DirectoryOutOfSyncException

        // Check if the DirectoryImpl exists in the database
        directoryResult = getDirectoryById(directory.getId());
        if (directoryResult == null
                || !directoryResult.getTimestamp().equals(directory.getTimestamp())) {
            conn.rollback();
            throw new DirectoryOutOfSyncException();
        }

        preStmt = conn.prepareStatement(sql);
        preStmt.setObject(1, directory.getId(), Types.INTEGER);
        preStmt.setObject(2, directory.getTimestamp(), Types.TIMESTAMP);
View Full Code Here

Examples of fr.soleil.salsa.persistence.exception.DirectoryOutOfSyncException

            return true;
        }
        catch (SQLException e) {
            rollback();
            CommonsJDBC.catchException(e);
            throw new DirectoryOutOfSyncException();
        }
        finally {
            doCloseConn();
        }
        // return false;
View Full Code Here

Examples of fr.soleil.salsa.persistence.exception.DirectoryOutOfSyncException

            preStmt.setObject(4, _d.getId(), Types.INTEGER);
            preStmt.setObject(5, _d.getTimestamp(), Types.TIMESTAMP);

            int r = preStmt.executeUpdate();
            if (r == 0) {
                throw new DirectoryOutOfSyncException();
            }
            conn.commit();
            // return _d;
        }
        catch (Exception exc) {
            exc.printStackTrace();
            throw new DirectoryOutOfSyncException();
        }
    }
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.