Package org.structr.common.error

Examples of org.structr.common.error.IdNotFoundToken


    final Class relationType         = getClass();
    final PropertyMap _props         = getProperties();
    final String type                = this.getClass().getSimpleName();

    if (newStartNode == null) {
      throw new FrameworkException(type, new IdNotFoundToken(startNodeId));
    }

    // delete this as the new rel will be the container afterwards
    app.delete(this);
View Full Code Here


    final Class relationType          = getClass();
    final PropertyMap _props          = getProperties();
    final String type                 = this.getClass().getSimpleName();

    if (newTargetNode == null) {
      throw new FrameworkException(type, new IdNotFoundToken(targetIdNode));
    }

    // delete this as the new rel will be the container afterwards
    app.delete(this);
View Full Code Here

      } catch (NotFoundException nfe) {

        logger.log(Level.WARNING, "Node with id {0} not found in database!", id);

        throw new FrameworkException("FindRelationshipCommand", new IdNotFoundToken(id));
      }
    }

    return null;
  }
View Full Code Here

          return (T) app.get(map.get(GraphObject.id));

         
        } else {
         
          throw new FrameworkException(type.getSimpleName(), new IdNotFoundToken(source));
         
        }

      } else if (source instanceof GraphObject) {
       
        GraphObject obj = (GraphObject)source;
        if (propertyKey != null) {
         
          results = (Result<T>) app.nodeQuery(NodeInterface.class).and(propertyKey, obj.getProperty(propertyKey)).getResult();
         
         
        } else {
         
          // fetch property key for "id", may be different for AbstractNode and AbstractRelationship!
          PropertyKey<String> idProperty = StructrApp.getConfiguration().getPropertyKeyForDatabaseName(obj.getClass(), GraphObject.id.dbName());
         
          return (T) app.get(obj.getProperty(idProperty));
         
        }
       
       
      } else {

        return (T) app.get(source.toString());

      }

      int size       = results.size();

      switch (size) {

        case 0 :
          throw new FrameworkException(type.getSimpleName(), new IdNotFoundToken(source));

        case 1 :
          return results.get(0);

        default :
View Full Code Here

    }

    if (!nodesUpToOffset.isEmpty() && !gotOffset) {

      throw new FrameworkException("offsetId", new IdNotFoundToken(offsetId));
    }

    if (offset < 0) {

      // Remove last item
View Full Code Here

TOP

Related Classes of org.structr.common.error.IdNotFoundToken

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.