Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.NotFoundException


    @Override
    public <M extends RuntimeModule> M getModule(String moduleId, Class<M> clazz) throws NotFoundException {
        M module = getTxDrivenModuleManager().getModule(moduleId, clazz);

        if (module == null) {
            throw new NotFoundException("No module of type " + clazz.getName() + " with ID " + moduleId + " has been registered");
        }

        return module;
    }
View Full Code Here



    public Object getProperty( String key ) {
        Object value = getPropertyValue(key);
        if ( value == null ) {
            throw new NotFoundException( "'" + key + "' on " + this );
        }
        return value;
    }
View Full Code Here

        if ( getEntityId( startNodeUri ) == nodeId ) {
            return node( endNodeUri );
        } else if ( getEntityId( endNodeUri ) == nodeId ) {
            return node( startNodeUri );
        } else {
            throw new NotFoundException( node + " isn't one of start/end for " + this );
        }
    }
View Full Code Here

            RestNode node = (RestNode) results.get(nodeRequest.getBatchId());
            List<String> labels = (List<String>) results.get(labelsRequest.getBatchId());
            node.setLabels(labels);
            return node;
        } catch(RestResultException rre) {
            if (rre.getMessage().contains("NodeNotFoundException")) throw new NotFoundException("Node not found: "+id);
            else throw rre;
        }
    }
View Full Code Here

        if ( !range.contains( version ) )
        {
            Relationship prevVersionRel = node.getSingleRelationship( PREV_VERSION_REL_TYPE, Direction.OUTGOING );
            if ( prevVersionRel == null )
            {
                throw new NotFoundException( "Version [" + version + "] not found." );
            }
            return getPropHolderNodeForVersion( prevVersionRel.getOtherNode( node ), version );
        }
        return node;
    }
View Full Code Here

        if ( !iter.hasNext() )
        {
            return null;
        }
        Relationship single = iter.next();
        if ( iter.hasNext() ) throw new NotFoundException( "More than one relationship[" +
            type + ", " + dir + "] found for " + this + " in " + versionContext );
        return single;
    }
View Full Code Here

    public Node getNodeById( long id )
    {
        if ( id < 0 || id > MAX_NODE_ID )
        {
            throw new NotFoundException( "Node[" + id + "]" );
        }
        return nodeManager.getNodeById( id );
    }
View Full Code Here

    public Relationship getRelationshipById( long id )
    {
        if ( id < 0 || id > MAX_RELATIONSHIP_ID )
        {
            throw new NotFoundException( "Relationship[" + id + "]" );
        }
        return nodeManager.getRelationshipById( id );
    }
View Full Code Here

    public Map<String, String> getConfiguration( Index<? extends PropertyContainer> index )
    {
        Map<String, String> config = indexStore.get( index.getEntityType(), index.getName() );
        if ( config == null )
        {
            throw new NotFoundException( "No " + index.getEntityType().getSimpleName() +
                    " index '" + index.getName() + "' found" );
        }
        return config;
    }
View Full Code Here

        }
        if ( endNodeId == node.getId() )
        {
            return new NodeProxy( startNodeId, nodeManager );
        }
        throw new NotFoundException( "Node[" + node.getId()
            + "] not connected to this relationship[" + getId() + "]" );
    }
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.NotFoundException

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.