Package oracle.kv

Examples of oracle.kv.Key


    }

    @Override
    public int delete(String table, String key)
    {
        Key kvKey = createKey(table, key);
        try
        {
            store.multiDelete(kvKey, null, null);
        }
        catch (FaultException e)
View Full Code Here


    public Object getId() {
        return id;
    }

    public Set<String> getPropertyKeys() {
        Key elementKey = majorKeyFromString(this.id.toString());
        SortedSet<Key> propertyKeys = this.graph.getRawGraph().multiGetKeys(elementKey, null, Depth.CHILDREN_ONLY);

        HashSet<String> finalproperties = new HashSet<String>();
        for (Key k : propertyKeys)
        {
View Full Code Here

    public Object getProperty(final String key) {
        Object element = null;
        if (!key.equals("")) {
            /* if this is a real property
            1) get the lookup key */
            Key elementKey = keyFromString(this.id.toString()+"/"+key);
            element = getValue(graph.getRawGraph(), elementKey);
        }
        return element;
    }
View Full Code Here

        if (key.equals(StringFactory.LABEL))
            throw new IllegalArgumentException("Property key is reserved for all nodes and edges: " + StringFactory.LABEL);
        if (key.equals(StringFactory.EMPTY_STRING))
            throw ExceptionFactory.elementKeyCanNotBeEmpty();
       
        Key elementKey = keyFromString(this.id.toString()+"/"+key);
        putValue(graph.getRawGraph(), elementKey, value);
    }
View Full Code Here

        Key elementKey = keyFromString(this.id.toString()+"/"+key);
        putValue(graph.getRawGraph(), elementKey, value);
    }

    public Object removeProperty(final String key) {
        Key elementKey = keyFromString(this.id.toString()+"/"+key);
        Object oldvalue = this.getProperty(key);
       
        graph.getRawGraph().delete(elementKey);
        return oldvalue;
    }
View Full Code Here

            {
              removeEdge(edge);
            }
        }
        /* use multiDelete to wipe out all properties */
        Key vertexKey = majorKeyFromString(this.getGraphKey()+"/Vertex/"+vertexToRemove.getId());
        this.store.multiDelete(vertexKey, null, Depth.DESCENDANTS_ONLY);
        this.store.delete(vertexKey);
        // this.store.delete(keyFromString(this.getGraphKey()+"/VertexIndex/"+vertexToRemove.getId()));
    }
View Full Code Here

           }
       }
      
      
         /* use multiDelete to wipe out all properties */
         Key edgeKey = majorKeyFromString(this.getGraphKey()+"/Edge/"+edgeToRemove.getId());
         this.store.multiDelete(edgeKey, null, Depth.DESCENDANTS_ONLY);
         this.store.delete(edgeKey);
         // this.store.delete(keyFromString(this.getGraphKey()+"/EdgeIndex/"+edgeToRemove.getId()));
    }
View Full Code Here

      int vcount = 0;
     
      while (vertexKeys.hasNext())
      {
            vcount++;
            Key vk = vertexKeys.next().getKey();
           
        List<String> vertexAddress = vk.getFullPath();
        String vId = vertexAddress.get(vertexAddress.size()-1);
       
        Vertex vertex = this.getVertex(vId);
        if (vertex != null)
        {
View Full Code Here

        // Iterator <KeyValueVersion> vertexKeys = this.store.multiGetIterator(oracle.kv.Direction.FORWARD, 0,majorKeyFromString(this.getGraphKey()+"/VertexIndex"), null,null);       
        Iterator<KeyValueVersion> vertexKeys = this.store.storeIterator(oracle.kv.Direction.UNORDERED, 1,majorKeyFromString(this.getGraphKey()+"/Vertex"), null, Depth.CHILDREN_ONLY);
     
      while (vertexKeys.hasNext())
      {
        Key vk = vertexKeys.next().getKey();
        List<String> vertexAddress = vk.getFullPath();
        String vId = vertexAddress.get(vertexAddress.size()-1);
        KVVertex vertex = new KVVertex(this, vId);
        if (vertex.exists())
        {
          if (vertex.getPropertyKeys().contains(key))
View Full Code Here

        Iterator<KeyValueVersion> edgeKeys = this.store.storeIterator(oracle.kv.Direction.UNORDERED, 1,majorKeyFromString(this.getGraphKey()+"/Edge"), null, Depth.CHILDREN_ONLY);
        int ecount = 0;
      while (edgeKeys.hasNext())
      {
          ecount++;
        Key ek = edgeKeys.next().getKey();
        List<String> edgeAddress = ek.getFullPath();
        String eId = edgeAddress.get(edgeAddress.size()-1);
        Edge edge = this.getEdge(eId);
        if (edge != null)
          edges.add(edge);
      }
View Full Code Here

TOP

Related Classes of oracle.kv.Key

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.