buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefCollection.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 collection. 
       
    33  *
       
    34  */
       
    35 @SuppressWarnings("PMD.UnusedPrivateField")
       
    36 @Entity
       
    37 public class SysdefCollection {
       
    38     
       
    39     @Id
       
    40     @GeneratedValue(strategy = GenerationType.SEQUENCE)
       
    41     @Column(name = "COLLECTION_ID")
       
    42     private int id;
       
    43     
       
    44     @Column(name = "ID", nullable = false, unique = true, length = 255)
       
    45     private String collectionId;
       
    46 
       
    47     @Column(name = "NAME", nullable = false, length = 255)
       
    48     private String name;
       
    49 
       
    50     @Column(name = "PACKAGE_ID", insertable = false, updatable = false, nullable = false)
       
    51     private int packageId;
       
    52 
       
    53     @ManyToOne(cascade = CascadeType.REMOVE)
       
    54     @JoinColumn(name = "PACKAGE_ID", referencedColumnName = "PACKAGE_ID")
       
    55     private SysdefPackage sysdefPackage;
       
    56 
       
    57     @OneToMany
       
    58     @JoinColumn(name = "COLLECTION_ID", referencedColumnName = "COLLECTION_ID")
       
    59     private List<SysdefComponent> sysdefComponents;
       
    60     
       
    61     
       
    62     public void setSysdefPackage(SysdefPackage sysdefPackage) {
       
    63         this.sysdefPackage = sysdefPackage;
       
    64     }
       
    65 
       
    66     public SysdefPackage getSysdefPackage() {
       
    67         return sysdefPackage;
       
    68     }
       
    69 
       
    70     public void setCollectionId(String collectionId) {
       
    71         this.collectionId = collectionId;
       
    72     }
       
    73 
       
    74     public String getCollectionId() {
       
    75         return collectionId;
       
    76     }
       
    77 
       
    78     public void setId(int id) {
       
    79         this.id = id;
       
    80     }
       
    81 
       
    82     public int getId() {
       
    83         return id;
       
    84     }
       
    85 
       
    86     public void setName(String name) {
       
    87         this.name = name;
       
    88     }
       
    89 
       
    90     public String getName() {
       
    91         return name;
       
    92     }
       
    93 
       
    94     public void setPackageId(int packageId) {
       
    95         this.packageId = packageId;
       
    96     }
       
    97 
       
    98     public int getPackageId() {
       
    99         return packageId;
       
   100     }
       
   101 }