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 ExpandoRowWrapper implements ExpandoRow, ModelWrapper<ExpandoRow> {
032 public ExpandoRowWrapper(ExpandoRow expandoRow) {
033 _expandoRow = expandoRow;
034 }
035
036 public Class<?> getModelClass() {
037 return ExpandoRow.class;
038 }
039
040 public String getModelClassName() {
041 return ExpandoRow.class.getName();
042 }
043
044 public Map<String, Object> getModelAttributes() {
045 Map<String, Object> attributes = new HashMap<String, Object>();
046
047 attributes.put("rowId", getRowId());
048 attributes.put("companyId", getCompanyId());
049 attributes.put("tableId", getTableId());
050 attributes.put("classPK", getClassPK());
051
052 return attributes;
053 }
054
055 public void setModelAttributes(Map<String, Object> attributes) {
056 Long rowId = (Long)attributes.get("rowId");
057
058 if (rowId != null) {
059 setRowId(rowId);
060 }
061
062 Long companyId = (Long)attributes.get("companyId");
063
064 if (companyId != null) {
065 setCompanyId(companyId);
066 }
067
068 Long tableId = (Long)attributes.get("tableId");
069
070 if (tableId != null) {
071 setTableId(tableId);
072 }
073
074 Long classPK = (Long)attributes.get("classPK");
075
076 if (classPK != null) {
077 setClassPK(classPK);
078 }
079 }
080
081
086 public long getPrimaryKey() {
087 return _expandoRow.getPrimaryKey();
088 }
089
090
095 public void setPrimaryKey(long primaryKey) {
096 _expandoRow.setPrimaryKey(primaryKey);
097 }
098
099
104 public long getRowId() {
105 return _expandoRow.getRowId();
106 }
107
108
113 public void setRowId(long rowId) {
114 _expandoRow.setRowId(rowId);
115 }
116
117
122 public long getCompanyId() {
123 return _expandoRow.getCompanyId();
124 }
125
126
131 public void setCompanyId(long companyId) {
132 _expandoRow.setCompanyId(companyId);
133 }
134
135
140 public long getTableId() {
141 return _expandoRow.getTableId();
142 }
143
144
149 public void setTableId(long tableId) {
150 _expandoRow.setTableId(tableId);
151 }
152
153
158 public long getClassPK() {
159 return _expandoRow.getClassPK();
160 }
161
162
167 public void setClassPK(long classPK) {
168 _expandoRow.setClassPK(classPK);
169 }
170
171 public boolean isNew() {
172 return _expandoRow.isNew();
173 }
174
175 public void setNew(boolean n) {
176 _expandoRow.setNew(n);
177 }
178
179 public boolean isCachedModel() {
180 return _expandoRow.isCachedModel();
181 }
182
183 public void setCachedModel(boolean cachedModel) {
184 _expandoRow.setCachedModel(cachedModel);
185 }
186
187 public boolean isEscapedModel() {
188 return _expandoRow.isEscapedModel();
189 }
190
191 public java.io.Serializable getPrimaryKeyObj() {
192 return _expandoRow.getPrimaryKeyObj();
193 }
194
195 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
196 _expandoRow.setPrimaryKeyObj(primaryKeyObj);
197 }
198
199 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
200 return _expandoRow.getExpandoBridge();
201 }
202
203 public void setExpandoBridgeAttributes(
204 com.liferay.portal.service.ServiceContext serviceContext) {
205 _expandoRow.setExpandoBridgeAttributes(serviceContext);
206 }
207
208 @Override
209 public java.lang.Object clone() {
210 return new ExpandoRowWrapper((ExpandoRow)_expandoRow.clone());
211 }
212
213 public int compareTo(
214 com.liferay.portlet.expando.model.ExpandoRow expandoRow) {
215 return _expandoRow.compareTo(expandoRow);
216 }
217
218 @Override
219 public int hashCode() {
220 return _expandoRow.hashCode();
221 }
222
223 public com.liferay.portal.model.CacheModel<com.liferay.portlet.expando.model.ExpandoRow> toCacheModel() {
224 return _expandoRow.toCacheModel();
225 }
226
227 public com.liferay.portlet.expando.model.ExpandoRow toEscapedModel() {
228 return new ExpandoRowWrapper(_expandoRow.toEscapedModel());
229 }
230
231 @Override
232 public java.lang.String toString() {
233 return _expandoRow.toString();
234 }
235
236 public java.lang.String toXmlString() {
237 return _expandoRow.toXmlString();
238 }
239
240 public void persist()
241 throws com.liferay.portal.kernel.exception.SystemException {
242 _expandoRow.persist();
243 }
244
245
248 public ExpandoRow getWrappedExpandoRow() {
249 return _expandoRow;
250 }
251
252 public ExpandoRow getWrappedModel() {
253 return _expandoRow;
254 }
255
256 public void resetOriginalValues() {
257 _expandoRow.resetOriginalValues();
258 }
259
260 private ExpandoRow _expandoRow;
261 }