buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefUnit.java
author wbernard
Fri, 13 Aug 2010 14:59:05 +0300
changeset 628 7c4a911dc066
permissions -rw-r--r--
helium_11.0.0-e00f171ca185
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     1
/*
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     2
 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     3
 * All rights reserved.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     5
 * under the terms of the License "Eclipse Public License v1.0"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     8
 *
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     9
 * Initial Contributors:
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    11
 *
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    12
 * Contributors:
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    13
 *
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    14
 * Description:  
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    15
 *
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    16
 */
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    17
package com.nokia.helium.metadata.model.metadata;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    18
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    19
import java.util.List;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    20
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    21
import javax.persistence.CascadeType;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    22
import javax.persistence.Column;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    23
import javax.persistence.Entity;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    24
import javax.persistence.GeneratedValue;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    25
import javax.persistence.GenerationType;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    26
import javax.persistence.Id;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    27
import javax.persistence.JoinColumn;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    28
import javax.persistence.ManyToOne;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    29
import javax.persistence.OneToMany;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    30
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    31
/**
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    32
 * System definition unit.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    33
 *
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    34
 */
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    35
@SuppressWarnings("PMD.UnusedPrivateField")
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    36
@Entity
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    37
public class SysdefUnit {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    38
    @Id
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    39
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    40
    @Column(name = "UNIT_ID")
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    41
    private int id;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    42
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    43
    @Column(name = "LOCATION", nullable = false, length = 4096)
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    44
    private String location;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    45
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    46
    @Column(name = "COMPONENT_ID", insertable = false, updatable = false, nullable = false)
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    47
    private int componentId;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    48
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    49
    @ManyToOne(cascade = CascadeType.REMOVE)
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    50
    @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID")
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    51
    private SysdefComponent sysdefComponent;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    52
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    53
    @OneToMany
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    54
    @JoinColumn(name = "UNIT_ID", referencedColumnName = "UNIT_ID")
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    55
    private List<Component> components;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    56
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    57
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    58
    public void setId(int id) {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    59
        this.id = id;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    60
    }
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    61
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    62
    public int getId() {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    63
        return id;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    64
    }
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    65
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    66
    public void setLocation(String location) {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    67
        this.location = location;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    68
    }
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    69
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    70
    public String getLocation() {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    71
        return location;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    72
    }
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    73
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    74
    public void setComponentId(int componentId) {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    75
        this.componentId = componentId;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    76
    }
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    77
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    78
    public int getComponentId() {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    79
        return componentId;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    80
    }
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    81
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    82
    public void setSysdefComponent(SysdefComponent sysdefComponent) {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    83
        this.sysdefComponent = sysdefComponent;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    84
    }
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    85
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    86
    public SysdefComponent getSysdefComponent() {
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    87
        return sysdefComponent;
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    88
    }
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    89
}