/**
* 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.Module;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import java.io.Serializable;
import java.util.Date;
/**
* The cache model class for representing Module in entity cache.
*
* @author edik
* @see Module
* @generated
*/
public class ModuleCacheModel implements CacheModel<Module>, Serializable {
@Override
public String toString() {
StringBundler sb = new StringBundler(11);
sb.append("{moduleId=");
sb.append(moduleId);
sb.append(", lecturerUserId=");
sb.append(lecturerUserId);
sb.append(", createDate=");
sb.append(createDate);
sb.append(", moduleTitle=");
sb.append(moduleTitle);
sb.append(", additionalInfo=");
sb.append(additionalInfo);
sb.append("}");
return sb.toString();
}
public Module toEntityModel() {
ModuleImpl moduleImpl = new ModuleImpl();
moduleImpl.setModuleId(moduleId);
moduleImpl.setLecturerUserId(lecturerUserId);
if (createDate == Long.MIN_VALUE) {
moduleImpl.setCreateDate(null);
}
else {
moduleImpl.setCreateDate(new Date(createDate));
}
if (moduleTitle == null) {
moduleImpl.setModuleTitle(StringPool.BLANK);
}
else {
moduleImpl.setModuleTitle(moduleTitle);
}
if (additionalInfo == null) {
moduleImpl.setAdditionalInfo(StringPool.BLANK);
}
else {
moduleImpl.setAdditionalInfo(additionalInfo);
}
moduleImpl.resetOriginalValues();
return moduleImpl;
}
public long moduleId;
public long lecturerUserId;
public long createDate;
public String moduleTitle;
public String additionalInfo;
}