001
014
015 package com.liferay.portlet.expando.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class ExpandoRowWrapper implements ExpandoRow, ModelWrapper<ExpandoRow> {
033 public ExpandoRowWrapper(ExpandoRow expandoRow) {
034 _expandoRow = expandoRow;
035 }
036
037 public Class<?> getModelClass() {
038 return ExpandoRow.class;
039 }
040
041 public String getModelClassName() {
042 return ExpandoRow.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("rowId", getRowId());
049 attributes.put("companyId", getCompanyId());
050 attributes.put("modifiedDate", getModifiedDate());
051 attributes.put("tableId", getTableId());
052 attributes.put("classPK", getClassPK());
053
054 return attributes;
055 }
056
057 public void setModelAttributes(Map<String, Object> attributes) {
058 Long rowId = (Long)attributes.get("rowId");
059
060 if (rowId != null) {
061 setRowId(rowId);
062 }
063
064 Long companyId = (Long)attributes.get("companyId");
065
066 if (companyId != null) {
067 setCompanyId(companyId);
068 }
069
070 Date modifiedDate = (Date)attributes.get("modifiedDate");
071
072 if (modifiedDate != null) {
073 setModifiedDate(modifiedDate);
074 }
075
076 Long tableId = (Long)attributes.get("tableId");
077
078 if (tableId != null) {
079 setTableId(tableId);
080 }
081
082 Long classPK = (Long)attributes.get("classPK");
083
084 if (classPK != null) {
085 setClassPK(classPK);
086 }
087 }
088
089
094 public long getPrimaryKey() {
095 return _expandoRow.getPrimaryKey();
096 }
097
098
103 public void setPrimaryKey(long primaryKey) {
104 _expandoRow.setPrimaryKey(primaryKey);
105 }
106
107
112 public long getRowId() {
113 return _expandoRow.getRowId();
114 }
115
116
121 public void setRowId(long rowId) {
122 _expandoRow.setRowId(rowId);
123 }
124
125
130 public long getCompanyId() {
131 return _expandoRow.getCompanyId();
132 }
133
134
139 public void setCompanyId(long companyId) {
140 _expandoRow.setCompanyId(companyId);
141 }
142
143
148 public java.util.Date getModifiedDate() {
149 return _expandoRow.getModifiedDate();
150 }
151
152
157 public void setModifiedDate(java.util.Date modifiedDate) {
158 _expandoRow.setModifiedDate(modifiedDate);
159 }
160
161
166 public long getTableId() {
167 return _expandoRow.getTableId();
168 }
169
170
175 public void setTableId(long tableId) {
176 _expandoRow.setTableId(tableId);
177 }
178
179
184 public long getClassPK() {
185 return _expandoRow.getClassPK();
186 }
187
188
193 public void setClassPK(long classPK) {
194 _expandoRow.setClassPK(classPK);
195 }
196
197 public boolean isNew() {
198 return _expandoRow.isNew();
199 }
200
201 public void setNew(boolean n) {
202 _expandoRow.setNew(n);
203 }
204
205 public boolean isCachedModel() {
206 return _expandoRow.isCachedModel();
207 }
208
209 public void setCachedModel(boolean cachedModel) {
210 _expandoRow.setCachedModel(cachedModel);
211 }
212
213 public boolean isEscapedModel() {
214 return _expandoRow.isEscapedModel();
215 }
216
217 public java.io.Serializable getPrimaryKeyObj() {
218 return _expandoRow.getPrimaryKeyObj();
219 }
220
221 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
222 _expandoRow.setPrimaryKeyObj(primaryKeyObj);
223 }
224
225 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
226 return _expandoRow.getExpandoBridge();
227 }
228
229 public void setExpandoBridgeAttributes(
230 com.liferay.portal.service.ServiceContext serviceContext) {
231 _expandoRow.setExpandoBridgeAttributes(serviceContext);
232 }
233
234 @Override
235 public java.lang.Object clone() {
236 return new ExpandoRowWrapper((ExpandoRow)_expandoRow.clone());
237 }
238
239 public int compareTo(
240 com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
241 return _expandoRow.compareTo(expandoRow);
242 }
243
244 @Override
245 public int hashCode() {
246 return _expandoRow.hashCode();
247 }
248
249 public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoRow> toCacheModel() {
250 return _expandoRow.toCacheModel();
251 }
252
253 public com.liferay.portlet.expando.model.ExpandoRow toEscapedModel() {
254 return new ExpandoRowWrapper(_expandoRow.toEscapedModel());
255 }
256
257 public com.liferay.portlet.expando.model.ExpandoRow toUnescapedModel() {
258 return new ExpandoRowWrapper(_expandoRow.toUnescapedModel());
259 }
260
261 @Override
262 public java.lang.String toString() {
263 return _expandoRow.toString();
264 }
265
266 public java.lang.String toXmlString() {
267 return _expandoRow.toXmlString();
268 }
269
270 public void persist()
271 throws com.liferay.portal.kernel.exception.SystemException {
272 _expandoRow.persist();
273 }
274
275
278 public ExpandoRow getWrappedExpandoRow() {
279 return _expandoRow;
280 }
281
282 public ExpandoRow getWrappedModel() {
283 return _expandoRow;
284 }
285
286 public void resetOriginalValues() {
287 _expandoRow.resetOriginalValues();
288 }
289
290 private ExpandoRow _expandoRow;
291 }