Package com.c8db.internal
Class C8VertexCollectionImpl
- java.lang.Object
-
- com.c8db.internal.C8Executeable<E>
-
- com.c8db.internal.InternalC8VertexCollection<C8DBImpl,C8DatabaseImpl,C8GraphImpl,C8ExecutorSync>
-
- com.c8db.internal.C8VertexCollectionImpl
-
- All Implemented Interfaces:
C8SerializationAccessor,C8VertexCollection
public class C8VertexCollectionImpl extends InternalC8VertexCollection<C8DBImpl,C8DatabaseImpl,C8GraphImpl,C8ExecutorSync> implements C8VertexCollection
-
-
Field Summary
-
Fields inherited from class com.c8db.internal.C8Executeable
context, executor, util
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedC8VertexCollectionImpl(C8GraphImpl graph, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteVertex(String key)Deletes the vertex with the givenkeyfrom the collection.voiddeleteVertex(String key, VertexDeleteOptions options)Deletes the vertex with the givenkeyfrom the collection.voiddrop()Removes a vertex collection from the graph and optionally deletes the collection, if it is not used in any other graph<T> TgetVertex(String key, Class<T> type)Retrieves the vertex document with the givenkeyfrom the collection.<T> TgetVertex(String key, Class<T> type, GraphDocumentReadOptions options)Retrieves the vertex document with the givenkeyfrom the collection.<T> VertexEntityinsertVertex(T value)Creates a new vertex in the collection<T> VertexEntityinsertVertex(T value, VertexCreateOptions options)Creates a new vertex in the collection<T> VertexUpdateEntityreplaceVertex(String key, T value)Replaces the vertex with key with the one in the body, provided there is such a vertex and no precondition is violated<T> VertexUpdateEntityreplaceVertex(String key, T value, VertexReplaceOptions options)Replaces the vertex with key with the one in the body, provided there is such a vertex and no precondition is violated<T> VertexUpdateEntityupdateVertex(String key, T value)Partially updates the vertex identified by document-key.<T> VertexUpdateEntityupdateVertex(String key, T value, VertexUpdateOptions options)Partially updates the vertex identified by document-key.-
Methods inherited from class com.c8db.internal.InternalC8VertexCollection
deleteVertexRequest, dropRequest, getVertexRequest, getVertexResponseDeserializer, graph, insertVertexRequest, insertVertexResponseDeserializer, name, replaceVertexRequest, replaceVertexResponseDeserializer, updateVertexRequest, updateVertexResponseDeserializer
-
Methods inherited from class com.c8db.internal.C8Executeable
createPath, executor, request, util, util
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.c8db.C8SerializationAccessor
util, util
-
Methods inherited from interface com.c8db.C8VertexCollection
graph, name
-
-
-
-
Constructor Detail
-
C8VertexCollectionImpl
protected C8VertexCollectionImpl(C8GraphImpl graph, String name)
-
-
Method Detail
-
drop
public void drop() throws C8DBExceptionDescription copied from interface:C8VertexCollectionRemoves a vertex collection from the graph and optionally deletes the collection, if it is not used in any other graph- Specified by:
dropin interfaceC8VertexCollection- Throws:
C8DBException- See Also:
- API Documentation
-
insertVertex
public <T> VertexEntity insertVertex(T value) throws C8DBException
Description copied from interface:C8VertexCollectionCreates a new vertex in the collection- Specified by:
insertVertexin interfaceC8VertexCollection- Parameters:
value- A representation of a single vertex (POJO, VPackSlice or String for JSON)- Returns:
- information about the vertex
- Throws:
C8DBException- See Also:
- API Documentation
-
insertVertex
public <T> VertexEntity insertVertex(T value, VertexCreateOptions options) throws C8DBException
Description copied from interface:C8VertexCollectionCreates a new vertex in the collection- Specified by:
insertVertexin interfaceC8VertexCollection- Parameters:
value- A representation of a single vertex (POJO, VPackSlice or String for JSON)options- Additional options, can be null- Returns:
- information about the vertex
- Throws:
C8DBException- See Also:
- API Documentation
-
getVertex
public <T> T getVertex(String key, Class<T> type) throws C8DBException
Description copied from interface:C8VertexCollectionRetrieves the vertex document with the givenkeyfrom the collection.- Specified by:
getVertexin interfaceC8VertexCollection- Parameters:
key- The key of the vertextype- The type of the vertex-document (POJO class, VPackSlice or String for JSON)- Returns:
- the vertex identified by the key
- Throws:
C8DBException- See Also:
- API Documentation
-
getVertex
public <T> T getVertex(String key, Class<T> type, GraphDocumentReadOptions options) throws C8DBException
Description copied from interface:C8VertexCollectionRetrieves the vertex document with the givenkeyfrom the collection.- Specified by:
getVertexin interfaceC8VertexCollection- Parameters:
key- The key of the vertextype- The type of the vertex-document (POJO class, VPackSlice or String for JSON)options- Additional options, can be null- Returns:
- the vertex identified by the key
- Throws:
C8DBException- See Also:
- API Documentation
-
replaceVertex
public <T> VertexUpdateEntity replaceVertex(String key, T value) throws C8DBException
Description copied from interface:C8VertexCollectionReplaces the vertex with key with the one in the body, provided there is such a vertex and no precondition is violated- Specified by:
replaceVertexin interfaceC8VertexCollection- Parameters:
key- The key of the vertexvalue- A representation of a single vertex (POJO, VPackSlice or String for JSON)- Returns:
- information about the vertex
- Throws:
C8DBException- See Also:
- API Documentation
-
replaceVertex
public <T> VertexUpdateEntity replaceVertex(String key, T value, VertexReplaceOptions options) throws C8DBException
Description copied from interface:C8VertexCollectionReplaces the vertex with key with the one in the body, provided there is such a vertex and no precondition is violated- Specified by:
replaceVertexin interfaceC8VertexCollection- Parameters:
key- The key of the vertexvalue- A representation of a single vertex (POJO, VPackSlice or String for JSON)options- Additional options, can be null- Returns:
- information about the vertex
- Throws:
C8DBException- See Also:
- API Documentation
-
updateVertex
public <T> VertexUpdateEntity updateVertex(String key, T value) throws C8DBException
Description copied from interface:C8VertexCollectionPartially updates the vertex identified by document-key. The value must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.- Specified by:
updateVertexin interfaceC8VertexCollection- Type Parameters:
T- The type of the vertex-document (POJO class, VPackSlice or String for JSON)- Parameters:
key- The key of the vertex- Returns:
- information about the vertex
- Throws:
C8DBException- See Also:
- API Documentation
-
updateVertex
public <T> VertexUpdateEntity updateVertex(String key, T value, VertexUpdateOptions options) throws C8DBException
Description copied from interface:C8VertexCollectionPartially updates the vertex identified by document-key. The value must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.- Specified by:
updateVertexin interfaceC8VertexCollection- Type Parameters:
T- The type of the vertex-document (POJO class, VPackSlice or String for JSON)- Parameters:
key- The key of the vertexoptions- Additional options, can be null- Returns:
- information about the vertex
- Throws:
C8DBException- See Also:
- API Documentation
-
deleteVertex
public void deleteVertex(String key) throws C8DBException
Description copied from interface:C8VertexCollectionDeletes the vertex with the givenkeyfrom the collection.- Specified by:
deleteVertexin interfaceC8VertexCollection- Parameters:
key- The key of the vertex- Throws:
C8DBException- See Also:
- API Documentation
-
deleteVertex
public void deleteVertex(String key, VertexDeleteOptions options) throws C8DBException
Description copied from interface:C8VertexCollectionDeletes the vertex with the givenkeyfrom the collection.- Specified by:
deleteVertexin interfaceC8VertexCollection- Parameters:
key- The key of the vertexoptions- Additional options, can be null- Throws:
C8DBException- See Also:
- API Documentation
-
-