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 import javax.persistence.Entity; |
|
21 |
|
22 |
|
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 /** |
|
32 * Entity LogFile to store the information about the log for |
|
33 * which the data to be written to database. |
|
34 */ |
|
35 @Entity |
|
36 public class LogFile { |
|
37 |
|
38 @Id |
|
39 @GeneratedValue(strategy = GenerationType.SEQUENCE) |
|
40 @Column(name = "LOGPATH_ID") |
|
41 private int id; |
|
42 |
|
43 @Basic |
|
44 @Column(unique = true, nullable = false, length = 500) |
|
45 private String path; |
|
46 |
|
47 @ManyToOne |
|
48 private Metadata metadata; |
|
49 |
|
50 /** |
|
51 * Helper function to set the identifier for the log file. |
|
52 * @param identifier for the log file. |
|
53 */ |
|
54 public void setId(int identifier) { |
|
55 id = identifier; |
|
56 } |
|
57 |
|
58 /** |
|
59 * Helper function to get the identifier for the log file. |
|
60 * @return identifier for this log file. |
|
61 */ |
|
62 public int getId() { |
|
63 return id; |
|
64 } |
|
65 |
|
66 /** |
|
67 * Helper function to set the path of the log file. |
|
68 * @param location of the log file. |
|
69 */ |
|
70 public void setPath(String location) { |
|
71 path = location; |
|
72 } |
|
73 |
|
74 /** |
|
75 * Helper function to get the path. |
|
76 * @return path of the log file.. |
|
77 */ |
|
78 public String getPath() { |
|
79 return path; |
|
80 } |
|
81 } |
|