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.model.BaseModel<?> baseModel) {
231 _expandoRow.setExpandoBridgeAttributes(baseModel);
232 }
233
234 public void setExpandoBridgeAttributes(
235 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
236 _expandoRow.setExpandoBridgeAttributes(expandoBridge);
237 }
238
239 public void setExpandoBridgeAttributes(
240 com.liferay.portal.service.ServiceContext serviceContext) {
241 _expandoRow.setExpandoBridgeAttributes(serviceContext);
242 }
243
244 @Override
245 public java.lang.Object clone() {
246 return new ExpandoRowWrapper((ExpandoRow)_expandoRow.clone());
247 }
248
249 public int compareTo(
250 com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
251 return _expandoRow.compareTo(expandoRow);
252 }
253
254 @Override
255 public int hashCode() {
256 return _expandoRow.hashCode();
257 }
258
259 public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoRow> toCacheModel() {
260 return _expandoRow.toCacheModel();
261 }
262
263 public com.liferay.portlet.expando.model.ExpandoRow toEscapedModel() {
264 return new ExpandoRowWrapper(_expandoRow.toEscapedModel());
265 }
266
267 public com.liferay.portlet.expando.model.ExpandoRow toUnescapedModel() {
268 return new ExpandoRowWrapper(_expandoRow.toUnescapedModel());
269 }
270
271 @Override
272 public java.lang.String toString() {
273 return _expandoRow.toString();
274 }
275
276 public java.lang.String toXmlString() {
277 return _expandoRow.toXmlString();
278 }
279
280 public void persist()
281 throws com.liferay.portal.kernel.exception.SystemException {
282 _expandoRow.persist();
283 }
284
285
288 public ExpandoRow getWrappedExpandoRow() {
289 return _expandoRow;
290 }
291
292 public ExpandoRow getWrappedModel() {
293 return _expandoRow;
294 }
295
296 public void resetOriginalValues() {
297 _expandoRow.resetOriginalValues();
298 }
299
300 private ExpandoRow _expandoRow;
301 }