[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
|
@ReactMethod
|
||||||
public void collectionGet(String appName, String path, ReadableArray filters,
|
public void collectionGet(String appName, String path, ReadableArray filters,
|
||||||
ReadableArray orders, ReadableMap options, final Promise promise) {
|
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);
|
ref.get(promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,25 +102,25 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule {
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void documentCollections(String appName, String path, final Promise promise) {
|
public void documentCollections(String appName, String path, final Promise promise) {
|
||||||
RNFirebaseDocumentReference ref = getDocumentForAppPath(appName, path);
|
RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||||
ref.collections(promise);
|
ref.collections(promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void documentCreate(String appName, String path, ReadableMap data, final Promise promise) {
|
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);
|
ref.create(data, promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void documentDelete(String appName, String path, ReadableMap options, final Promise promise) {
|
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);
|
ref.delete(options, promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void documentGet(String appName, String path, final Promise promise) {
|
public void documentGet(String appName, String path, final Promise promise) {
|
||||||
RNFirebaseDocumentReference ref = getDocumentForAppPath(appName, path);
|
RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path);
|
||||||
ref.get(promise);
|
ref.get(promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,13 +131,13 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule {
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void documentSet(String appName, String path, ReadableMap data, ReadableMap options, final Promise promise) {
|
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);
|
ref.set(data, options, promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void documentUpdate(String appName, String path, ReadableMap data, final Promise promise) {
|
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);
|
ref.update(data, promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,11 +181,11 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule {
|
||||||
* @param options
|
* @param options
|
||||||
* @param path @return
|
* @param path @return
|
||||||
*/
|
*/
|
||||||
private RNFirebaseCollectionReference getCollectionForAppPath(String appName, String path,
|
private RNFirebaseFirestoreCollectionReference getCollectionForAppPath(String appName, String path,
|
||||||
ReadableArray filters,
|
ReadableArray filters,
|
||||||
ReadableArray orders,
|
ReadableArray orders,
|
||||||
ReadableMap options) {
|
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
|
* @param path
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private RNFirebaseDocumentReference getDocumentForAppPath(String appName, String path) {
|
private RNFirebaseFirestoreDocumentReference getDocumentForAppPath(String appName, String path) {
|
||||||
return new RNFirebaseDocumentReference(appName, path);
|
return new RNFirebaseFirestoreDocumentReference(appName, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,8 +18,8 @@ import java.util.Map;
|
||||||
|
|
||||||
import io.invertase.firebase.Utils;
|
import io.invertase.firebase.Utils;
|
||||||
|
|
||||||
public class RNFirebaseCollectionReference {
|
public class RNFirebaseFirestoreCollectionReference {
|
||||||
private static final String TAG = "RNFBCollectionReference";
|
private static final String TAG = "RNFSCollectionReference";
|
||||||
private final String appName;
|
private final String appName;
|
||||||
private final String path;
|
private final String path;
|
||||||
private final ReadableArray filters;
|
private final ReadableArray filters;
|
||||||
|
@ -27,8 +27,8 @@ public class RNFirebaseCollectionReference {
|
||||||
private final ReadableMap options;
|
private final ReadableMap options;
|
||||||
private final Query query;
|
private final Query query;
|
||||||
|
|
||||||
RNFirebaseCollectionReference(String appName, String path, ReadableArray filters,
|
RNFirebaseFirestoreCollectionReference(String appName, String path, ReadableArray filters,
|
||||||
ReadableArray orders, ReadableMap options) {
|
ReadableArray orders, ReadableMap options) {
|
||||||
this.appName = appName;
|
this.appName = appName;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.filters = filters;
|
this.filters = filters;
|
|
@ -18,13 +18,13 @@ import java.util.Map;
|
||||||
import io.invertase.firebase.Utils;
|
import io.invertase.firebase.Utils;
|
||||||
|
|
||||||
|
|
||||||
public class RNFirebaseDocumentReference {
|
public class RNFirebaseFirestoreDocumentReference {
|
||||||
private static final String TAG = "RNFBDocumentReference";
|
private static final String TAG = "RNFBFSDocumentReference";
|
||||||
private final String appName;
|
private final String appName;
|
||||||
private final String path;
|
private final String path;
|
||||||
private final DocumentReference ref;
|
private final DocumentReference ref;
|
||||||
|
|
||||||
RNFirebaseDocumentReference(String appName, String path) {
|
RNFirebaseFirestoreDocumentReference(String appName, String path) {
|
||||||
this.appName = appName;
|
this.appName = appName;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.ref = RNFirebaseFirestore.getFirestoreForApp(appName).document(path);
|
this.ref = RNFirebaseFirestore.getFirestoreForApp(appName).document(path);
|
Loading…
Reference in New Issue