buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefPackage.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.Column;
       
    22 import javax.persistence.Entity;
       
    23 import javax.persistence.GeneratedValue;
       
    24 import javax.persistence.GenerationType;
       
    25 import javax.persistence.Id;
       
    26 import javax.persistence.JoinColumn;
       
    27 import javax.persistence.OneToMany;
       
    28 
       
    29 /**
       
    30  * This class represent the PACKAGE table in the
       
    31  * database.
       
    32  * Each package name will be unique across the build
       
    33  * that is why it is not link to any specific logFile. 
       
    34  */
       
    35 @SuppressWarnings("PMD.UnusedPrivateField")
       
    36 @Entity
       
    37 public class SysdefPackage {
       
    38     
       
    39     @Id
       
    40     @GeneratedValue(strategy = GenerationType.SEQUENCE)
       
    41     @Column(name = "PACKAGE_ID")
       
    42     private int id;
       
    43 
       
    44     @Column(name = "ID", nullable = false, unique = true, length = 255)
       
    45     private String packageId;
       
    46 
       
    47     @Column(name = "NAME", nullable = false, length = 255)
       
    48     private String name;
       
    49     
       
    50     @OneToMany
       
    51     @JoinColumn(name = "PACKAGE_ID", referencedColumnName = "PACKAGE_ID")
       
    52     private List<SysdefCollection> sysdefCollections;
       
    53 
       
    54     /**
       
    55      * Set the id of the row.
       
    56      * @param id
       
    57      */
       
    58     public void setId(int id) {
       
    59         this.id = id;
       
    60     }
       
    61 
       
    62     /**
       
    63      * Get the id of the row.
       
    64      * @return the id
       
    65      */
       
    66     public int getId() {
       
    67         return id;
       
    68     }
       
    69 
       
    70     public void setPackageId(String packageId) {
       
    71         this.packageId = packageId;
       
    72     }
       
    73 
       
    74     public String getPackageId() {
       
    75         return packageId;
       
    76     }
       
    77 
       
    78     public void setName(String name) {
       
    79         this.name = name;
       
    80     }
       
    81 
       
    82     public String getName() {
       
    83         return name;
       
    84     }
       
    85 }