/** * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.ese.ils.beta.model.impl; import com.ese.ils.beta.model.Question; import com.liferay.portal.kernel.util.StringBundler; import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.model.CacheModel; import java.io.Serializable; /** * The cache model class for representing Question in entity cache. * * @author edik * @see Question * @generated */ public class QuestionCacheModel implements CacheModel<Question>, Serializable { @Override public String toString() { StringBundler sb = new StringBundler(13); sb.append("{questionId="); sb.append(questionId); sb.append(", userId="); sb.append(userId); sb.append(", slideId="); sb.append(slideId); sb.append(", moduleId="); sb.append(moduleId); sb.append(", answer="); sb.append(answer); sb.append(", questionText="); sb.append(questionText); sb.append("}"); return sb.toString(); } public Question toEntityModel() { QuestionImpl questionImpl = new QuestionImpl(); questionImpl.setQuestionId(questionId); questionImpl.setUserId(userId); questionImpl.setSlideId(slideId); questionImpl.setModuleId(moduleId); if (answer == null) { questionImpl.setAnswer(StringPool.BLANK); } else { questionImpl.setAnswer(answer); } if (questionText == null) { questionImpl.setQuestionText(StringPool.BLANK); } else { questionImpl.setQuestionText(questionText); } questionImpl.resetOriginalValues(); return questionImpl; } public long questionId; public long userId; public long slideId; public long moduleId; public String answer; public String questionText; }