Package com.dooapp.gaedo.blueprints.operations

Examples of com.dooapp.gaedo.blueprints.operations.Loader


     * @see #loadObject(String, Vertex, Map)
     */
    public DataType loadObject(String objectVertexId, ObjectCache objectsBeingAccessed) {
        // If cast fails, well, that's some fuckin mess, no ?
        Vertex objectVertex = loadVertexFor(objectVertexId, containedClass.getName());
        return new Loader().loadObject(this, new VertexCachingDriver(getDriver()), objectVertexId, objectVertex, objectsBeingAccessed);
    }
View Full Code Here


     *            during loading, but is absolutely NOT a persistent cache
     * @return loaded object
     * @see #loadObject(String, Vertex, Map)
     */
    public DataType loadObject(Vertex objectVertex, ObjectCache objectsBeingAccessed) {
        return new Loader().loadObject(this, objectVertex, objectsBeingAccessed);
    }
View Full Code Here

        Vertex destinationVertex = destination.vertex();
        try {
          // There may remain one unevaluated property - in which case it's a literal one
          Property destinationProperty = destination.property();
          Loader loader = new Loader();
          if(loader.hasLiteralProperty(destinationProperty, destinationVertex)) {
            return (Type) loader.loadSingleLiteral(getClass().getClassLoader(), destinationProperty, destinationVertex, cache);
          }
        } catch(EmptyStackException e) {

        }
        return (Type) service.loadObject(destinationVertex, cache);
View Full Code Here

      this.vertex = vertex;
    }

    public Object get(FieldInformer<?> key) {
      if(!fieldValues.containsKey(key)) {
        Loader loader = new Loader();
        Vertex currentVertex = vertex;
        Object value = null;
        for(Property currentProperty : key.getFieldPath()) {
          Iterator<Edge> edges = service.getStrategy().getOutEdgesFor(currentVertex, currentProperty).iterator();
          if(edges.hasNext()) {
            currentVertex = edges.next().getVertex(com.tinkerpop.blueprints.Direction.IN);
          } else {
            // maybe it's a literal value (valid only when on last property, but this is
            // theoretically guaranteed by informers)
            if(loader.hasLiteralProperty(currentProperty, currentVertex)) {
              value = loader.loadSingleLiteral(getClass().getClassLoader(), currentProperty, currentVertex, new ObjectCache());
            } else {
              // but, if not, well, consider result as a failure
              currentVertex = null;
            }
          }
View Full Code Here

    return sOut.toString();
  }

  public Object loadObject(GraphDatabaseDriver driver, GraphMappingStrategy strategy, ClassLoader classLoader, String effectiveType, Vertex key, ServiceRepository repository, ObjectCache objectsBeingAccessed) {
    TupleType tuple = instanciateTupleFor(classLoader, key);
    new Loader().loadObjectProperties(driver, strategy, classLoader, repository, key, tuple, getContainedProperties(), objectsBeingAccessed);
    return tuple;
  }
View Full Code Here

    return tuple;
  }

  public TupleType loadObject(GraphDatabaseDriver driver, GraphMappingStrategy strategy, ClassLoader classLoader, Class effectiveClass, Vertex key, ServiceRepository repository, ObjectCache objectsBeingAccessed) {
    TupleType tuple = instanciateTupleFor(classLoader, key);
    new Loader().loadObjectProperties(driver, strategy, classLoader, repository, key, tuple, getContainedProperties(), objectsBeingAccessed);
    return tuple;
  }
View Full Code Here

     * @see #loadObject(String, Vertex, Map)
     */
    public DataType loadObject(String objectVertexId, ObjectCache objectsBeingAccessed) {
        // If cast fails, well, that's some fuckin mess, no ?
        Vertex objectVertex = loadVertexFor(objectVertexId, containedClass.getName());
        return new Loader().loadObject(this, new VertexCachingDriver(getDriver()), objectVertexId, objectVertex, objectsBeingAccessed);
    }
View Full Code Here

     *            during loading, but is absolutely NOT a persistent cache
     * @return loaded object
     * @see #loadObject(String, Vertex, Map)
     */
    public DataType loadObject(Vertex objectVertex, ObjectCache objectsBeingAccessed) {
        return new Loader().loadObject(this, objectVertex, objectsBeingAccessed);
    }
View Full Code Here

   * @param currentVertex
   * @param finalProperty
   * @return
   */
  protected ValueType getLiteralValue(Vertex currentVertex, Property finalProperty) {
    Loader loader = new Loader();
    ClassLoader classLoader = expected == null ? expected.getClass().getClassLoader() : getClass().getClassLoader();
    return (ValueType) loader.loadSingleLiteral(classLoader, finalProperty, currentVertex, objectsBeingAccessed);
  }
View Full Code Here

        Vertex destinationVertex = destination.vertex();
        try {
          // There may remain one unevaluated property - in which case it's a literal one
          Property destinationProperty = destination.property();
          Loader loader = new Loader();
          if(loader.hasLiteralProperty(destinationProperty, destinationVertex)) {
            return (Type) loader.loadSingleLiteral(getClass().getClassLoader(), destinationProperty, destinationVertex, cache);
          }
        } catch(EmptyStackException e) {

        }
        return (Type) service.loadObject(destinationVertex, cache);
View Full Code Here

TOP

Related Classes of com.dooapp.gaedo.blueprints.operations.Loader

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.