[firestore][android] Rename a couple of classes
This commit is contained in:
parent
867a08da7b
commit
8ac16931a6
|
@ -43,7 +43,7 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule {
|
|||
@ReactMethod
|
||||
public void collectionGet(String appName, String path, ReadableArray filters,
|
||||
ReadableArray orders, ReadableMap options, final Promise promise) {
|
||||
RNFirebaseCollectionReference ref = getCollectionForAppPath(appName, path, filters, orders, options);
|
||||
RNFirebaseFirestoreCollectionReference ref = getCollectionForAppPath(appName, path, filters, orders, options);
|
||||
ref.get(promise);
|
||||
}
|
||||
|
||||
|
@ -102,25 +102,25 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule {
|
|||
|
||||
@ReactMethod
|
||||
public void documentCollections(String appName, String path, final Promise promise) {
|
||||
RNFirebaseDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
ref.collections(promise);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void documentCreate(String appName, String path, ReadableMap data, final Promise promise) {
|
||||
RNFirebaseDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
ref.create(data, promise);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void documentDelete(String appName, String path, ReadableMap options, final Promise promise) {
|
||||
RNFirebaseDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
ref.delete(options, promise);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void documentGet(String appName, String path, final Promise promise) {
|
||||
RNFirebaseDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
ref.get(promise);
|
||||
}
|
||||
|
||||
|
@ -131,13 +131,13 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule {
|
|||
|
||||
@ReactMethod
|
||||
public void documentSet(String appName, String path, ReadableMap data, ReadableMap options, final Promise promise) {
|
||||
RNFirebaseDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
ref.set(data, options, promise);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void documentUpdate(String appName, String path, ReadableMap data, final Promise promise) {
|
||||
RNFirebaseDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||
ref.update(data, promise);
|
||||
}
|
||||
|
||||
|
@ -181,11 +181,11 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule {
|
|||
* @param options
|
||||
* @param path @return
|
||||
*/
|
||||
private RNFirebaseCollectionReference getCollectionForAppPath(String appName, String path,
|
||||
private RNFirebaseFirestoreCollectionReference getCollectionForAppPath(String appName, String path,
|
||||
ReadableArray filters,
|
||||
ReadableArray orders,
|
||||
ReadableMap options) {
|
||||
return new RNFirebaseCollectionReference(appName, path, filters, orders, options);
|
||||
return new RNFirebaseFirestoreCollectionReference(appName, path, filters, orders, options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -195,8 +195,8 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule {
|
|||
* @param path
|
||||
* @return
|
||||
*/
|
||||
private RNFirebaseDocumentReference getDocumentForAppPath(String appName, String path) {
|
||||
return new RNFirebaseDocumentReference(appName, path);
|
||||
private RNFirebaseFirestoreDocumentReference getDocumentForAppPath(String appName, String path) {
|
||||
return new RNFirebaseFirestoreDocumentReference(appName, path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,8 +18,8 @@ import java.util.Map;
|
|||
|
||||
import io.invertase.firebase.Utils;
|
||||
|
||||
public class RNFirebaseCollectionReference {
|
||||
private static final String TAG = "RNFBCollectionReference";
|
||||
public class RNFirebaseFirestoreCollectionReference {
|
||||
private static final String TAG = "RNFSCollectionReference";
|
||||
private final String appName;
|
||||
private final String path;
|
||||
private final ReadableArray filters;
|
||||
|
@ -27,7 +27,7 @@ public class RNFirebaseCollectionReference {
|
|||
private final ReadableMap options;
|
||||
private final Query query;
|
||||
|
||||
RNFirebaseCollectionReference(String appName, String path, ReadableArray filters,
|
||||
RNFirebaseFirestoreCollectionReference(String appName, String path, ReadableArray filters,
|
||||
ReadableArray orders, ReadableMap options) {
|
||||
this.appName = appName;
|
||||
this.path = path;
|
|
@ -18,13 +18,13 @@ import java.util.Map;
|
|||
import io.invertase.firebase.Utils;
|
||||
|
||||
|
||||
public class RNFirebaseDocumentReference {
|
||||
private static final String TAG = "RNFBDocumentReference";
|
||||
public class RNFirebaseFirestoreDocumentReference {
|
||||
private static final String TAG = "RNFBFSDocumentReference";
|
||||
private final String appName;
|
||||
private final String path;
|
||||
private final DocumentReference ref;
|
||||
|
||||
RNFirebaseDocumentReference(String appName, String path) {
|
||||
RNFirebaseFirestoreDocumentReference(String appName, String path) {
|
||||
this.appName = appName;
|
||||
this.path = path;
|
||||
this.ref = RNFirebaseFirestore.getFirestoreForApp(appName).document(path);
|
Loading…
Reference in New Issue