| Conversion.java |
1 /**
2 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3 *
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
7 * any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * details.
13 */
14
15 package com.liferay.portlet.unitconverter.model;
16
17 /**
18 * <a href="Conversion.java.html"><b><i>View Source</i></b></a>
19 *
20 * @author James Lefeu
21 */
22 public class Conversion {
23
24 public Conversion(int type, int fromId, int toId,
25 double fromValue) {
26 _type = type;
27 _fromId = fromId;
28 _toId = toId;
29 _fromValue = fromValue;
30 }
31
32 public Conversion(int type, int fromId, int toId,
33 double fromValue, double toValue) {
34 _type = type;
35 _fromId = fromId;
36 _toId = toId;
37 _fromValue = fromValue;
38 _toValue = toValue;
39 }
40
41 public int getType() {
42 return _type;
43 }
44
45 public int getFromId() {
46 return _fromId;
47 }
48
49 public int getToId() {
50 return _toId;
51 }
52
53 public double getFromValue() {
54 return _fromValue;
55 }
56
57 public void setFromValue(double fromValue) {
58 _fromValue = fromValue;
59 }
60
61 public double getToValue() {
62 return _toValue;
63 }
64
65 public void setToValue(double toValue) {
66 _toValue = toValue;
67 }
68
69 private int _type;
70 private int _fromId;
71 private int _toId;
72 private double _fromValue;
73 private double _toValue;
74
75 }