DatabaseReference

public class DatabaseReference extends Query

A Firebase reference represents a particular location in your Database and can be used for reading or writing data to that Database location.

This class is the starting point for all Database operations. After you've initialized it with a URL, you can use it to read data, write data, and to create new DatabaseReferences.

Nested Class Summary

interface DatabaseReference.CompletionListener This interface is used as a method of being notified when an operation has been acknowledged by the Database servers and can be considered complete 

Public Method Summary

DatabaseReference
child(String pathString)
Get a reference to location relative to this one
boolean
equals(Object other)
FirebaseDatabase
getDatabase()
Gets the Database instance associated with this reference.
String
getKey()
DatabaseReference
DatabaseReference
static void
goOffline()
Manually disconnect the Firebase Database client from the server and disable automatic reconnection.
static void
goOnline()
Manually reestablish a connection to the Firebase Database server and enable automatic reconnection.
int
OnDisconnect
onDisconnect()
Provides access to disconnect operations at this location
DatabaseReference
push()
Create a reference to an auto-generated child location.
Task<Void>
removeValue()
Set the value at this location to 'null'
void
removeValue(DatabaseReference.CompletionListener listener)
Set the value at this location to 'null'
void
runTransaction(Transaction.Handler handler, boolean fireLocalEvents)
Run a transaction on the data at this location.
void
runTransaction(Transaction.Handler handler)
Run a transaction on the data at this location.
void
setPriority(Object priority, DatabaseReference.CompletionListener listener)
Set a priority for the data at this Database location.
Task<Void>
setPriority(Object priority)
Set a priority for the data at this Database location.
void
setValue(Object value, Object priority, DatabaseReference.CompletionListener listener)
Set the data and priority to the given values.
void
setValue(Object value, DatabaseReference.CompletionListener listener)
Set the data at this location to the given value.
Task<Void>
setValue(Object value, Object priority)
Set the data and priority to the given values.
Task<Void>
setValue(Object value)
Set the data at this location to the given value.
String
Task<Void>
updateChildren(Map<String, Object> update)
Update the specific child keys to the specified values.
void
updateChildren(Map<String, Object> update, DatabaseReference.CompletionListener listener)
Update the specific child keys to the specified values.

Inherited Method Summary