001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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, double fromValue) {
023                    _type = type;
024                    _fromId = fromId;
025                    _toId = toId;
026                    _fromValue = fromValue;
027            }
028    
029            public Conversion(
030                    int type, int fromId, int toId, double fromValue, double toValue) {
031    
032                    _type = type;
033                    _fromId = fromId;
034                    _toId = toId;
035                    _fromValue = fromValue;
036                    _toValue = toValue;
037            }
038    
039            public int getFromId() {
040                    return _fromId;
041            }
042    
043            public double getFromValue() {
044                    return _fromValue;
045            }
046    
047            public int getToId() {
048                    return _toId;
049            }
050    
051            public double getToValue() {
052                    return _toValue;
053            }
054    
055            public int getType() {
056                    return _type;
057            }
058    
059            public void setFromValue(double fromValue) {
060                    _fromValue = fromValue;
061            }
062    
063            public void setToValue(double toValue) {
064                    _toValue = toValue;
065            }
066    
067            private int _fromId;
068            private double _fromValue;
069            private int _toId;
070            private double _toValue;
071            private int _type;
072    
073    }