All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.example.PersonBean Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
package com.example;

import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;

/**
 * Bean type PersonBean.
 *
 * Auto-generated from specification.
 */
public final class PersonBean implements PersonType {
    private int id = 0;

    private String name = "";

    private long birthTimestamp = 0L;

    /**
     * Constructor.
     */
    public PersonBean() {
    }

    @Override
    public int getId() {
        return id;
    }

    /**
     * Setter for the property id.
     * @param id the new value of id
     */
    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String getName() {
        return name;
    }

    /**
     * Setter for the property name.
     * @param name the new value of name
     */
    public void setName(String name) {
        Objects.requireNonNull(name);
        this.name = name;
    }

    /**
     * Getter for the property birthTimestamp.
     * @return the value of birthTimestamp
     */
    public long getBirthTimestamp() {
        return birthTimestamp;
    }

    /**
     * Setter for the property birthTimestamp.
     * @param birthTimestamp the new value of birthTimestamp
     */
    public void setBirthTimestamp(long birthTimestamp) {
        this.birthTimestamp = birthTimestamp;
    }

    @Override
    public String toString() {
        return "PersonBean[id=" + id + ", name=" + name + ", birthTimestamp=" + birthTimestamp + "]";
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, birthTimestamp);
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        else if (other == null || !this.getClass().equals(other.getClass())) {
            return false;
        }
        final PersonBean that = (PersonBean) other;
        return this.id == that.id && this.name.equals(that.name) && this.birthTimestamp == that.birthTimestamp;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy