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

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

There is a newer version: 1.0.0
Show newest version

package com.github.gentity.demogallery;

import java.io.Serializable;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

@Entity
@Table(name = "ROLE_USER_ADMIN")
@DiscriminatorValue("ADMIN")
@PrimaryKeyJoinColumn(name = "ROLE_ID", referencedColumnName = "ID", foreignKey = @ForeignKey(name = "FK_ROLE_GROUP_ADMIN_ROLE"))
public class RoleUserAdmin
    extends Role
    implements Serializable
{

    @ManyToOne
    @JoinColumn(name = "GROUP_ID")
    protected Group group;

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

    public Group getGroup() {
        return group;
    }

    public void setGroup(Group group) {
        this.group = group;
    }

    public static class Builder
        extends Role.Builder
    {

        private final RoleUserAdmin instance = new RoleUserAdmin();

        public RoleUserAdmin build() {
            return instance;
        }

        public RoleUserAdmin.Builder group(Group group) {
            instance.group = group;
            return this;
        }

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

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy