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