io.zahori.server.security.RoleEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zahori-server Show documentation
Show all versions of zahori-server Show documentation
Zahori Front End server for Zahori.io
package io.zahori.server.security;
/*-
* #%L
* zahori-server
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2021 PANEL SISTEMAS INFORMATICOS,S.L
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
* #L%
*/
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.sun.istack.NotNull;
/**
* The type Role entity.
*/
@Entity
@Table(name = "roles")
public class RoleEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
private String code;
@NotNull
private String label;
/**
* Instantiates a new Role entity.
*/
public RoleEntity() {
}
@Override
public String toString() {
return "RoleEntity [id=" + id + ", code=" + code + ", label=" + label + "]";
}
/**
* Gets id.
*
* @return the id
*/
public Long getId() {
return id;
}
/**
* Sets id.
*
* @param id the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* Gets code.
*
* @return the code
*/
public String getCode() {
return code;
}
/**
* Sets code.
*
* @param code the code
*/
public void setCode(String code) {
this.code = code;
}
/**
* Gets label.
*
* @return the label
*/
public String getLabel() {
return label;
}
/**
* Sets label.
*
* @param label the label
*/
public void setLabel(String label) {
this.label = label;
}
}