Package org.apache.jackrabbit.ocm.exception

Examples of org.apache.jackrabbit.ocm.exception.ObjectContentManagerException


    try {
      ClassDescriptor classDescriptor = mapper.getClassDescriptorByClass(ReflectionUtils.getBeanClass(object));
      Node objectNode = session.getNodeByIdentifier(uuId);
      update(session, objectNode, object);
    } catch (PathNotFoundException pnfe) {
      throw new ObjectContentManagerException("Impossible to update the object with UUID: " + uuId , pnfe);
    } catch (RepositoryException re) {
      throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to update the object with UUID: " + uuId, re);
    }
  }
View Full Code Here


    try {
      ClassDescriptor classDescriptor = mapper.getClassDescriptorByClass(ReflectionUtils.getBeanClass(object));
      Node objectNode = getNode(parentNode,classDescriptor,nodeName,object);
      update(session, objectNode, object);
    } catch (PathNotFoundException pnfe) {
      throw new ObjectContentManagerException("Impossible to update the object: " + nodeName + " at node : " + parentNode, pnfe);
    } catch (RepositoryException re) {
      throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to update the object: "
          + nodeName + " at node : " + parentNode, re);
    }
  }
View Full Code Here

      return object;

    } catch (PathNotFoundException pnfe) {
      // HINT should never get here
      throw new ObjectContentManagerException("Impossible to get the object at " + path, pnfe);
    } catch (RepositoryException re) {
      throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path, re);
    }
  }
View Full Code Here

      retrieveCollectionFields(session, classDescriptor, node, object, false);

      return object;
    } catch (PathNotFoundException pnfe) {
      // HINT should never get here
      throw new ObjectContentManagerException("Impossible to get the object at " + path, pnfe);
    } catch (RepositoryException re) {
      throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path, re);
    }
  }
View Full Code Here

      retrieveBeanFields(session, classDescriptor, node, object, true);
      retrieveCollectionFields(session, classDescriptor, node, object, true);

    } catch (PathNotFoundException pnfe) {

      throw new ObjectContentManagerException("Impossible to get the object at " + path, pnfe);
    } catch (RepositoryException re) {
      throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path, re);
    }
  }
View Full Code Here

        {
          this.retrieveCollectionField(session, collectionDescriptor, node, object, true);
        }
        else
        {
          throw new ObjectContentManagerException("Impossible to retrieve the mapped attribute. The attribute '" +
                                                                       attributeName + "'  is not a bean or a collection for the class : " + classDescriptor.getClassName());
        }
      }

    } catch (PathNotFoundException pnfe) {

      throw new ObjectContentManagerException("Impossible to get the object at " + path, pnfe);
    } catch (RepositoryException re) {
      throw new org.apache.jackrabbit.ocm.exception.RepositoryException("Impossible to get the object at " + path, re);
    }
  }
View Full Code Here

                }
            }

            return objects;
        } catch (ValueFormatException vfe) {
            throw new ObjectContentManagerException("Cannot get the collection field : "
                + collectionDescriptor.getFieldName() + "for class "
                + collectionDescriptor.getClassDescriptor().getClassName(), vfe);
        }
    }
View Full Code Here

        compatible = checkCompatibleNodeTypes(nodeType, classDescriptor);
      }

      if (!compatible) {
        throw new ObjectContentManagerException("Cannot map object of type '" + classDescriptor.getClassName() + "'. Node type '"
            + node.getPrimaryNodeType().getName() + "' does not match descriptor node type '"
            + classDescriptor.getJcrType() + "'");
      }
    } catch (RepositoryException re) {
      throw new org.apache.jackrabbit.ocm.exception.RepositoryException(re);
View Full Code Here

                        value);
                    parentNode.setProperty(name, jcrValue);
                }
            }
        } catch (ValueFormatException vfe) {
            throw new ObjectContentManagerException("Cannot insert collection field : "
                + collectionDescriptor.getFieldName() + " of class "
                + collectionDescriptor.getClassDescriptor().getClassName(), vfe);
        }
    }
View Full Code Here

        AtomicTypeConverter atc = (AtomicTypeConverter) atomicTypeConverters.get(elementClass);
        if (atc != null) {
            return atc;
        }

        throw new ObjectContentManagerException(
            "Cannot get AtomicTypeConverter for element class "
                + elementClassName + " of class "
                + collectionDescriptor.getClassDescriptor().getClassName());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.exception.ObjectContentManagerException

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.