EmptyConstructor

The EmptyConstructor annotation is used to mark the default constructors required for the Spring Boot entities management. For example:



        // this constructor is used by Spring Boot to initialize autonomously the EquinoxUser entity
        
        public EquinoxUser() {
            this(null, null, null, null, null, null, null);
        }

        public EquinoxUser(String id, String token, String name, String surname, String email, String password, String language) {
            this(id, token, name, surname, email, password, DEFAULT_PROFILE_PIC, language);
        }

        public EquinoxUser(String id, String token, String name, String surname, String email, String password, String profilePic,
                           String language) {
            super(id);
            this.token = token;
            this.name = name;
            this.surname = surname;
            this.email = email;
            this.password = password;
            this.profilePic = profilePic;
            this.language = language;
        }

        public EquinoxUser(JSONObject jUser) {
            super(jUser);
            token = hItem.getString(TOKEN_KEY);
            name = hItem.getString(NAME_KEY);
            surname = hItem.getString(SURNAME_KEY);
            email = hItem.getString(EMAIL_KEY);
            password = hItem.getString(PASSWORD_KEY);
            profilePic = hItem.getString(PROFILE_PIC_KEY);
            language = hItem.getString(LANGUAGE_KEY);
        }
    

Author

N7ghtm4r3 - Tecknobit

Since

1.1.0

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String