Package org.apache.jackrabbit.oak.plugins.document

Examples of org.apache.jackrabbit.oak.plugins.document.DocumentStoreException


     */
    public RDBDocumentStore(DataSource ds, DocumentMK.Builder builder, RDBOptions options) {
        try {
            initialize(ds, builder, options);
        } catch (Exception ex) {
            throw new DocumentStoreException("initializing RDB document store", ex);
        }
    }
View Full Code Here


                    if (hasChangesToCollisions(update)) {
                        update.increment(NodeDocument.COLLISIONSMODCOUNT, 1);
                    }
                    UpdateUtils.applyChanges(doc, update, comparator);
                    if (!update.getId().equals(doc.getId())) {
                        throw new DocumentStoreException("ID mismatch - UpdateOp: " + update.getId() + ", ID property: "
                                + doc.getId());
                    }
                    docs.add(doc);
                }
                insertDocuments(collection, docs);
View Full Code Here

        if (oldDoc == null) {
            if (!allowCreate) {
                return null;
            } else if (!update.isNew()) {
                throw new DocumentStoreException("Document does not exist: " + update.getId());
            }
            T doc = collection.newDocument(this);
            if (checkConditions && !UpdateUtils.checkConditions(doc, update)) {
                return null;
            }
View Full Code Here

                        }
                    }
                }

                if (!success) {
                    throw new DocumentStoreException("failed update of " + doc.getId() + " (race?) after " + maxRetries + " retries");
                }

                return oldDoc;
            } finally {
                l.unlock();
View Full Code Here

        String tableName = getTable(collection);
        List<T> result = new ArrayList<T>();
        if (indexedProperty != null && (!INDEXEDPROPERTIES.contains(indexedProperty))) {
            String message = "indexed property " + indexedProperty + " not supported, query was '>= '" + startValue + "'; supported properties are "+ INDEXEDPROPERTIES;
            LOG.info(message);
            throw new DocumentStoreException(message);
        }
        try {
            connection = getConnection();
            long now = System.currentTimeMillis();
            List<RDBRow> dbresult = dbQuery(connection, tableName, fromKey, toKey, indexedProperty, startValue, limit);
            for (RDBRow r : dbresult) {
                T doc = runThroughCache(collection, r, now);
                result.add(doc);
            }
        } catch (Exception ex) {
            LOG.error("SQL exception on query", ex);
            throw new DocumentStoreException(ex);
        } finally {
            closeConnection(connection);
        }
        return result;
    }
View Full Code Here

        try {
            connection = getConnection();
            RDBRow row = dbRead(connection, tableName, id);
            return row != null ? SR.fromRow(collection, row) : null;
        } catch (Exception ex) {
            throw new DocumentStoreException(ex);
        } finally {
            closeConnection(connection);
        }
    }
View Full Code Here

        try {
            connection = getConnection();
            dbDelete(connection, tableName, Collections.singletonList(id));
            connection.commit();
        } catch (Exception ex) {
            throw new DocumentStoreException(ex);
        } finally {
            closeConnection(connection);
        }
    }
View Full Code Here

            try {
                connection = getConnection();
                dbDelete(connection, tableName, sublist);
                connection.commit();
            } catch (Exception ex) {
                throw new DocumentStoreException(ex);
            } finally {
                closeConnection(connection);
            }
        }
    }
View Full Code Here

                    connection.rollback();
                }
            } catch (SQLException e) {
                // TODO
            }
            throw new DocumentStoreException(ex);
        } finally {
            closeConnection(connection);
        }
    }
View Full Code Here

                    connection.rollback();
                }
            } catch (SQLException e) {
                // TODO
            }
            throw new DocumentStoreException(ex);
        } finally {
            closeConnection(connection);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.document.DocumentStoreException

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.