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

com.github.gentity.demogallery.Group Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version

package com.github.gentity.demogallery;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "GROUP")
public class Group implements Serializable
{

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID")
    protected Integer id;
    @Column(name = "NAME", length = 100, nullable = false)
    protected String name;
    @OneToMany(mappedBy = "group")
    protected List roleUserAdmin = new ArrayList();

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

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }

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

    public List getRoleUserAdmin() {
        return roleUserAdmin;
    }

    public void setRoleUserAdmin(List roleUserAdmin) {
        this.roleUserAdmin = roleUserAdmin;
    }

    public static class Builder {

        private final Group instance = new Group();

        public Group build() {
            return instance;
        }

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

        public Group.Builder roleUserAdmin(List roleUserAdmin) {
            instance.roleUserAdmin = roleUserAdmin;
            return this;
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy