buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/ExecutionTime.java
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 629 541af5ee3ed9
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.jpa.entity.metadata;
       
    18 
       
    19 import javax.persistence.Basic;
       
    20 import javax.persistence.CascadeType;
       
    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.ManyToOne;
       
    28 
       
    29 /**
       
    30  * Entity to store execution of some step/log.
       
    31  *
       
    32  */
       
    33 @Entity
       
    34 public class ExecutionTime {
       
    35 
       
    36     @Id
       
    37     @GeneratedValue(strategy = GenerationType.SEQUENCE)
       
    38     @Column(name = "EXECUTIONTIME_ID")
       
    39     private int id;
       
    40     
       
    41     @Basic
       
    42     private int time;
       
    43 
       
    44     @Basic
       
    45     @Column(name = "LOGPATH_ID", insertable = false, updatable = false)
       
    46     private int logPathID;
       
    47     
       
    48     @ManyToOne(cascade = CascadeType.REMOVE)
       
    49     @JoinColumn(name = "LOGPATH_ID", referencedColumnName = "LOGPATH_ID")
       
    50     private LogFile logFile;
       
    51 
       
    52     /**
       
    53      * Set record id.
       
    54      * @param id
       
    55      */
       
    56     public void setId(int id) {
       
    57         this.id = id;
       
    58     }
       
    59     
       
    60     /**
       
    61      * Get The record id.
       
    62      * @return
       
    63      */
       
    64     public int getId() {
       
    65         return id;
       
    66     }
       
    67 
       
    68     /**
       
    69      * Set the execution time in seconds.
       
    70      * @param time
       
    71      */
       
    72     public void setTime(int time) {
       
    73         this.time = time;
       
    74     }
       
    75 
       
    76     /**
       
    77      * Get the execution time in seconds.
       
    78      * @return
       
    79      */
       
    80     public int getTime() {
       
    81         return time;
       
    82     }
       
    83 
       
    84     /**
       
    85      * Set the logPathId.
       
    86      * @param logPathID
       
    87      */
       
    88     public void setLogPathID(int logPathID) {
       
    89         this.logPathID = logPathID;
       
    90     }
       
    91 
       
    92     /**
       
    93      * Get the logPathId.
       
    94      * @return
       
    95      */
       
    96     public int getLogPathID() {
       
    97         return logPathID;
       
    98     }
       
    99 
       
   100     /**
       
   101      * Set the logFile.
       
   102      * @param logFile
       
   103      */
       
   104     public void setLogFile(LogFile logFile) {
       
   105         this.logFile = logFile;
       
   106     }
       
   107 
       
   108     /**
       
   109      * Get the logFile.
       
   110      * @return
       
   111      */
       
   112     public LogFile getLogFile() {
       
   113         return logFile;
       
   114     }
       
   115 
       
   116 }