Projekt

Obecné

Profil

Stáhnout (964 Bajtů) Statistiky
| Větev: | Revize:
1
package vldc.aswi.domain;
2

    
3
import javax.persistence.*;
4

    
5
import lombok.Data;
6
import org.apache.poi.ss.formula.functions.T;
7
import vldc.aswi.domain.parameter.Parameter;
8

    
9
import java.util.LinkedList;
10
import java.util.List;
11

    
12
/**
13
 * Class which is extended for all domain entities containing common attributes.
14
 */
15
@MappedSuperclass
16
@Data
17
public class EntityParent {
18

    
19
    /** Specific identificator for every table. */
20
    @Id
21
    @Column(name="ID")
22
    @GeneratedValue(strategy=GenerationType.IDENTITY)
23
    private Long id;
24

    
25
    @Override
26
    public boolean equals(Object obj)
27
    {
28
        if(this == obj) {
29
            return true;
30
        }
31

    
32
        if(obj == null || obj.getClass()!= this.getClass()) {
33
            return false;
34
        }
35

    
36
        // type casting of the argument.
37
        EntityParent parent = (EntityParent) obj;
38

    
39
        if (parent.getId() == null) {
40
            return false;
41
        }
42

    
43
        return (parent.getId() == this.getId());
44
    }
45
}
(3-3/8)