use of org.jowidgets.cap.common.api.exception.DeletedBeanException in project jo-client-platform by jo-source.
the class RelationshipBean method setEndNodeId.
protected void setEndNodeId(final Object beanTypeId, final RelationshipType relationshipType, final Object relationBeanTypeId, final Object id) {
Assert.paramNotNull(beanTypeId, "beanTypeId");
Assert.paramNotNull(relationshipType, "relationshipType");
Assert.paramNotNull(id, "id");
final Node endNode = NodeAccess.findNode(beanTypeId, id);
if (endNode == null) {
throw new DeletedBeanException(id);
}
final Node startNode = getStartNode();
if (startNode != null) {
createRelationship(relationBeanTypeId, relationshipType, startNode, endNode);
tempStartNode = null;
tempEndNode = null;
} else {
tempEndNode = endNode;
}
}
Aggregations