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

com.github.gentity.test.test6a_inheritance_basic_tables.Person Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version

package com.github.gentity.test.test6a_inheritance_basic_tables;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "PERSON")
public class Person
    extends GeneralBase
    implements Serializable, Human, Taxpayer
{

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID")
    protected Integer id;
    @Column(name = "NAME", length = 100)
    protected String name;

    public static Person.Builder builder() {
        return new Person.Builder();
    }

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static class Builder {

        private final Person instance = new Person();

        public Person build() {
            return instance;
        }

        public Person.Builder name(String name) {
            instance.name = name;
            return this;
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy