public final class FirebaseQueryBridge
extends java.lang.Object
implements io.spine.web.query.QueryBridge<io.spine.web.firebase.query.FirebaseQueryResponse>
QueryBridge
based on the Firebase Realtime Database.
This bridge stores the QueryResponse
data to a location in a given Firebase database
and retrieves the database path to that response as the result.
More formally, for each encountered Query
, the bridge performs a call to
the QueryService
and stores the resulting entity states into the given database. The data
is stored as a list of strings. Each entry is
a JSON representation of an entity state. The path produced by
the bridge as a result is the path to the database node containing all those records.
The absolute position of such a node is not specified, thus the result path is the only way
to read the data from the database.
Modifier and Type | Class and Description |
---|---|
static class |
FirebaseQueryBridge.Builder
A builder for the
FirebaseQueryBridge instances. |
Modifier and Type | Method and Description |
---|---|
static FirebaseQueryBridge.Builder |
newBuilder()
Creates a new instance of
Builder for FirebaseQueryBridge instances. |
io.spine.web.firebase.query.FirebaseQueryResponse |
send(io.spine.client.Query query)
Sends the given
Query to the QueryService and
stores the query response into the database. |
public io.spine.web.firebase.query.FirebaseQueryResponse send(io.spine.client.Query query)
Query
to the QueryService
and
stores the query response into the database.
Returns the path in the database under which the query response is stored.
send
in interface io.spine.web.query.QueryBridge<io.spine.web.firebase.query.FirebaseQueryResponse>
query
- the query to sendpublic static FirebaseQueryBridge.Builder newBuilder()
Builder
for FirebaseQueryBridge
instances.Builder