Projekt

Obecné

Profil

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

    
3
import lombok.Data;
4
import lombok.EqualsAndHashCode;
5
import lombok.NoArgsConstructor;
6
import vldc.aswi.domain.parameter.ParameterInConfiguration;
7

    
8
import javax.persistence.*;
9
import java.util.List;
10

    
11
/**
12
 * Domain entity representing Sestava in application.
13
 */
14
@Entity(name = "Konfigurace")
15
@Data
16
@EqualsAndHashCode(callSuper = true)
17
@NoArgsConstructor
18
public class Configuration extends EntityParent {
19

    
20
    /** Name of configuration. */
21
    private String name;
22

    
23
    /** Name of contingent table. */
24
    private String tableName;
25

    
26
    /** Specific user, which created this configuration. */
27
    @ManyToOne(fetch= FetchType.LAZY)
28
    @JoinColumn(name = "uzivatel_id")
29
    private User user;
30

    
31
    /** Used assembly as template in configuration. */
32
    @ManyToOne(fetch= FetchType.LAZY)
33
    @JoinColumn(name = "sestava_id")
34
    private Assembly assembly;
35

    
36
    /** List of parametersInConfiguration, which is part of this configuration. */
37
    @OneToMany(mappedBy = "configuration")
38
    private List<ParameterInConfiguration> parametersInConfiguration;
39

    
40
    /**
41
     * Constructor.
42
     * @param name - Name of configuration.
43
     * @param tableName - Name of contingent table.
44
     */
45
    public Configuration(String name, String tableName) {
46
        this.setName(name);
47
        this.setTableName(tableName);
48
    }
49
}
(2-2/8)