1 package ru.indvdum.mywork.openjpa.model;
3 import javax.persistence.Column;
4 import javax.persistence.Entity;
5 import javax.persistence.GeneratedValue;
6 import javax.persistence.GenerationType;
7 import javax.persistence.Id;
8 import javax.persistence.Table;
16 @Table(name = "TASKS")
17 public class Task implements IDatabaseObject {
19 private static final long serialVersionUID = -4457948503094306717L;
22 @GeneratedValue(strategy = GenerationType.IDENTITY)
23 @Column(name = "ID", nullable = false)
24 private Integer id = null;
26 @Column(name = "NAME")
27 private String name = null;
29 @Column(name = "DESCRIPTION")
30 private String description = null;
37 public boolean equals(Object obj) {
42 if (!(obj instanceof Task))
44 final Task other = (Task) obj;
45 return (this.id == other.id || (this.id != null && this.id.equals(other.id)));
48 public Integer getId() {
52 public void setId(Integer id) {
56 public String getName() {
60 public void setName(String name) {
64 public String getDescription() {
68 public void setDescription(String description) {
69 this.description = description;