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

com.github.gentity.demoaddressbook2.PhoneNumber Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version

package com.github.gentity.demoaddressbook2;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class PhoneNumber implements Serializable
{

    @Column(name = "PHONE_NUMBER")
    protected Integer phoneNumber;
    @Column(name = "KIND", length = 8, nullable = false)
    protected String kind;

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

    public Integer getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(Integer phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public static class Builder {

        private final PhoneNumber instance = new PhoneNumber();

        public PhoneNumber build() {
            return instance;
        }

        public PhoneNumber.Builder phoneNumber(Integer phoneNumber) {
            instance.phoneNumber = phoneNumber;
            return this;
        }

        public PhoneNumber.Builder kind(String kind) {
            instance.kind = kind;
            return this;
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy