buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Priority.java
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 629 541af5ee3ed9
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
     1 
       
     2 /*
       
     3  * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     4  * All rights reserved.
       
     5  * This component and the accompanying materials are made available
       
     6  * under the terms of the License "Eclipse Public License v1.0"
       
     7  * which accompanies this distribution, and is available
       
     8  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9  *
       
    10  * Initial Contributors:
       
    11  * Nokia Corporation - initial contribution.
       
    12  *
       
    13  * Contributors:
       
    14  *
       
    15  * Description:  
       
    16  *
       
    17  */
       
    18 package com.nokia.helium.jpa.entity.metadata;
       
    19 
       
    20 
       
    21 import javax.persistence.Entity;
       
    22 //import org.apache.tools.ant.BuildException;
       
    23 import javax.persistence.GeneratedValue;
       
    24 import javax.persistence.GenerationType;
       
    25 import javax.persistence.Id;
       
    26 import javax.persistence.ManyToOne;
       
    27 import javax.persistence.Column;
       
    28 import javax.persistence.Basic;
       
    29 
       
    30 /**
       
    31  * Entity Class stores the priority.
       
    32  */
       
    33 @Entity
       
    34 public class Priority {
       
    35 
       
    36     @Id
       
    37     @GeneratedValue(strategy = GenerationType.SEQUENCE)
       
    38     @Column(name = "PRIORITY_ID")
       
    39     private int id;
       
    40 
       
    41     @Basic
       
    42     @Column(name = "PRIORITY")
       
    43     private String priority;
       
    44 
       
    45     @ManyToOne
       
    46     private Metadata metadata;
       
    47 
       
    48     /**
       
    49      * Default constructor.
       
    50      */
       
    51     public Priority() {
       
    52 
       
    53     }
       
    54 
       
    55     /**
       
    56      * Helper function to set the priority string.
       
    57      * @param prty - priority string to be stored for this
       
    58      * priority object.
       
    59      */
       
    60     public void setPriority(String prty) {
       
    61         priority = prty;
       
    62     }
       
    63 
       
    64     /*
       
    65      * Helper function to get the priority of the priority object
       
    66      * @return priority string of this priority object.
       
    67      */
       
    68     public String getPriority() {
       
    69         return priority;
       
    70     }
       
    71 
       
    72     /*
       
    73      * Set the identifier of this priority object in the db.
       
    74      * @param id for this priority in the db
       
    75      */
       
    76     public void setId(int identifier) {
       
    77         id = identifier;
       
    78     }
       
    79 
       
    80     /*
       
    81      * Gets the identifier of the priority object.
       
    82      * @return id of this priority object.
       
    83      */
       
    84     public int getId() {
       
    85         return id;
       
    86     }
       
    87 }