001
014
015 package com.liferay.portlet.expando.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class ExpandoTableWrapper implements ExpandoTable,
032 ModelWrapper<ExpandoTable> {
033 public ExpandoTableWrapper(ExpandoTable expandoTable) {
034 _expandoTable = expandoTable;
035 }
036
037 public Class<?> getModelClass() {
038 return ExpandoTable.class;
039 }
040
041 public String getModelClassName() {
042 return ExpandoTable.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("tableId", getTableId());
049 attributes.put("companyId", getCompanyId());
050 attributes.put("classNameId", getClassNameId());
051 attributes.put("name", getName());
052
053 return attributes;
054 }
055
056 public void setModelAttributes(Map<String, Object> attributes) {
057 Long tableId = (Long)attributes.get("tableId");
058
059 if (tableId != null) {
060 setTableId(tableId);
061 }
062
063 Long companyId = (Long)attributes.get("companyId");
064
065 if (companyId != null) {
066 setCompanyId(companyId);
067 }
068
069 Long classNameId = (Long)attributes.get("classNameId");
070
071 if (classNameId != null) {
072 setClassNameId(classNameId);
073 }
074
075 String name = (String)attributes.get("name");
076
077 if (name != null) {
078 setName(name);
079 }
080 }
081
082
087 public long getPrimaryKey() {
088 return _expandoTable.getPrimaryKey();
089 }
090
091
096 public void setPrimaryKey(long primaryKey) {
097 _expandoTable.setPrimaryKey(primaryKey);
098 }
099
100
105 public long getTableId() {
106 return _expandoTable.getTableId();
107 }
108
109
114 public void setTableId(long tableId) {
115 _expandoTable.setTableId(tableId);
116 }
117
118
123 public long getCompanyId() {
124 return _expandoTable.getCompanyId();
125 }
126
127
132 public void setCompanyId(long companyId) {
133 _expandoTable.setCompanyId(companyId);
134 }
135
136
141 public java.lang.String getClassName() {
142 return _expandoTable.getClassName();
143 }
144
145 public void setClassName(java.lang.String className) {
146 _expandoTable.setClassName(className);
147 }
148
149
154 public long getClassNameId() {
155 return _expandoTable.getClassNameId();
156 }
157
158
163 public void setClassNameId(long classNameId) {
164 _expandoTable.setClassNameId(classNameId);
165 }
166
167
172 public java.lang.String getName() {
173 return _expandoTable.getName();
174 }
175
176
181 public void setName(java.lang.String name) {
182 _expandoTable.setName(name);
183 }
184
185 public boolean isNew() {
186 return _expandoTable.isNew();
187 }
188
189 public void setNew(boolean n) {
190 _expandoTable.setNew(n);
191 }
192
193 public boolean isCachedModel() {
194 return _expandoTable.isCachedModel();
195 }
196
197 public void setCachedModel(boolean cachedModel) {
198 _expandoTable.setCachedModel(cachedModel);
199 }
200
201 public boolean isEscapedModel() {
202 return _expandoTable.isEscapedModel();
203 }
204
205 public java.io.Serializable getPrimaryKeyObj() {
206 return _expandoTable.getPrimaryKeyObj();
207 }
208
209 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
210 _expandoTable.setPrimaryKeyObj(primaryKeyObj);
211 }
212
213 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
214 return _expandoTable.getExpandoBridge();
215 }
216
217 public void setExpandoBridgeAttributes(
218 com.liferay.portal.model.BaseModel<?> baseModel) {
219 _expandoTable.setExpandoBridgeAttributes(baseModel);
220 }
221
222 public void setExpandoBridgeAttributes(
223 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
224 _expandoTable.setExpandoBridgeAttributes(expandoBridge);
225 }
226
227 public void setExpandoBridgeAttributes(
228 com.liferay.portal.service.ServiceContext serviceContext) {
229 _expandoTable.setExpandoBridgeAttributes(serviceContext);
230 }
231
232 @Override
233 public java.lang.Object clone() {
234 return new ExpandoTableWrapper((ExpandoTable)_expandoTable.clone());
235 }
236
237 public int compareTo(
238 com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
239 return _expandoTable.compareTo(expandoTable);
240 }
241
242 @Override
243 public int hashCode() {
244 return _expandoTable.hashCode();
245 }
246
247 public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoTable> toCacheModel() {
248 return _expandoTable.toCacheModel();
249 }
250
251 public com.liferay.portlet.expando.model.ExpandoTable toEscapedModel() {
252 return new ExpandoTableWrapper(_expandoTable.toEscapedModel());
253 }
254
255 public com.liferay.portlet.expando.model.ExpandoTable toUnescapedModel() {
256 return new ExpandoTableWrapper(_expandoTable.toUnescapedModel());
257 }
258
259 @Override
260 public java.lang.String toString() {
261 return _expandoTable.toString();
262 }
263
264 public java.lang.String toXmlString() {
265 return _expandoTable.toXmlString();
266 }
267
268 public void persist()
269 throws com.liferay.portal.kernel.exception.SystemException {
270 _expandoTable.persist();
271 }
272
273 public boolean isDefaultTable() {
274 return _expandoTable.isDefaultTable();
275 }
276
277
280 public ExpandoTable getWrappedExpandoTable() {
281 return _expandoTable;
282 }
283
284 public ExpandoTable getWrappedModel() {
285 return _expandoTable;
286 }
287
288 public void resetOriginalValues() {
289 _expandoTable.resetOriginalValues();
290 }
291
292 private ExpandoTable _expandoTable;
293 }