buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefComponent.java
changeset 628 7c4a911dc066
child 645 b8d81fa19e7d
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
       
     1 /*
       
     2  * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  
       
    15  *
       
    16  */
       
    17 package com.nokia.helium.metadata.model.metadata;
       
    18 
       
    19 import java.util.List;
       
    20 
       
    21 import javax.persistence.CascadeType;
       
    22 import javax.persistence.Column;
       
    23 import javax.persistence.Entity;
       
    24 import javax.persistence.GeneratedValue;
       
    25 import javax.persistence.GenerationType;
       
    26 import javax.persistence.Id;
       
    27 import javax.persistence.JoinColumn;
       
    28 import javax.persistence.ManyToOne;
       
    29 import javax.persistence.OneToMany;
       
    30 
       
    31 /**
       
    32  * System definition component. 
       
    33  *
       
    34  */
       
    35 @SuppressWarnings("PMD.UnusedPrivateField")
       
    36 @Entity
       
    37 public class SysdefComponent {
       
    38     @Id
       
    39     @GeneratedValue(strategy = GenerationType.SEQUENCE)
       
    40     @Column(name = "COMPONENT_ID")
       
    41     private int id;
       
    42         
       
    43     @Column(name = "ID", nullable = false, unique = true, length = 255)
       
    44     private String componentId;
       
    45 
       
    46     @Column(name = "NAME", nullable = false, length = 255)
       
    47     private String name;
       
    48     
       
    49     @Column(name = "COLLECTION_ID", insertable = false, updatable = false, nullable = false)
       
    50     private int collectionId;
       
    51 
       
    52     @ManyToOne(cascade = CascadeType.REMOVE)
       
    53     @JoinColumn(name = "COLLECTION_ID", referencedColumnName = "COLLECTION_ID")
       
    54     private SysdefCollection sysdefCollection;
       
    55     
       
    56     @OneToMany
       
    57     @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID")
       
    58     private List<SysdefUnit> sysdefUnits;
       
    59 
       
    60     public void setCollectionId(int collectionId) {
       
    61         this.collectionId = collectionId;
       
    62     }
       
    63 
       
    64     public int getCollectionId() {
       
    65         return collectionId;
       
    66     }
       
    67 
       
    68     public void setComponentId(String componentId) {
       
    69         this.componentId = componentId;
       
    70     }
       
    71 
       
    72     public String getComponentId() {
       
    73         return componentId;
       
    74     }
       
    75 
       
    76     public void setId(int id) {
       
    77         this.id = id;
       
    78     }
       
    79 
       
    80     public int getId() {
       
    81         return id;
       
    82     }
       
    83 
       
    84     public void setSysdefCollection(SysdefCollection sysdefCollection) {
       
    85         this.sysdefCollection = sysdefCollection;
       
    86     }
       
    87 
       
    88     public SysdefCollection getSysdefCollection() {
       
    89         return sysdefCollection;
       
    90     }
       
    91 
       
    92     public void setName(String name) {
       
    93         this.name = name;
       
    94     }
       
    95 
       
    96     public String getName() {
       
    97         return name;
       
    98     }
       
    99 }