001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model.impl;
016    
017    import com.liferay.portal.kernel.util.StringBundler;
018    import com.liferay.portal.kernel.util.StringPool;
019    import com.liferay.portal.model.CacheModel;
020    import com.liferay.portal.model.ClassName;
021    
022    import java.io.Serializable;
023    
024    /**
025     * The cache model class for representing ClassName in entity cache.
026     *
027     * @author Brian Wing Shun Chan
028     * @see ClassName
029     * @generated
030     */
031    public class ClassNameCacheModel implements CacheModel<ClassName>, Serializable {
032            @Override
033            public String toString() {
034                    StringBundler sb = new StringBundler(5);
035    
036                    sb.append("{classNameId=");
037                    sb.append(classNameId);
038                    sb.append(", value=");
039                    sb.append(value);
040                    sb.append("}");
041    
042                    return sb.toString();
043            }
044    
045            public ClassName toEntityModel() {
046                    ClassNameImpl classNameImpl = new ClassNameImpl();
047    
048                    classNameImpl.setClassNameId(classNameId);
049    
050                    if (value == null) {
051                            classNameImpl.setValue(StringPool.BLANK);
052                    }
053                    else {
054                            classNameImpl.setValue(value);
055                    }
056    
057                    classNameImpl.resetOriginalValues();
058    
059                    return classNameImpl;
060            }
061    
062            public long classNameId;
063            public String value;
064    }