Package com.c8db
Interface C8EdgeCollection
-
- All Superinterfaces:
C8SerializationAccessor
- All Known Implementing Classes:
C8EdgeCollectionImpl
public interface C8EdgeCollection extends C8SerializationAccessor
Interface for operations on C8DB edge collection level.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteEdge(String key)Removes a edgevoiddeleteEdge(String key, EdgeDeleteOptions options)Removes a edge<T> TgetEdge(String key, Class<T> type)Fetches an existing edge<T> TgetEdge(String key, Class<T> type, GraphDocumentReadOptions options)Fetches an existing edgeC8Graphgraph()The the handler of the named graph the edge collection is within<T> EdgeEntityinsertEdge(T value)Creates a new edge in the collection<T> EdgeEntityinsertEdge(T value, EdgeCreateOptions options)Creates a new edge in the collectionStringname()The name of the edge collection<T> EdgeUpdateEntityreplaceEdge(String key, T value)Replaces the edge with key with the one in the body, provided there is such a edge and no precondition is violated<T> EdgeUpdateEntityreplaceEdge(String key, T value, EdgeReplaceOptions options)Replaces the edge with key with the one in the body, provided there is such a edge and no precondition is violated<T> EdgeUpdateEntityupdateEdge(String key, T value)Partially updates the edge identified by document-key.<T> EdgeUpdateEntityupdateEdge(String key, T value, EdgeUpdateOptions options)Partially updates the edge identified by document-key.-
Methods inherited from interface com.c8db.C8SerializationAccessor
util, util
-
-
-
-
Method Detail
-
graph
C8Graph graph()
The the handler of the named graph the edge collection is within- Returns:
- graph handler
-
name
String name()
The name of the edge collection- Returns:
- collection name
-
insertEdge
<T> EdgeEntity insertEdge(T value) throws C8DBException
Creates a new edge in the collection- Parameters:
value- A representation of a single edge (POJO, VPackSlice or String for JSON)- Returns:
- information about the edge
- Throws:
C8DBException
-
insertEdge
<T> EdgeEntity insertEdge(T value, EdgeCreateOptions options) throws C8DBException
Creates a new edge in the collection- Parameters:
value- A representation of a single edge (POJO, VPackSlice or String for JSON)options- Additional options, can be null- Returns:
- information about the edge
- Throws:
C8DBException- See Also:
- API Documentation
-
getEdge
<T> T getEdge(String key, Class<T> type) throws C8DBException
Fetches an existing edge- Parameters:
key- The key of the edgetype- The type of the edge-document (POJO class, VPackSlice or String for JSON)- Returns:
- the edge identified by the key
- Throws:
C8DBException- See Also:
- API Documentation
-
getEdge
<T> T getEdge(String key, Class<T> type, GraphDocumentReadOptions options) throws C8DBException
Fetches an existing edge- Parameters:
key- The key of the edgetype- The type of the edge-document (POJO class, VPackSlice or String for JSON)options- Additional options, can be null- Returns:
- the edge identified by the key
- Throws:
C8DBException- See Also:
- API Documentation
-
replaceEdge
<T> EdgeUpdateEntity replaceEdge(String key, T value) throws C8DBException
Replaces the edge with key with the one in the body, provided there is such a edge and no precondition is violated- Type Parameters:
T- The type of the edge-document (POJO class, VPackSlice or String for JSON)- Parameters:
key- The key of the edge- Returns:
- information about the edge
- Throws:
C8DBException- See Also:
- API Documentation
-
replaceEdge
<T> EdgeUpdateEntity replaceEdge(String key, T value, EdgeReplaceOptions options) throws C8DBException
Replaces the edge with key with the one in the body, provided there is such a edge and no precondition is violated- Type Parameters:
T- The type of the edge-document (POJO class, VPackSlice or String for JSON)- Parameters:
key- The key of the edgeoptions- Additional options, can be null- Returns:
- information about the edge
- Throws:
C8DBException- See Also:
- API Documentation
-
updateEdge
<T> EdgeUpdateEntity updateEdge(String key, T value) throws C8DBException
Partially updates the edge 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.- Type Parameters:
T- The type of the edge-document (POJO class, VPackSlice or String for JSON)- Parameters:
key- The key of the edge- Returns:
- information about the edge
- Throws:
C8DBException- See Also:
- API Documentation
-
updateEdge
<T> EdgeUpdateEntity updateEdge(String key, T value, EdgeUpdateOptions options) throws C8DBException
Partially updates the edge 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.- Type Parameters:
T- The type of the edge-document (POJO class, VPackSlice or String for JSON)- Parameters:
key- The key of the edgeoptions- Additional options, can be null- Returns:
- information about the edge
- Throws:
C8DBException- See Also:
- API Documentation
-
deleteEdge
void deleteEdge(String key) throws C8DBException
Removes a edge- Parameters:
key- The key of the edge- Throws:
C8DBException- See Also:
- API Documentation
-
deleteEdge
void deleteEdge(String key, EdgeDeleteOptions options) throws C8DBException
Removes a edge- Parameters:
key- The key of the edgeoptions- Additional options, can be null- Throws:
C8DBException- See Also:
- API Documentation
-
-