diff --git a/src/com/rjconsultores/ventaboletos/entidad/Perfil.java b/src/com/rjconsultores/ventaboletos/entidad/Perfil.java index f10b6cca7..09a13f69d 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/Perfil.java +++ b/src/com/rjconsultores/ventaboletos/entidad/Perfil.java @@ -22,7 +22,7 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; /** - * + * * @author Rafius */ @Entity @@ -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 usuarioPerfilList; - @OneToMany(mappedBy = "perfil", cascade = CascadeType.ALL) - private List 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 usuarioPerfilList; + @OneToMany(mappedBy = "perfil", cascade = CascadeType.ALL) + private List 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 getUsuarioPerfilList() { - List tmp = new ArrayList(); - 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 usuarioPerfilList) { - this.usuarioPerfilList = usuarioPerfilList; - } + public List getUsuarioPerfilList() { + List tmp = new ArrayList(); + if (usuarioPerfilList != null) { + for (UsuarioPerfil cp : this.usuarioPerfilList) { + if (cp.getActivo()) { + tmp.add(cp); + } + } + } - public List getPerfilFuncionList() { - List tmp = new ArrayList(); - if (perfilFuncionList != null) { - for (PerfilFuncion cp : this.perfilFuncionList) { - if (cp.getActivo()) { - tmp.add(cp); - } - } - } + return tmp; + } - return tmp; - } + public void setUsuarioPerfilList(List usuarioPerfilList) { + this.usuarioPerfilList = usuarioPerfilList; + } - public void setPerfilFuncionList(List perfilFuncionList) { - this.perfilFuncionList = perfilFuncionList; - } + public List getPerfilFuncionList() { + List tmp = new ArrayList(); + 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 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(); - } }