-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFirebaseDataRepository.java
More file actions
51 lines (42 loc) · 1.11 KB
/
Copy pathFirebaseDataRepository.java
File metadata and controls
51 lines (42 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.curofy.domain.repository;
import java.util.LinkedHashMap;
import java.util.List;
import rx.Observable;
/**
* Created by nateshrelhan on 07/11/16.
*/
public interface FirebaseDataRepository<T> {
/**
* @return {@link Observable} of child data.
*/
Observable<T> childData(LinkedHashMap<QueryType, String> query);
/**
* @return {@link Observable} of data list which is of type node.
*/
Observable<List<T>> nodeChildList(LinkedHashMap<QueryType, String> query);
/**
* @return {@link Observable} of data list which is of type single_node.
*/
Observable<List<T>> singleNodeChildList(LinkedHashMap<QueryType, String> query);
//Used to parse query type
enum QueryType {
ORDER_BY_CHILD,
ORDER_BY_KEY,
ORDER_BY_VALUE,
START_AT,
END_AT,
EQUAL_AT,
LIMIT_TO_FIRST,
LIMIT_TO_LAST,
DISCUSSION_ID,
TIME_TO_LIVE,
FILTER_ID,
DIALOG_ID
}
//Listener is attached to query based on this
enum ListenerType {
NODE,
CHILD,
SINGLE_NODE
}
}