Package org.openengsb.core.edb.api

Examples of org.openengsb.core.edb.api.EDBException


    @Override
    public JPACommit getCommit(Long from) throws EDBException {
        List<JPACommit> commits = dao.getJPACommit(from);
        if (commits == null || commits.size() == 0) {
            throw new EDBException("There is no commit for this timestamp");
        } else if (commits.size() > 1) {
            throw new EDBException("There are more than one commit for one timestamp");
        }
        return commits.get(0);
    }
View Full Code Here


    }

    @Override
    public void deleteCommit(UUID revision) throws EDBException {
        if (revision == null) {
            throw new EDBException("null revision not allowed");
        }
        JPACommit commit = dao.getJPACommit(revision.toString());
        QueryRequest request =
            QueryRequest.create().deleted().orJoined();
        for (String oid : commit.getDeletions()) {
View Full Code Here

    }

    @Override
    public void onPreCommit(EDBCommit commit) throws EDBException {
        if (!(commit instanceof JPACommit)) {
            throw new EDBException("Unsupported EDBCommit type");
        }
        JPACommit orig = (JPACommit) commit;
        List<JPAObject> insertFails = null;
        List<JPAObject> updateFails = null;
        List<String> deleteFails = null;
View Full Code Here

            if (!modelVersion.equals(currentVersion)) {
                try {
                    checkForConflict(newObject);
                } catch (EDBException e) {
                    LOGGER.info("conflict detected, user get informed");
                    throw new EDBException("conflict was detected. There is a newer version of the model with the oid "
                            + oid + " saved.");
                }
                modelVersion = currentVersion;
            }
        } else {
View Full Code Here

            JPAEntry rival = object.getEntry(entry.getKey());
            String value = rival != null ? rival.getValue() : null;
            if (value == null || !value.equals(entry.getValue())) {
                LOGGER.debug("Conflict detected at key {} when comparing {} with {}", new Object[]{ entry.getKey(),
                    entry.getValue(), value == null ? "null" : value });
                throw new EDBException("Conflict detected. Failure when comparing the values of the key "
                        + entry.getKey());
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.edb.api.EDBException

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.