/** * Checks whether this is a constraint violation exception. * * @return {@code true} iff this is a constraint violation exception */ public boolean isConstraintViolation() { return isOfType(CONSTRAINT); }
/** * Checks whether this is an access control violation exception. * * @return {@code true} iff this is an access control violation exception */ public boolean isAccessControlViolation() { return isOfType(ACCESS_CONTROL); }
/** * Checks whether this is an access violation exception. * * @return {@code true} iff this is an access violation exception */ public boolean isAccessViolation() { return isOfType(ACCESS); }
/** * Checks whether this is an access control violation exception. * * @return {@code true} iff this is an access control violation exception */ public boolean isAccessControlViolation() { return isOfType(ACCESS_CONTROL); }
/** * Checks whether this is an access violation exception. * * @return {@code true} iff this is an access violation exception */ public boolean isAccessViolation() { return isOfType(ACCESS); }
/** * Checks whether this is a constraint violation exception. * * @return {@code true} iff this is a constraint violation exception */ public boolean isConstraintViolation() { return isOfType(CONSTRAINT); }
/** * Checks whether this is an access violation exception. * * @return {@code true} iff this is an access violation exception */ public boolean isAccessViolation() { return isOfType(ACCESS); }
/** * Checks whether this is an access control violation exception. * * @return {@code true} iff this is an access control violation exception */ public boolean isAccessControlViolation() { return isOfType(ACCESS_CONTROL); }
/** * Checks whether this is a constraint violation exception. * * @return {@code true} iff this is a constraint violation exception */ public boolean isConstraintViolation() { return isOfType(CONSTRAINT); }
@NotNull @Override public NodeState merge(@NotNull CommitHook hook, @NotNull CommitInfo info) throws CommitFailedException { try { return merge0(hook, info, false); } catch (CommitFailedException e) { if (!e.isOfType(MERGE)) { throw e; } } // retry with exclusive lock, blocking other // concurrent writes return merge0(hook, info, true); }
@NotNull @Override public NodeState merge(@NotNull CommitHook hook, @NotNull CommitInfo info) throws CommitFailedException { try { return merge0(hook, info, false); } catch (CommitFailedException e) { if (!e.isOfType(MERGE)) { throw e; } } // retry with exclusive lock, blocking other // concurrent writes return merge0(hook, info, true); }
if (isConstraintViolation()) { return new ConstraintViolationException(message, this); } else if (isOfType(NAMESPACE)) { return new NamespaceException(message, this); } else if (isOfType(NODE_TYPE)) { return new NoSuchNodeTypeException(message, this); } else if (isAccessViolation()) { } else if (isAccessControlViolation()) { return new AccessControlException(message, this); } else if (isOfType(INTEGRITY)) { return new ReferentialIntegrityException(message, this); } else if (isOfType(STATE)) { return new InvalidItemStateException(message, this); } else if (isOfType(MERGE)) { return new InvalidItemStateException(message, this); } else if (isOfType(VERSION)) { return new VersionException(message, this); } else if (isOfType(LABEL_EXISTS)) { return new LabelExistsVersionException(message, this); } else if (isOfType(LOCK)) { return new LockException(message, this); } else if (isOfType(UNSUPPORTED)) { return new UnsupportedRepositoryOperationException(message, this); } else {
if (isConstraintViolation()) { return new ConstraintViolationException(message, this); } else if (isOfType(NAMESPACE)) { return new NamespaceException(message, this); } else if (isOfType(NODE_TYPE)) { return new NoSuchNodeTypeException(message, this); } else if (isAccessViolation()) { } else if (isAccessControlViolation()) { return new AccessControlException(message, this); } else if (isOfType(INTEGRITY)) { return new ReferentialIntegrityException(message, this); } else if (isOfType(STATE)) { return new InvalidItemStateException(message, this); } else if (isOfType(MERGE)) { return new InvalidItemStateException(message, this); } else if (isOfType(VERSION)) { return new VersionException(message, this); } else if (isOfType(LABEL_EXISTS)) { return new LabelExistsVersionException(message, this); } else if (isOfType(LOCK)) { return new LockException(message, this); } else if (isOfType(UNSUPPORTED)) { return new UnsupportedRepositoryOperationException(message, this); } else {
if (isConstraintViolation()) { return new ConstraintViolationException(message, this); } else if (isOfType(NAMESPACE)) { return new NamespaceException(message, this); } else if (isOfType(NODE_TYPE)) { return new NoSuchNodeTypeException(message, this); } else if (isAccessViolation()) { } else if (isAccessControlViolation()) { return new AccessControlException(message, this); } else if (isOfType(INTEGRITY)) { return new ReferentialIntegrityException(message, this); } else if (isOfType(STATE)) { return new InvalidItemStateException(message, this); } else if (isOfType(MERGE)) { return new InvalidItemStateException(message, this); } else if (isOfType(VERSION)) { return new VersionException(message, this); } else if (isOfType(LABEL_EXISTS)) { return new LabelExistsVersionException(message, this); } else if (isOfType(LOCK)) { return new LockException(message, this); } else if (isOfType(UNSUPPORTED)) { return new UnsupportedRepositoryOperationException(message, this); } else {
if (!ex.isOfType(MERGE)) { throw ex;
if (!ex.isOfType(MERGE)) { throw ex;
} catch (CommitFailedException ex) { if (ex.isOfType(CommitFailedException.STATE) && ex.getCode() == 1) { throw newConcurrentUpdateException(); } else {
} catch (CommitFailedException ex) { if (ex.isOfType(CommitFailedException.STATE) && ex.getCode() == 1) { throw newConcurrentUpdateException(); } else {
} catch (CommitFailedException ex) { if (ex.isOfType(CommitFailedException.STATE) && ex.getCode() == 1) { throw newConcurrentUpdateException(); } else {