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

com.github.gentity.test.test5a_element_collection_embeddable.PhoneNumber Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version

package com.github.gentity.test.test5a_element_collection_embeddable;

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

@Embeddable
public class PhoneNumber implements Serializable
{

    @Column(name = "MOBILE", nullable = false)
    protected boolean mobile;
    @Column(name = "PHONE_NUM", length = 20, nullable = false)
    protected String phoneNum;

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

    public boolean getMobile() {
        return mobile;
    }

    public void setMobile(boolean mobile) {
        this.mobile = mobile;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public static class Builder {

        private final PhoneNumber instance = new PhoneNumber();

        public PhoneNumber build() {
            return instance;
        }

        public PhoneNumber.Builder mobile(boolean mobile) {
            instance.mobile = mobile;
            return this;
        }

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

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy