001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.unitconverter.model;
016    
017    /**
018     * @author James Lefeu
019     */
020    public class Conversion {
021    
022            public Conversion(int type, int fromId, int toId,
023                                              double fromValue) {
024                    _type = type;
025                    _fromId = fromId;
026                    _toId = toId;
027                    _fromValue = fromValue;
028            }
029    
030            public Conversion(int type, int fromId, int toId,
031                                              double fromValue, double toValue) {
032                    _type = type;
033                    _fromId = fromId;
034                    _toId = toId;
035                    _fromValue = fromValue;
036                    _toValue = toValue;
037            }
038    
039            public int getType() {
040                    return _type;
041            }
042    
043            public int getFromId() {
044                    return _fromId;
045            }
046    
047            public int getToId() {
048                    return _toId;
049            }
050    
051            public double getFromValue() {
052                    return _fromValue;
053            }
054    
055            public void setFromValue(double fromValue) {
056                    _fromValue = fromValue;
057            }
058    
059            public double getToValue() {
060                    return _toValue;
061            }
062    
063            public void setToValue(double toValue) {
064                    _toValue = toValue;
065            }
066    
067            private int _type;
068            private int _fromId;
069            private int _toId;
070            private double _fromValue;
071            private double _toValue;
072    
073    }