CRUD Firebase for Java object

3

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);
}
    
asked by stack man 29.04.2016 в 12:52
source

1 answer

1

The Firebase documentation contains the answers to your questions, for data persistence Saving Data and to obtain data Retreiving Data

    
answered by 29.04.2016 в 23:31