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 ListType}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       ListType
027     * @generated
028     */
029    public class ListTypeWrapper implements ListType, ModelWrapper<ListType> {
030            public ListTypeWrapper(ListType listType) {
031                    _listType = listType;
032            }
033    
034            public Class<?> getModelClass() {
035                    return ListType.class;
036            }
037    
038            public String getModelClassName() {
039                    return ListType.class.getName();
040            }
041    
042            public Map<String, Object> getModelAttributes() {
043                    Map<String, Object> attributes = new HashMap<String, Object>();
044    
045                    attributes.put("listTypeId", getListTypeId());
046                    attributes.put("name", getName());
047                    attributes.put("type", getType());
048    
049                    return attributes;
050            }
051    
052            public void setModelAttributes(Map<String, Object> attributes) {
053                    Integer listTypeId = (Integer)attributes.get("listTypeId");
054    
055                    if (listTypeId != null) {
056                            setListTypeId(listTypeId);
057                    }
058    
059                    String name = (String)attributes.get("name");
060    
061                    if (name != null) {
062                            setName(name);
063                    }
064    
065                    String type = (String)attributes.get("type");
066    
067                    if (type != null) {
068                            setType(type);
069                    }
070            }
071    
072            /**
073            * Returns the primary key of this list type.
074            *
075            * @return the primary key of this list type
076            */
077            public int getPrimaryKey() {
078                    return _listType.getPrimaryKey();
079            }
080    
081            /**
082            * Sets the primary key of this list type.
083            *
084            * @param primaryKey the primary key of this list type
085            */
086            public void setPrimaryKey(int primaryKey) {
087                    _listType.setPrimaryKey(primaryKey);
088            }
089    
090            /**
091            * Returns the list type ID of this list type.
092            *
093            * @return the list type ID of this list type
094            */
095            public int getListTypeId() {
096                    return _listType.getListTypeId();
097            }
098    
099            /**
100            * Sets the list type ID of this list type.
101            *
102            * @param listTypeId the list type ID of this list type
103            */
104            public void setListTypeId(int listTypeId) {
105                    _listType.setListTypeId(listTypeId);
106            }
107    
108            /**
109            * Returns the name of this list type.
110            *
111            * @return the name of this list type
112            */
113            public java.lang.String getName() {
114                    return _listType.getName();
115            }
116    
117            /**
118            * Sets the name of this list type.
119            *
120            * @param name the name of this list type
121            */
122            public void setName(java.lang.String name) {
123                    _listType.setName(name);
124            }
125    
126            /**
127            * Returns the type of this list type.
128            *
129            * @return the type of this list type
130            */
131            public java.lang.String getType() {
132                    return _listType.getType();
133            }
134    
135            /**
136            * Sets the type of this list type.
137            *
138            * @param type the type of this list type
139            */
140            public void setType(java.lang.String type) {
141                    _listType.setType(type);
142            }
143    
144            public boolean isNew() {
145                    return _listType.isNew();
146            }
147    
148            public void setNew(boolean n) {
149                    _listType.setNew(n);
150            }
151    
152            public boolean isCachedModel() {
153                    return _listType.isCachedModel();
154            }
155    
156            public void setCachedModel(boolean cachedModel) {
157                    _listType.setCachedModel(cachedModel);
158            }
159    
160            public boolean isEscapedModel() {
161                    return _listType.isEscapedModel();
162            }
163    
164            public java.io.Serializable getPrimaryKeyObj() {
165                    return _listType.getPrimaryKeyObj();
166            }
167    
168            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
169                    _listType.setPrimaryKeyObj(primaryKeyObj);
170            }
171    
172            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
173                    return _listType.getExpandoBridge();
174            }
175    
176            public void setExpandoBridgeAttributes(
177                    com.liferay.portal.service.ServiceContext serviceContext) {
178                    _listType.setExpandoBridgeAttributes(serviceContext);
179            }
180    
181            @Override
182            public java.lang.Object clone() {
183                    return new ListTypeWrapper((ListType)_listType.clone());
184            }
185    
186            public int compareTo(com.liferay.portal.model.ListType listType) {
187                    return _listType.compareTo(listType);
188            }
189    
190            @Override
191            public int hashCode() {
192                    return _listType.hashCode();
193            }
194    
195            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ListType> toCacheModel() {
196                    return _listType.toCacheModel();
197            }
198    
199            public com.liferay.portal.model.ListType toEscapedModel() {
200                    return new ListTypeWrapper(_listType.toEscapedModel());
201            }
202    
203            @Override
204            public java.lang.String toString() {
205                    return _listType.toString();
206            }
207    
208            public java.lang.String toXmlString() {
209                    return _listType.toXmlString();
210            }
211    
212            /**
213             * @deprecated Renamed to {@link #getWrappedModel}
214             */
215            public ListType getWrappedListType() {
216                    return _listType;
217            }
218    
219            public ListType getWrappedModel() {
220                    return _listType;
221            }
222    
223            public void resetOriginalValues() {
224                    _listType.resetOriginalValues();
225            }
226    
227            private ListType _listType;
228    }