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 getFromText() {
039 return _fromText;
040 }
041
042 public String getToText() {
043 return _toText;
044 }
045
046 public String getTranslationId() {
047 return _translationId;
048 }
049
050 public void setFromText(String fromText) {
051 try {
052 _fromText = new String(fromText.getBytes(), StringPool.UTF8);
053 }
054 catch (UnsupportedEncodingException uee) {
055 }
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 _fromText;
067 private String _toText;
068 private String _translationId;
069
070 }