I am faced with a problem creating the CRUD for a Java object in Firebase, in the documentation there is no section on it.
Assuming the CRUD is about User.java
:
public class User {
private int birthYear;
private String fullName;
public User(String fullName, int birthYear) {
this.fullName = fullName;
this.birthYear = birthYear;
}
public long getBirthYear() {
return birthYear;
}
public String getFullName() {
return fullName;
}
}
How would this interface be implemented?:
public interface UsersRepository {
public void createUser(User user);
public User readUser(String fullName);
public List<User> retrieveAllUsers();
public void updateUser(User user);
public void deleteUser(String fullName);
}