001
014
015 package com.liferay.portlet.translator.model;
016
017 import com.liferay.portal.kernel.util.StringPool;
018
019 import java.io.Serializable;
020 import java.io.UnsupportedEncodingException;
021
022
025 public class Translation implements Serializable {
026
027 public Translation(String translationId, String fromText) {
028 _translationId = translationId;
029 setFromText(fromText);
030 }
031
032 public Translation(String translationId, String fromText, String toText) {
033 _translationId = translationId;
034 setFromText(fromText);
035 setToText(toText);
036 }
037
038 public String getTranslationId() {
039 return _translationId;
040 }
041
042 public String getFromText() {
043 return _fromText;
044 }
045
046 public void setFromText(String fromText) {
047 try {
048 _fromText = new String(fromText.getBytes(), StringPool.UTF8);
049 }
050 catch (UnsupportedEncodingException uee) {
051 }
052 }
053
054 public String getToText() {
055 return _toText;
056 }
057
058 public void setToText(String toText) {
059 try {
060 _toText = new String(toText.getBytes(), StringPool.UTF8);
061 }
062 catch (UnsupportedEncodingException uee) {
063 }
064 }
065
066 private String _translationId;
067 private String _fromText;
068 private String _toText;
069
070 }