Subversion Repositories Integrator Subversion

Rev

Rev 760 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 760 Rev 771
Line 23... Line 23...
23
23
24
        private static final long serialVersionUID = 1L;
24
        private static final long serialVersionUID = 1L;
25
25
26
        private Long sequencial;
26
        private Long sequencial;
27
        private String nome;
27
        private String nome;
-
 
28
       
-
 
29
        public Ativo() {}
-
 
30
       
-
 
31
        public Ativo(Long sequencial, String nome) {
-
 
32
                this.sequencial = sequencial;
-
 
33
                this.nome = nome;
-
 
34
        }
28
       
35
       
29
        @Id
36
        @Id
30
        @SequenceGenerator(name = "sq_ativo")
37
        @SequenceGenerator(name = "sq_ativo")
31
        @GeneratedValue(strategy=GenerationType.IDENTITY)
38
        @GeneratedValue(strategy=GenerationType.IDENTITY)
32
        @Column(name="seq_ativo", nullable=false)
39
        @Column(name="seq_ativo", nullable=false)
Line 43... Line 50...
43
        public String getNome() {
50
        public String getNome() {
44
                return nome;
51
                return nome;
45
        }
52
        }
46
        public void setNome(String nome) {
53
        public void setNome(String nome) {
47
                this.nome = StringUtil.setarUpperCaseComTrim(nome);
54
                this.nome = StringUtil.setarUpperCaseComTrim(nome);
-
 
55
        }
-
 
56
       
-
 
57
        @Override
-
 
58
        public int hashCode() {
-
 
59
                final int prime = 31;
-
 
60
                int result = 1;
-
 
61
                result = prime * result
-
 
62
                                + ((sequencial == null) ? 0 : sequencial.hashCode());
-
 
63
                return result;
-
 
64
        }
-
 
65
-
 
66
        @Override
-
 
67
        public boolean equals(Object obj) {
-
 
68
                if (this == obj)
-
 
69
                        return true;
-
 
70
                if (obj == null)
-
 
71
                        return false;
-
 
72
                if (getClass() != obj.getClass())
-
 
73
                        return false;
-
 
74
                Ativo other = (Ativo) obj;
-
 
75
                if (sequencial == null) {
-
 
76
                        if (other.sequencial != null)
-
 
77
                                return false;
-
 
78
                } else if (!sequencial.equals(other.sequencial))
-
 
79
                        return false;
-
 
80
                return true;
48
        }
81
        }
49
       
82
       
50
}
83
}