1 23 24 package org.infoglue.cms.entities.content.impl.simple; 25 26 import org.infoglue.cms.entities.content.Content; 27 import org.infoglue.cms.entities.content.ContentVO; 28 import org.infoglue.cms.entities.kernel.BaseEntityVO; 29 30 public class ContentImpl implements Content 31 { 32 private ContentVO valueObject = new ContentVO(); 33 34 37 public BaseEntityVO getVO() 38 { 39 return (BaseEntityVO) getValueObject(); 40 } 41 42 45 public void setVO(BaseEntityVO valueObject) 46 { 47 setValueObject((ContentVO) valueObject); 48 } 49 50 53 public Integer getId() 54 { 55 return getContentId(); 56 } 57 58 public Object getIdAsObject() 59 { 60 return getId(); 61 } 62 63 public ContentVO getValueObject() 64 { 65 return this.valueObject; 66 } 67 68 69 public void setValueObject(ContentVO valueObject) 70 { 71 this.valueObject = valueObject; 72 } 73 74 private org.infoglue.cms.entities.management.impl.simple.ContentTypeDefinitionImpl contentTypeDefinition; 75 private java.util.Collection children = new java.util.ArrayList (); 76 private org.infoglue.cms.entities.content.impl.simple.ContentImpl parentContent; 77 private java.util.Collection contentVersions = new java.util.ArrayList (); 78 private org.infoglue.cms.entities.management.impl.simple.RepositoryImpl repository; 79 private java.util.Collection relatedContents = new java.util.ArrayList (); 80 private java.util.Collection relatedByContents = new java.util.ArrayList (); 81 82 private Integer childCount; 84 85 86 public java.lang.Integer getContentId() 87 { 88 return this.valueObject.getContentId(); 89 } 90 91 public void setContentId(java.lang.Integer contentId) 92 { 93 this.valueObject.setContentId(contentId); 94 } 95 96 public java.lang.String getName() 97 { 98 return this.valueObject.getName(); 99 } 100 101 public void setName(java.lang.String name) 102 { 103 this.valueObject.setName(name); 104 } 105 106 public java.util.Date getPublishDateTime() 107 { 108 return this.valueObject.getPublishDateTime(); 109 } 110 111 public void setPublishDateTime(java.util.Date publishDateTime) 112 { 113 this.valueObject.setPublishDateTime(publishDateTime); 114 } 115 116 public java.util.Date getExpireDateTime() 117 { 118 return this.valueObject.getExpireDateTime(); 119 } 120 121 public void setExpireDateTime(java.util.Date expireDateTime) 122 { 123 this.valueObject.setExpireDateTime(expireDateTime); 124 } 125 126 public java.lang.Boolean getIsBranch() 127 { 128 return this.valueObject.getIsBranch(); 129 } 130 131 public void setIsBranch(java.lang.Boolean isBranch) 132 { 133 this.valueObject.setIsBranch(isBranch); 134 } 135 136 137 public org.infoglue.cms.entities.management.impl.simple.ContentTypeDefinitionImpl getContentTypeDefinition() 138 { 139 return this.contentTypeDefinition; 140 } 141 142 public void setContentTypeDefinition (org.infoglue.cms.entities.management.impl.simple.ContentTypeDefinitionImpl contentTypeDefinition) 143 { 144 this.contentTypeDefinition = contentTypeDefinition; 145 if(contentTypeDefinition != null) 146 this.valueObject.setContentTypeDefinitionId(contentTypeDefinition.getId()); 147 } 148 149 public Integer getContentTypeDefinitionId() 150 { 151 if(this.contentTypeDefinition != null) 152 return this.contentTypeDefinition.getId(); 153 else 154 return null; 155 } 156 157 public java.util.Collection getChildren() 158 { 159 return this.children; 160 } 161 162 public void setChildren (java.util.Collection children) 163 { 164 this.children = children; 165 if (this.getChildCount()!= null) 166 { 167 if(this.getChildCount().intValue() == 0) 168 this.setChildCount(new Integer (children.size()) ); 169 } 170 else 171 this.setChildCount(new Integer (children.size()) ); 172 } 173 174 public org.infoglue.cms.entities.content.impl.simple.ContentImpl getParentContent() 175 { 176 return this.parentContent; 177 } 178 179 180 public void setParentContent (org.infoglue.cms.entities.content.impl.simple.ContentImpl parentContent) 181 { 182 this.parentContent = parentContent; 183 184 if(parentContent != null) 185 this.valueObject.setParentContentId(parentContent.getId()); 186 } 187 188 public java.util.Collection getContentVersions() 189 { 190 return this.contentVersions; 191 } 192 193 public void setContentVersions (java.util.Collection contentVersions) 194 { 195 this.contentVersions = contentVersions; 196 if (this.getChildCount()!= null) 197 { 198 if(this.getChildCount().intValue() == 0) 199 this.setChildCount(new Integer (contentVersions.size()) ); 200 } 201 else 202 this.setChildCount(new Integer (contentVersions.size()) ); 203 } 204 205 public java.lang.String getCreator() 206 { 207 return this.valueObject.getCreatorName(); 208 } 209 210 public void setCreator (java.lang.String creator) 211 { 212 this.valueObject.setCreatorName(creator); 213 } 214 215 public org.infoglue.cms.entities.management.impl.simple.RepositoryImpl getRepository() 216 { 217 return this.repository; 218 } 219 220 public void setRepository (org.infoglue.cms.entities.management.impl.simple.RepositoryImpl repository) 221 { 222 this.repository = repository; 223 this.valueObject.setRepositoryId(repository.getRepositoryId()); 224 } 225 226 public java.util.Collection getRelatedContents() 227 { 228 return this.relatedContents; 229 } 230 231 public void setRelatedContents (java.util.Collection relatedContents) 232 { 233 this.relatedContents = relatedContents; 234 } 235 236 public java.util.Collection getRelatedByContents() 237 { 238 return this.relatedByContents; 239 } 240 241 public void setRelatedByContents (java.util.Collection relatedByContents) 242 { 243 this.relatedByContents = relatedByContents; 244 } 245 249 public Integer getChildCount() 250 { 251 return this.valueObject.getChildCount(); 252 } 253 254 258 public void setChildCount(Integer childCount) 259 { 260 this.valueObject.setChildCount(childCount); 261 } 262 263 public void setIsProtected(Integer isProtected) 264 { 265 this.valueObject.setIsProtected(isProtected); 266 } 267 268 public Integer getIsProtected() 269 { 270 return this.valueObject.getIsProtected(); 271 } 272 273 274 280 } 281 | Popular Tags |