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

com.github.gentity.test.test6a_inheritance_basic_tables.Car 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.Id;
import javax.persistence.Table;

@Entity
@Table(name = "CAR")
public class Car
    extends VehicleBase
    implements Serializable, Thing
{

    @Id
    @Column(name = "ID")
    protected Integer id;
    @Column(name = "MANUFACTURER", length = 100)
    protected String manufacturer;
    @Column(name = "MODEL", length = 100)
    protected String model;

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

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public static class Builder {

        private final Car instance = new Car();

        public Car build() {
            return instance;
        }

        public Car.Builder id(Integer id) {
            instance.id = id;
            return this;
        }

        public Car.Builder manufacturer(String manufacturer) {
            instance.manufacturer = manufacturer;
            return this;
        }

        public Car.Builder model(String model) {
            instance.model = model;
            return this;
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy