Package com.c8db.internal
Class C8EventImpl
- java.lang.Object
-
- com.c8db.internal.C8Executeable<E>
-
- com.c8db.internal.InternalC8Event<C8DBImpl,C8DatabaseImpl,C8ExecutorSync>
-
- com.c8db.internal.C8EventImpl
-
- All Implemented Interfaces:
C8Event,C8SerializationAccessor
public class C8EventImpl extends InternalC8Event<C8DBImpl,C8DatabaseImpl,C8ExecutorSync> implements C8Event
-
-
Field Summary
-
Fields inherited from class com.c8db.internal.InternalC8Event
PATH_API_EVENT
-
Fields inherited from class com.c8db.internal.C8Executeable
context, executor, util
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedC8EventImpl(C8DatabaseImpl db)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteEvent(String key)Deletes the document with the givenkeyfrom the collection.voiddeleteEvents(Collection<?> values)Deletes multiple documents from the collection.C8EventEntitygetEvent(String key)Retrieves the document with the givenkeyfrom the collection.C8EventEntitygetEvent(String key, DocumentReadOptions options)Retrieves the document with the givenkeyfrom the collection.Collection<C8EventEntity>getEvents(Collection<String> keys)Retrieves multiple documents with the given_keyfrom the collection.<T> C8EventEntityinsertEvent(T value)Creates a new document from the given document, unless there is already a document with the _key given.<T> C8EventEntityinsertEvent(T value, EventCreateOptions options)Creates a new document from the given document, unless there is already a document with the _key given.-
Methods inherited from class com.c8db.internal.InternalC8Event
db, deleteEventRequest, deleteEventsRequest, getEventRequest, getEventsRequest, getEventsResponseDeserializer, insertEventRequest, insertEventResponseDeserializer
-
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
-
-
-
-
Constructor Detail
-
C8EventImpl
protected C8EventImpl(C8DatabaseImpl db)
-
-
Method Detail
-
insertEvent
public <T> C8EventEntity insertEvent(T value) throws C8DBException
Description copied from interface:C8EventCreates a new document from the given document, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertEventin interfaceC8Event- Parameters:
value- A representation of a single document (POJO, VPackSlice or String for JSON)- Returns:
- information about the document
- Throws:
C8DBException
-
insertEvent
public <T> C8EventEntity insertEvent(T value, EventCreateOptions options) throws C8DBException
Description copied from interface:C8EventCreates a new document from the given document, unless there is already a document with the _key given. If no _key is given, a new unique _key is generated automatically.- Specified by:
insertEventin interfaceC8Event- Parameters:
value- A representation of a single document (POJO, VPackSlice or String for JSON)options- Additional options, can be null- Returns:
- information about the document
- Throws:
C8DBException
-
getEvent
public C8EventEntity getEvent(String key) throws C8DBException
Description copied from interface:C8EventRetrieves the document with the givenkeyfrom the collection.- Specified by:
getEventin interfaceC8Event- Parameters:
key- The key of the document- Returns:
- the document identified by the key
- Throws:
C8DBException
-
getEvent
public C8EventEntity getEvent(String key, DocumentReadOptions options) throws C8DBException
Description copied from interface:C8EventRetrieves the document with the givenkeyfrom the collection.- Specified by:
getEventin interfaceC8Event- Parameters:
key- The key of the documentoptions- Additional options, can be null- Returns:
- the document identified by the key
- Throws:
C8DBException
-
getEvents
public Collection<C8EventEntity> getEvents(Collection<String> keys) throws C8DBException
Description copied from interface:C8EventRetrieves multiple documents with the given_keyfrom the collection.- Specified by:
getEventsin interfaceC8Event- Parameters:
keys- The keys of the documents- Returns:
- the documents and possible errors
- Throws:
C8DBException
-
deleteEvent
public void deleteEvent(String key) throws C8DBException
Description copied from interface:C8EventDeletes the document with the givenkeyfrom the collection.- Specified by:
deleteEventin interfaceC8Event- Parameters:
key- The key of the document- Throws:
C8DBException
-
deleteEvents
public void deleteEvents(Collection<?> values) throws C8DBException
Description copied from interface:C8EventDeletes multiple documents from the collection.- Specified by:
deleteEventsin interfaceC8Event- Parameters:
values- The keys of the documents or the documents themselves- Throws:
C8DBException
-
-