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.RepositoryEntry;
021    
022    import java.io.Serializable;
023    
024    /**
025     * The cache model class for representing RepositoryEntry in entity cache.
026     *
027     * @author Brian Wing Shun Chan
028     * @see RepositoryEntry
029     * @generated
030     */
031    public class RepositoryEntryCacheModel implements CacheModel<RepositoryEntry>,
032            Serializable {
033            @Override
034            public String toString() {
035                    StringBundler sb = new StringBundler(11);
036    
037                    sb.append("{uuid=");
038                    sb.append(uuid);
039                    sb.append(", repositoryEntryId=");
040                    sb.append(repositoryEntryId);
041                    sb.append(", groupId=");
042                    sb.append(groupId);
043                    sb.append(", repositoryId=");
044                    sb.append(repositoryId);
045                    sb.append(", mappedId=");
046                    sb.append(mappedId);
047                    sb.append("}");
048    
049                    return sb.toString();
050            }
051    
052            public RepositoryEntry toEntityModel() {
053                    RepositoryEntryImpl repositoryEntryImpl = new RepositoryEntryImpl();
054    
055                    if (uuid == null) {
056                            repositoryEntryImpl.setUuid(StringPool.BLANK);
057                    }
058                    else {
059                            repositoryEntryImpl.setUuid(uuid);
060                    }
061    
062                    repositoryEntryImpl.setRepositoryEntryId(repositoryEntryId);
063                    repositoryEntryImpl.setGroupId(groupId);
064                    repositoryEntryImpl.setRepositoryId(repositoryId);
065    
066                    if (mappedId == null) {
067                            repositoryEntryImpl.setMappedId(StringPool.BLANK);
068                    }
069                    else {
070                            repositoryEntryImpl.setMappedId(mappedId);
071                    }
072    
073                    repositoryEntryImpl.resetOriginalValues();
074    
075                    return repositoryEntryImpl;
076            }
077    
078            public String uuid;
079            public long repositoryEntryId;
080            public long groupId;
081            public long repositoryId;
082            public String mappedId;
083    }