forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
1.9 KiB
103 lines
1.9 KiB
/*
|
|
* To change this template, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
package db.entidades;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.List;
|
|
|
|
/**
|
|
*
|
|
* @author lluis
|
|
*/
|
|
public class Area implements Serializable, Comparable< Area >
|
|
{
|
|
private Integer id;
|
|
private Integer area_id; //from relatorios
|
|
private Integer plano_id;
|
|
private String descricao;
|
|
private Boolean is_principal;
|
|
private Integer ordem;
|
|
private List<Risco> riscos;
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getDescricao() {
|
|
return descricao;
|
|
}
|
|
|
|
public void setDescricao(String descricao) {
|
|
this.descricao = descricao;
|
|
}
|
|
|
|
public List<Risco> getRiscos() {
|
|
return riscos;
|
|
}
|
|
|
|
public void setRiscos(List<Risco> riscos) {
|
|
this.riscos = riscos;
|
|
}
|
|
|
|
public Integer getPlano_id() {
|
|
return plano_id;
|
|
}
|
|
|
|
public void setPlano_id(Integer plano_id) {
|
|
this.plano_id = plano_id;
|
|
}
|
|
|
|
public Integer getArea_id() {
|
|
return area_id;
|
|
}
|
|
|
|
public void setArea_id(Integer area_id) {
|
|
this.area_id = area_id;
|
|
}
|
|
|
|
public void setOrdem( Integer ordem )
|
|
{
|
|
this.ordem = ordem;
|
|
}
|
|
|
|
public Integer getOrdem()
|
|
{
|
|
return ordem;
|
|
}
|
|
|
|
public void setIs_principal( Boolean is_principal )
|
|
{
|
|
this.is_principal = is_principal;
|
|
}
|
|
|
|
public Boolean getIs_principal()
|
|
{
|
|
return is_principal;
|
|
}
|
|
|
|
@Override
|
|
public int compareTo( Area o )
|
|
{
|
|
if( is_principal && !( ( Area ) o ).is_principal )
|
|
{
|
|
return -1;
|
|
}
|
|
else if( !is_principal && ( ( Area ) o ).is_principal )
|
|
{
|
|
return 1;
|
|
}
|
|
if( ordem != null )
|
|
{
|
|
return ( ( ( Area ) o ).ordem == null ) ? -1 : ordem.compareTo( ( ( Area ) o ).ordem );
|
|
}
|
|
return 0;
|
|
}
|
|
}
|