Systém přístupových práv
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
package info.bukova.isspst.data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
@Entity
|
||||
@Table(name="PERMISSION")
|
||||
public class Permission extends BaseSimpleData implements GrantedAuthority {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column(name="AUTHORITY")
|
||||
private String authority;
|
||||
@Column(name="DESCRIPTION")
|
||||
private String description;
|
||||
@Column(name="MODULE")
|
||||
private String module;
|
||||
|
||||
public Permission(String authority, String description) {
|
||||
this.authority = authority;
|
||||
this.description = description;
|
||||
this.module = "";
|
||||
}
|
||||
|
||||
public Permission() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuthority() {
|
||||
return authority;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getModule() {
|
||||
return module;
|
||||
}
|
||||
|
||||
public void setModule(String module) {
|
||||
this.module = module;
|
||||
}
|
||||
|
||||
public void setAuthority(String authority) {
|
||||
this.authority = authority;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if ((o instanceof Permission) && ((Permission)o).getId() == this.getId()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user