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