001
014
015 package com.liferay.portlet.expando.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class ExpandoTableWrapper implements ExpandoTable,
036 ModelWrapper<ExpandoTable> {
037 public ExpandoTableWrapper(ExpandoTable expandoTable) {
038 _expandoTable = expandoTable;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return ExpandoTable.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return ExpandoTable.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("tableId", getTableId());
056 attributes.put("companyId", getCompanyId());
057 attributes.put("classNameId", getClassNameId());
058 attributes.put("name", getName());
059
060 return attributes;
061 }
062
063 @Override
064 public void setModelAttributes(Map<String, Object> attributes) {
065 Long tableId = (Long)attributes.get("tableId");
066
067 if (tableId != null) {
068 setTableId(tableId);
069 }
070
071 Long companyId = (Long)attributes.get("companyId");
072
073 if (companyId != null) {
074 setCompanyId(companyId);
075 }
076
077 Long classNameId = (Long)attributes.get("classNameId");
078
079 if (classNameId != null) {
080 setClassNameId(classNameId);
081 }
082
083 String name = (String)attributes.get("name");
084
085 if (name != null) {
086 setName(name);
087 }
088 }
089
090
095 @Override
096 public long getPrimaryKey() {
097 return _expandoTable.getPrimaryKey();
098 }
099
100
105 @Override
106 public void setPrimaryKey(long primaryKey) {
107 _expandoTable.setPrimaryKey(primaryKey);
108 }
109
110
115 @Override
116 public long getTableId() {
117 return _expandoTable.getTableId();
118 }
119
120
125 @Override
126 public void setTableId(long tableId) {
127 _expandoTable.setTableId(tableId);
128 }
129
130
135 @Override
136 public long getCompanyId() {
137 return _expandoTable.getCompanyId();
138 }
139
140
145 @Override
146 public void setCompanyId(long companyId) {
147 _expandoTable.setCompanyId(companyId);
148 }
149
150
155 @Override
156 public java.lang.String getClassName() {
157 return _expandoTable.getClassName();
158 }
159
160 @Override
161 public void setClassName(java.lang.String className) {
162 _expandoTable.setClassName(className);
163 }
164
165
170 @Override
171 public long getClassNameId() {
172 return _expandoTable.getClassNameId();
173 }
174
175
180 @Override
181 public void setClassNameId(long classNameId) {
182 _expandoTable.setClassNameId(classNameId);
183 }
184
185
190 @Override
191 public java.lang.String getName() {
192 return _expandoTable.getName();
193 }
194
195
200 @Override
201 public void setName(java.lang.String name) {
202 _expandoTable.setName(name);
203 }
204
205 @Override
206 public boolean isNew() {
207 return _expandoTable.isNew();
208 }
209
210 @Override
211 public void setNew(boolean n) {
212 _expandoTable.setNew(n);
213 }
214
215 @Override
216 public boolean isCachedModel() {
217 return _expandoTable.isCachedModel();
218 }
219
220 @Override
221 public void setCachedModel(boolean cachedModel) {
222 _expandoTable.setCachedModel(cachedModel);
223 }
224
225 @Override
226 public boolean isEscapedModel() {
227 return _expandoTable.isEscapedModel();
228 }
229
230 @Override
231 public java.io.Serializable getPrimaryKeyObj() {
232 return _expandoTable.getPrimaryKeyObj();
233 }
234
235 @Override
236 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
237 _expandoTable.setPrimaryKeyObj(primaryKeyObj);
238 }
239
240 @Override
241 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
242 return _expandoTable.getExpandoBridge();
243 }
244
245 @Override
246 public void setExpandoBridgeAttributes(
247 com.liferay.portal.model.BaseModel<?> baseModel) {
248 _expandoTable.setExpandoBridgeAttributes(baseModel);
249 }
250
251 @Override
252 public void setExpandoBridgeAttributes(
253 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
254 _expandoTable.setExpandoBridgeAttributes(expandoBridge);
255 }
256
257 @Override
258 public void setExpandoBridgeAttributes(
259 com.liferay.portal.service.ServiceContext serviceContext) {
260 _expandoTable.setExpandoBridgeAttributes(serviceContext);
261 }
262
263 @Override
264 public java.lang.Object clone() {
265 return new ExpandoTableWrapper((ExpandoTable)_expandoTable.clone());
266 }
267
268 @Override
269 public int compareTo(
270 com.liferay.portlet.expando.model.ExpandoTable expandoTable) {
271 return _expandoTable.compareTo(expandoTable);
272 }
273
274 @Override
275 public int hashCode() {
276 return _expandoTable.hashCode();
277 }
278
279 @Override
280 public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoTable> toCacheModel() {
281 return _expandoTable.toCacheModel();
282 }
283
284 @Override
285 public com.liferay.portlet.expando.model.ExpandoTable toEscapedModel() {
286 return new ExpandoTableWrapper(_expandoTable.toEscapedModel());
287 }
288
289 @Override
290 public com.liferay.portlet.expando.model.ExpandoTable toUnescapedModel() {
291 return new ExpandoTableWrapper(_expandoTable.toUnescapedModel());
292 }
293
294 @Override
295 public java.lang.String toString() {
296 return _expandoTable.toString();
297 }
298
299 @Override
300 public java.lang.String toXmlString() {
301 return _expandoTable.toXmlString();
302 }
303
304 @Override
305 public void persist()
306 throws com.liferay.portal.kernel.exception.SystemException {
307 _expandoTable.persist();
308 }
309
310 @Override
311 public boolean isDefaultTable() {
312 return _expandoTable.isDefaultTable();
313 }
314
315 @Override
316 public boolean equals(Object obj) {
317 if (this == obj) {
318 return true;
319 }
320
321 if (!(obj instanceof ExpandoTableWrapper)) {
322 return false;
323 }
324
325 ExpandoTableWrapper expandoTableWrapper = (ExpandoTableWrapper)obj;
326
327 if (Validator.equals(_expandoTable, expandoTableWrapper._expandoTable)) {
328 return true;
329 }
330
331 return false;
332 }
333
334
337 public ExpandoTable getWrappedExpandoTable() {
338 return _expandoTable;
339 }
340
341 @Override
342 public ExpandoTable getWrappedModel() {
343 return _expandoTable;
344 }
345
346 @Override
347 public void resetOriginalValues() {
348 _expandoTable.resetOriginalValues();
349 }
350
351 private ExpandoTable _expandoTable;
352 }