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
|
@ -30,129 +30,140 @@ import javax.persistence.TemporalType;
|
|||
@Table(name = "PERFIL")
|
||||
public class Perfil implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PERFIL_SEQ")
|
||||
@Column(name = "PERFIL_ID")
|
||||
private Integer perfilId;
|
||||
@Column(name = "DESCPERFIL")
|
||||
private String descperfil;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@OneToMany(mappedBy = "perfil")
|
||||
private List<UsuarioPerfil> usuarioPerfilList;
|
||||
@OneToMany(mappedBy = "perfil", cascade = CascadeType.ALL)
|
||||
private List<PerfilFuncion> perfilFuncionList;
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PERFIL_SEQ")
|
||||
@Column(name = "PERFIL_ID")
|
||||
private Integer perfilId;
|
||||
@Column(name = "DESCPERFIL")
|
||||
private String descperfil;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "INDJERARQUIA")
|
||||
private Integer indJerarquia;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@OneToMany(mappedBy = "perfil")
|
||||
private List<UsuarioPerfil> usuarioPerfilList;
|
||||
@OneToMany(mappedBy = "perfil", cascade = CascadeType.ALL)
|
||||
private List<PerfilFuncion> perfilFuncionList;
|
||||
|
||||
public Perfil() {
|
||||
}
|
||||
public Perfil() {
|
||||
}
|
||||
|
||||
public Perfil(Integer perfilId) {
|
||||
this.perfilId = perfilId;
|
||||
}
|
||||
public Perfil(Integer perfilId) {
|
||||
this.perfilId = perfilId;
|
||||
}
|
||||
|
||||
public Integer getPerfilId() {
|
||||
return perfilId;
|
||||
}
|
||||
public Integer getPerfilId() {
|
||||
return perfilId;
|
||||
}
|
||||
|
||||
public void setPerfilId(Integer perfilId) {
|
||||
this.perfilId = perfilId;
|
||||
}
|
||||
public void setPerfilId(Integer perfilId) {
|
||||
this.perfilId = perfilId;
|
||||
}
|
||||
|
||||
public String getDescperfil() {
|
||||
return descperfil;
|
||||
}
|
||||
public String getDescperfil() {
|
||||
return descperfil;
|
||||
}
|
||||
|
||||
public void setDescperfil(String descperfil) {
|
||||
this.descperfil = descperfil;
|
||||
}
|
||||
public void setDescperfil(String descperfil) {
|
||||
this.descperfil = descperfil;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
public Integer getIndJerarquia() {
|
||||
return indJerarquia;
|
||||
}
|
||||
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
public void setIndJerarquia(Integer indJerarquia) {
|
||||
this.indJerarquia = indJerarquia;
|
||||
}
|
||||
|
||||
public List<UsuarioPerfil> getUsuarioPerfilList() {
|
||||
List<UsuarioPerfil> tmp = new ArrayList<UsuarioPerfil>();
|
||||
if (usuarioPerfilList != null) {
|
||||
for (UsuarioPerfil cp : this.usuarioPerfilList) {
|
||||
if (cp.getActivo()) {
|
||||
tmp.add(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
|
||||
return tmp;
|
||||
}
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public void setUsuarioPerfilList(List<UsuarioPerfil> usuarioPerfilList) {
|
||||
this.usuarioPerfilList = usuarioPerfilList;
|
||||
}
|
||||
public List<UsuarioPerfil> getUsuarioPerfilList() {
|
||||
List<UsuarioPerfil> tmp = new ArrayList<UsuarioPerfil>();
|
||||
if (usuarioPerfilList != null) {
|
||||
for (UsuarioPerfil cp : this.usuarioPerfilList) {
|
||||
if (cp.getActivo()) {
|
||||
tmp.add(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<PerfilFuncion> getPerfilFuncionList() {
|
||||
List<PerfilFuncion> tmp = new ArrayList<PerfilFuncion>();
|
||||
if (perfilFuncionList != null) {
|
||||
for (PerfilFuncion cp : this.perfilFuncionList) {
|
||||
if (cp.getActivo()) {
|
||||
tmp.add(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
return tmp;
|
||||
}
|
||||
public void setUsuarioPerfilList(List<UsuarioPerfil> usuarioPerfilList) {
|
||||
this.usuarioPerfilList = usuarioPerfilList;
|
||||
}
|
||||
|
||||
public void setPerfilFuncionList(List<PerfilFuncion> perfilFuncionList) {
|
||||
this.perfilFuncionList = perfilFuncionList;
|
||||
}
|
||||
public List<PerfilFuncion> getPerfilFuncionList() {
|
||||
List<PerfilFuncion> tmp = new ArrayList<PerfilFuncion>();
|
||||
if (perfilFuncionList != null) {
|
||||
for (PerfilFuncion cp : this.perfilFuncionList) {
|
||||
if (cp.getActivo()) {
|
||||
tmp.add(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (perfilId != null ? perfilId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
public void setPerfilFuncionList(List<PerfilFuncion> perfilFuncionList) {
|
||||
this.perfilFuncionList = perfilFuncionList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (perfilId != null ? perfilId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@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