Alterar Perfil (fixes bug #6329)
Tempo: 04 horas git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@44290 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
0abba6cfc9
commit
8e6347b131
|
@ -22,7 +22,7 @@ import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
|
@ -30,129 +30,140 @@ import javax.persistence.TemporalType;
|
||||||
@Table(name = "PERFIL")
|
@Table(name = "PERFIL")
|
||||||
public class Perfil implements Serializable {
|
public class Perfil implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PERFIL_SEQ")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PERFIL_SEQ")
|
||||||
@Column(name = "PERFIL_ID")
|
@Column(name = "PERFIL_ID")
|
||||||
private Integer perfilId;
|
private Integer perfilId;
|
||||||
@Column(name = "DESCPERFIL")
|
@Column(name = "DESCPERFIL")
|
||||||
private String descperfil;
|
private String descperfil;
|
||||||
@Column(name = "ACTIVO")
|
@Column(name = "ACTIVO")
|
||||||
private Boolean activo;
|
private Boolean activo;
|
||||||
@Column(name = "FECMODIF")
|
@Column(name = "FECMODIF")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date fecmodif;
|
private Date fecmodif;
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "INDJERARQUIA")
|
||||||
private Integer usuarioId;
|
private Integer indJerarquia;
|
||||||
@OneToMany(mappedBy = "perfil")
|
@Column(name = "USUARIO_ID")
|
||||||
private List<UsuarioPerfil> usuarioPerfilList;
|
private Integer usuarioId;
|
||||||
@OneToMany(mappedBy = "perfil", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "perfil")
|
||||||
private List<PerfilFuncion> perfilFuncionList;
|
private List<UsuarioPerfil> usuarioPerfilList;
|
||||||
|
@OneToMany(mappedBy = "perfil", cascade = CascadeType.ALL)
|
||||||
|
private List<PerfilFuncion> perfilFuncionList;
|
||||||
|
|
||||||
public Perfil() {
|
public Perfil() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Perfil(Integer perfilId) {
|
public Perfil(Integer perfilId) {
|
||||||
this.perfilId = perfilId;
|
this.perfilId = perfilId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getPerfilId() {
|
public Integer getPerfilId() {
|
||||||
return perfilId;
|
return perfilId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPerfilId(Integer perfilId) {
|
public void setPerfilId(Integer perfilId) {
|
||||||
this.perfilId = perfilId;
|
this.perfilId = perfilId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescperfil() {
|
public String getDescperfil() {
|
||||||
return descperfil;
|
return descperfil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescperfil(String descperfil) {
|
public void setDescperfil(String descperfil) {
|
||||||
this.descperfil = descperfil;
|
this.descperfil = descperfil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getActivo() {
|
public Boolean getActivo() {
|
||||||
return activo;
|
return activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setActivo(Boolean activo) {
|
public void setActivo(Boolean activo) {
|
||||||
this.activo = activo;
|
this.activo = activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getFecmodif() {
|
public Date getFecmodif() {
|
||||||
return fecmodif;
|
return fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFecmodif(Date fecmodif) {
|
public void setFecmodif(Date fecmodif) {
|
||||||
this.fecmodif = fecmodif;
|
this.fecmodif = fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getUsuarioId() {
|
public Integer getIndJerarquia() {
|
||||||
return usuarioId;
|
return indJerarquia;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsuarioId(Integer usuarioId) {
|
public void setIndJerarquia(Integer indJerarquia) {
|
||||||
this.usuarioId = usuarioId;
|
this.indJerarquia = indJerarquia;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<UsuarioPerfil> getUsuarioPerfilList() {
|
public Integer getUsuarioId() {
|
||||||
List<UsuarioPerfil> tmp = new ArrayList<UsuarioPerfil>();
|
return usuarioId;
|
||||||
if (usuarioPerfilList != null) {
|
}
|
||||||
for (UsuarioPerfil cp : this.usuarioPerfilList) {
|
|
||||||
if (cp.getActivo()) {
|
|
||||||
tmp.add(cp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return tmp;
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
}
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
public void setUsuarioPerfilList(List<UsuarioPerfil> usuarioPerfilList) {
|
public List<UsuarioPerfil> getUsuarioPerfilList() {
|
||||||
this.usuarioPerfilList = usuarioPerfilList;
|
List<UsuarioPerfil> tmp = new ArrayList<UsuarioPerfil>();
|
||||||
}
|
if (usuarioPerfilList != null) {
|
||||||
|
for (UsuarioPerfil cp : this.usuarioPerfilList) {
|
||||||
|
if (cp.getActivo()) {
|
||||||
|
tmp.add(cp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<PerfilFuncion> getPerfilFuncionList() {
|
return tmp;
|
||||||
List<PerfilFuncion> tmp = new ArrayList<PerfilFuncion>();
|
}
|
||||||
if (perfilFuncionList != null) {
|
|
||||||
for (PerfilFuncion cp : this.perfilFuncionList) {
|
|
||||||
if (cp.getActivo()) {
|
|
||||||
tmp.add(cp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return tmp;
|
public void setUsuarioPerfilList(List<UsuarioPerfil> usuarioPerfilList) {
|
||||||
}
|
this.usuarioPerfilList = usuarioPerfilList;
|
||||||
|
}
|
||||||
|
|
||||||
public void setPerfilFuncionList(List<PerfilFuncion> perfilFuncionList) {
|
public List<PerfilFuncion> getPerfilFuncionList() {
|
||||||
this.perfilFuncionList = perfilFuncionList;
|
List<PerfilFuncion> tmp = new ArrayList<PerfilFuncion>();
|
||||||
}
|
if (perfilFuncionList != null) {
|
||||||
|
for (PerfilFuncion cp : this.perfilFuncionList) {
|
||||||
|
if (cp.getActivo()) {
|
||||||
|
tmp.add(cp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
return tmp;
|
||||||
public int hashCode() {
|
}
|
||||||
int hash = 0;
|
|
||||||
hash += (perfilId != null ? perfilId.hashCode() : 0);
|
|
||||||
return hash;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
public void setPerfilFuncionList(List<PerfilFuncion> perfilFuncionList) {
|
||||||
public boolean equals(Object object) {
|
this.perfilFuncionList = perfilFuncionList;
|
||||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
}
|
||||||
if (!(object instanceof Perfil)) {
|
|
||||||
return false;
|
@Override
|
||||||
}
|
public int hashCode() {
|
||||||
Perfil other = (Perfil) object;
|
int hash = 0;
|
||||||
if ((this.perfilId == null && other.perfilId != null) || (this.perfilId != null && !this.perfilId.equals(other.perfilId))) {
|
hash += (perfilId != null ? perfilId.hashCode() : 0);
|
||||||
return false;
|
return hash;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
@Override
|
||||||
|
public boolean equals(Object object) {
|
||||||
|
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||||
|
if (!(object instanceof Perfil)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Perfil other = (Perfil) object;
|
||||||
|
if ((this.perfilId == null && other.perfilId != null) || (this.perfilId != null && !this.perfilId.equals(other.perfilId))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getDescperfil();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return getDescperfil();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue