… public class User { private String avatar; private String name; public User() {} public User(String avatar, int name) { .. } public String getAvatar() { return avatar; } public String getName() { return name; } } User user = new User("http://foo.bar/img.jpg", "Jean Pimentel"); ref.child("jpimentel").setValue(user);