/**
* 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.PanicButton;
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 PanicButton in entity cache.
*
* @author edik
* @see PanicButton
* @generated
*/
public class PanicButtonCacheModel implements CacheModel<PanicButton>,
Serializable {
@Override
public String toString() {
StringBundler sb = new StringBundler(13);
sb.append("{panicButtonId=");
sb.append(panicButtonId);
sb.append(", userId=");
sb.append(userId);
sb.append(", createDate=");
sb.append(createDate);
sb.append(", moduleId=");
sb.append(moduleId);
sb.append(", slideId=");
sb.append(slideId);
sb.append(", reason=");
sb.append(reason);
sb.append("}");
return sb.toString();
}
public PanicButton toEntityModel() {
PanicButtonImpl panicButtonImpl = new PanicButtonImpl();
panicButtonImpl.setPanicButtonId(panicButtonId);
panicButtonImpl.setUserId(userId);
if (createDate == Long.MIN_VALUE) {
panicButtonImpl.setCreateDate(null);
}
else {
panicButtonImpl.setCreateDate(new Date(createDate));
}
panicButtonImpl.setModuleId(moduleId);
panicButtonImpl.setSlideId(slideId);
if (reason == null) {
panicButtonImpl.setReason(StringPool.BLANK);
}
else {
panicButtonImpl.setReason(reason);
}
panicButtonImpl.resetOriginalValues();
return panicButtonImpl;
}
public long panicButtonId;
public long userId;
public long createDate;
public long moduleId;
public long slideId;
public String reason;
}