Package com.dooapp.gaedo.blueprints.operations

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


    // Finally create vertex
    if(returned==null) {
      returned = service.getDriver().createEmptyVertex(Serializable.class, serialized, value);
      service.getDriver().setValue(returned, serialized);
    }
    new Updater().updateLiteralPropertyIn(service.getDatabase(), serialized, returned, new TypeProperty(), valueClass);
    return returned;
  }
View Full Code Here


    // Finally create vertex
    if(returned==null) {
      returned = service.getDriver().createEmptyVertex(Serializable.class, serialized, value);
      service.getDriver().setValue(returned, serialized);
    }
    new Updater().updateLiteralPropertyIn(service.getDatabase(), serialized, returned, new TypeProperty(), valueClass);
    return returned;
  }
View Full Code Here

        boolean generatesId = strategy.isIdGenerationRequired() ? (CascadeType.PERSIST == cascade) : false;
        String objectVertexId = getIdVertexId(toUpdate, generatesId);
        Class<? extends Object> toUpdateClass = toUpdate.getClass();
        Vertex objectVertex = loadVertexFor(objectVertexId, toUpdateClass.getName());
        Map<Property, Collection<CascadeType>> containedProperties = strategy.getContainedProperties(toUpdate, objectVertex, cascade);
        return (DataType) new Updater().performUpdate(this, new VertexCachingDriver(getDriver()), objectVertexId, objectVertex, toUpdateClass, containedProperties, toUpdate,
                        cascade, treeMap);
    }
View Full Code Here

    // First step is to build an id for given tuple by concatenating key and value id (which is hopefully done separately)
    String entryVertexId = getIdOfTuple(service.getRepository(), cast, cascade, objectsBeingUpdated);
    // No need to memorize updated version
    String className = cast.getClass().getName();
    Vertex objectVertex = service.loadVertexFor(entryVertexId, className);
    new Updater().performUpdate(service, driver, entryVertexId, objectVertex, getContainedClass(), getContainedProperties(), cast, cascade, objectsBeingUpdated);
    /* If object was null, this operation was a create.
     * As a consequence, the upper update call may have persisted key or value, which implies the id may have changed
     * See https://github.com/Riduidel/gaedo/issues/91#issuecomment-47937526 for more awful details
     */
    if(objectVertex==null) {
View Full Code Here

        boolean generatesId = strategy.isIdGenerationRequired() ? (CascadeType.PERSIST == cascade) : false;
        String objectVertexId = getIdVertexId(toUpdate, generatesId);
        Class<? extends Object> toUpdateClass = toUpdate.getClass();
        Vertex objectVertex = loadVertexFor(objectVertexId, toUpdateClass.getName());
        Map<Property, Collection<CascadeType>> containedProperties = strategy.getContainedProperties(toUpdate, objectVertex, cascade);
        return (DataType) new Updater().performUpdate(this, new VertexCachingDriver(getDriver()), objectVertexId, objectVertex, toUpdateClass, containedProperties, toUpdate,
                        cascade, treeMap);
    }
View Full Code Here

    // First step is to build an id for given tuple by concatenating key and value id (which is hopefully done separately)
    String entryVertexId = getIdOfTuple(service.getRepository(), cast);
    // No need to memorize updated version
    String className = cast.getClass().getName();
    Vertex objectVertex = service.loadVertexFor(entryVertexId, className);
    new Updater().performUpdate(service, driver, entryVertexId, objectVertex, getContainedClass(), getContainedProperties(), cast, cascade, objectsBeingUpdated);
    if(objectVertex==null)
      objectVertex = service.loadVertexFor(entryVertexId, className);
    return objectVertex;
  }
View Full Code Here

        boolean generatesId = strategy.isIdGenerationRequired() ? (CascadeType.PERSIST == cascade) : false;
        String objectVertexId = getIdVertexId(toUpdate, generatesId);
        Class<? extends Object> toUpdateClass = toUpdate.getClass();
        Vertex objectVertex = loadVertexFor(objectVertexId, toUpdateClass.getName());
        Map<Property, Collection<CascadeType>> containedProperties = strategy.getContainedProperties(toUpdate, objectVertex, cascade);
        return (DataType) new Updater().performUpdate(this, new VertexCachingDriver(getDriver()), objectVertexId, objectVertex, toUpdateClass, containedProperties, toUpdate,
                        cascade, treeMap);
    }
View Full Code Here

    // First step is to build an id for given tuple by concatenating key and value id (which is hopefully done separately)
    String entryVertexId = getIdOfTuple(service.getRepository(), cast, cascade, objectsBeingUpdated);
    // No need to memorize updated version
    String className = cast.getClass().getName();
    Vertex objectVertex = service.loadVertexFor(entryVertexId, className);
    new Updater().performUpdate(service, driver, entryVertexId, objectVertex, getContainedClass(), getContainedProperties(), cast, cascade, objectsBeingUpdated);
    if(objectVertex==null)
      objectVertex = service.loadVertexFor(entryVertexId, className);
    return objectVertex;
  }
View Full Code Here

    // Finally create vertex
    if(returned==null) {
      returned = service.getDriver().createEmptyVertex(Serializable.class, serialized, value);
      service.getDriver().setValue(returned, serialized);
    }
    new Updater().updateLiteralPropertyIn(service.getDatabase(), serialized, returned, new TypeProperty(), valueClass);
    return returned;
  }
View Full Code Here

        boolean generatesId = strategy.isIdGenerationRequired() ? (CascadeType.PERSIST == cascade) : false;
        String objectVertexId = getIdVertexId(toUpdate, generatesId);
        Class<? extends Object> toUpdateClass = toUpdate.getClass();
        Vertex objectVertex = loadVertexFor(objectVertexId, toUpdateClass.getName());
        Map<Property, Collection<CascadeType>> containedProperties = strategy.getContainedProperties(toUpdate, objectVertex, cascade);
        return (DataType) new Updater().performUpdate(this, new VertexCachingDriver(getDriver()), objectVertexId, objectVertex, toUpdateClass, containedProperties, toUpdate,
                        cascade, treeMap);
    }
View Full Code Here

TOP

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

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.