001    /**
002     * Copyright (c) 2000-2012 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;
016    
017    import java.util.HashMap;
018    import java.util.Map;
019    
020    /**
021     * <p>
022     * This class is a wrapper for {@link Shard}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       Shard
027     * @generated
028     */
029    public class ShardWrapper implements Shard, ModelWrapper<Shard> {
030            public ShardWrapper(Shard shard) {
031                    _shard = shard;
032            }
033    
034            public Class<?> getModelClass() {
035                    return Shard.class;
036            }
037    
038            public String getModelClassName() {
039                    return Shard.class.getName();
040            }
041    
042            public Map<String, Object> getModelAttributes() {
043                    Map<String, Object> attributes = new HashMap<String, Object>();
044    
045                    attributes.put("shardId", getShardId());
046                    attributes.put("classNameId", getClassNameId());
047                    attributes.put("classPK", getClassPK());
048                    attributes.put("name", getName());
049    
050                    return attributes;
051            }
052    
053            public void setModelAttributes(Map<String, Object> attributes) {
054                    Long shardId = (Long)attributes.get("shardId");
055    
056                    if (shardId != null) {
057                            setShardId(shardId);
058                    }
059    
060                    Long classNameId = (Long)attributes.get("classNameId");
061    
062                    if (classNameId != null) {
063                            setClassNameId(classNameId);
064                    }
065    
066                    Long classPK = (Long)attributes.get("classPK");
067    
068                    if (classPK != null) {
069                            setClassPK(classPK);
070                    }
071    
072                    String name = (String)attributes.get("name");
073    
074                    if (name != null) {
075                            setName(name);
076                    }
077            }
078    
079            /**
080            * Returns the primary key of this shard.
081            *
082            * @return the primary key of this shard
083            */
084            public long getPrimaryKey() {
085                    return _shard.getPrimaryKey();
086            }
087    
088            /**
089            * Sets the primary key of this shard.
090            *
091            * @param primaryKey the primary key of this shard
092            */
093            public void setPrimaryKey(long primaryKey) {
094                    _shard.setPrimaryKey(primaryKey);
095            }
096    
097            /**
098            * Returns the shard ID of this shard.
099            *
100            * @return the shard ID of this shard
101            */
102            public long getShardId() {
103                    return _shard.getShardId();
104            }
105    
106            /**
107            * Sets the shard ID of this shard.
108            *
109            * @param shardId the shard ID of this shard
110            */
111            public void setShardId(long shardId) {
112                    _shard.setShardId(shardId);
113            }
114    
115            /**
116            * Returns the fully qualified class name of this shard.
117            *
118            * @return the fully qualified class name of this shard
119            */
120            public java.lang.String getClassName() {
121                    return _shard.getClassName();
122            }
123    
124            public void setClassName(java.lang.String className) {
125                    _shard.setClassName(className);
126            }
127    
128            /**
129            * Returns the class name ID of this shard.
130            *
131            * @return the class name ID of this shard
132            */
133            public long getClassNameId() {
134                    return _shard.getClassNameId();
135            }
136    
137            /**
138            * Sets the class name ID of this shard.
139            *
140            * @param classNameId the class name ID of this shard
141            */
142            public void setClassNameId(long classNameId) {
143                    _shard.setClassNameId(classNameId);
144            }
145    
146            /**
147            * Returns the class p k of this shard.
148            *
149            * @return the class p k of this shard
150            */
151            public long getClassPK() {
152                    return _shard.getClassPK();
153            }
154    
155            /**
156            * Sets the class p k of this shard.
157            *
158            * @param classPK the class p k of this shard
159            */
160            public void setClassPK(long classPK) {
161                    _shard.setClassPK(classPK);
162            }
163    
164            /**
165            * Returns the name of this shard.
166            *
167            * @return the name of this shard
168            */
169            public java.lang.String getName() {
170                    return _shard.getName();
171            }
172    
173            /**
174            * Sets the name of this shard.
175            *
176            * @param name the name of this shard
177            */
178            public void setName(java.lang.String name) {
179                    _shard.setName(name);
180            }
181    
182            public boolean isNew() {
183                    return _shard.isNew();
184            }
185    
186            public void setNew(boolean n) {
187                    _shard.setNew(n);
188            }
189    
190            public boolean isCachedModel() {
191                    return _shard.isCachedModel();
192            }
193    
194            public void setCachedModel(boolean cachedModel) {
195                    _shard.setCachedModel(cachedModel);
196            }
197    
198            public boolean isEscapedModel() {
199                    return _shard.isEscapedModel();
200            }
201    
202            public java.io.Serializable getPrimaryKeyObj() {
203                    return _shard.getPrimaryKeyObj();
204            }
205    
206            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
207                    _shard.setPrimaryKeyObj(primaryKeyObj);
208            }
209    
210            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
211                    return _shard.getExpandoBridge();
212            }
213    
214            public void setExpandoBridgeAttributes(
215                    com.liferay.portal.service.ServiceContext serviceContext) {
216                    _shard.setExpandoBridgeAttributes(serviceContext);
217            }
218    
219            @Override
220            public java.lang.Object clone() {
221                    return new ShardWrapper((Shard)_shard.clone());
222            }
223    
224            public int compareTo(com.liferay.portal.model.Shard shard) {
225                    return _shard.compareTo(shard);
226            }
227    
228            @Override
229            public int hashCode() {
230                    return _shard.hashCode();
231            }
232    
233            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Shard> toCacheModel() {
234                    return _shard.toCacheModel();
235            }
236    
237            public com.liferay.portal.model.Shard toEscapedModel() {
238                    return new ShardWrapper(_shard.toEscapedModel());
239            }
240    
241            public com.liferay.portal.model.Shard toUnescapedModel() {
242                    return new ShardWrapper(_shard.toUnescapedModel());
243            }
244    
245            @Override
246            public java.lang.String toString() {
247                    return _shard.toString();
248            }
249    
250            public java.lang.String toXmlString() {
251                    return _shard.toXmlString();
252            }
253    
254            public void persist()
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    _shard.persist();
257            }
258    
259            /**
260             * @deprecated Renamed to {@link #getWrappedModel}
261             */
262            public Shard getWrappedShard() {
263                    return _shard;
264            }
265    
266            public Shard getWrappedModel() {
267                    return _shard;
268            }
269    
270            public void resetOriginalValues() {
271                    _shard.resetOriginalValues();
272            }
273    
274            private Shard _shard;
275    }