com.github.gentity.demogallery.Role Maven / Gradle / Ivy
package com.github.gentity.demogallery;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
@Entity
@Table(name = "ROLE")
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "DTYPE", length = 8)
public class Role implements Serializable
{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
protected Integer id;
@Column(name = "NAME", length = 100)
protected String name;
public static Role.Builder builder() {
return new Role.Builder();
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static class Builder {
private final Role instance = new Role();
public Role build() {
return instance;
}
public Role.Builder name(String name) {
instance.name = name;
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy