KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > entities > content > impl > simple > SmallContentImpl


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23
24 package org.infoglue.cms.entities.content.impl.simple;
25
26 import org.infoglue.cms.entities.content.ContentVO;
27 import org.infoglue.cms.entities.kernel.BaseEntityVO;
28
29 public class SmallContentImpl extends ContentImpl
30 {
31     private ContentVO valueObject = new ContentVO();
32      
33     /**
34      * @see org.infoglue.cms.entities.kernel.BaseEntity#getVO()
35      */

36     public BaseEntityVO getVO()
37     {
38         return (BaseEntityVO) getValueObject();
39     }
40
41     /**
42      * @see org.infoglue.cms.entities.kernel.BaseEntity#setVO(BaseEntityVO)
43      */

44     public void setVO(BaseEntityVO valueObject)
45     {
46         setValueObject((ContentVO) valueObject);
47     }
48  
49     /**
50      * @see org.infoglue.cms.entities.kernel.BaseEntity#getId()
51      */

52     public Integer JavaDoc getId()
53     {
54         return getContentId();
55     }
56
57     public ContentVO getValueObject()
58     {
59         return this.valueObject;
60     }
61
62         
63     public void setValueObject(ContentVO valueObject)
64     {
65         this.valueObject = valueObject;
66     }
67
68     private org.infoglue.cms.entities.management.impl.simple.ContentTypeDefinitionImpl contentTypeDefinition;
69     private org.infoglue.cms.entities.management.impl.simple.RepositoryImpl repository;
70     /*
71     private java.util.Collection children = new java.util.ArrayList();
72     private org.infoglue.cms.entities.content.impl.simple.SmallContentImpl parentContent;
73     private java.util.Collection contentVersions = new java.util.ArrayList();
74     private java.util.Collection relatedContents = new java.util.ArrayList();
75     private java.util.Collection relatedByContents = new java.util.ArrayList();
76     */

77     
78     // SS - 021007: TODO: Is this ok?
79
private Integer JavaDoc childCount;
80   
81     
82     public java.lang.Integer JavaDoc getContentId()
83     {
84         return this.valueObject.getContentId();
85     }
86             
87     public void setContentId(java.lang.Integer JavaDoc contentId)
88     {
89         this.valueObject.setContentId(contentId);
90     }
91       
92     public java.lang.String JavaDoc getName()
93     {
94         return this.valueObject.getName();
95     }
96             
97     public void setName(java.lang.String JavaDoc name)
98     {
99         this.valueObject.setName(name);
100     }
101       
102     public java.util.Date JavaDoc getPublishDateTime()
103     {
104         return this.valueObject.getPublishDateTime();
105     }
106             
107     public void setPublishDateTime(java.util.Date JavaDoc publishDateTime)
108     {
109         this.valueObject.setPublishDateTime(publishDateTime);
110     }
111       
112     public java.util.Date JavaDoc getExpireDateTime()
113     {
114         return this.valueObject.getExpireDateTime();
115     }
116             
117     public void setExpireDateTime(java.util.Date JavaDoc expireDateTime)
118     {
119         this.valueObject.setExpireDateTime(expireDateTime);
120     }
121       
122     public java.lang.Boolean JavaDoc getIsBranch()
123     {
124         return this.valueObject.getIsBranch();
125     }
126     
127     public void setIsBranch(java.lang.Boolean JavaDoc isBranch)
128     {
129         this.valueObject.setIsBranch(isBranch);
130     }
131   
132     public org.infoglue.cms.entities.management.impl.simple.ContentTypeDefinitionImpl getContentTypeDefinition()
133     {
134         return this.contentTypeDefinition;
135     }
136             
137     public void setContentTypeDefinition (org.infoglue.cms.entities.management.impl.simple.ContentTypeDefinitionImpl contentTypeDefinition)
138     {
139         this.contentTypeDefinition = contentTypeDefinition;
140     }
141       
142     /*
143     public java.util.Collection getChildren()
144     {
145         return this.children;
146     }
147             
148     public void setChildren (java.util.Collection children)
149     {
150         this.children = children;
151         if (this.getChildCount()!= null)
152         {
153             if(this.getChildCount().intValue() == 0)
154                 this.setChildCount(new Integer(children.size()) );
155         }
156         else
157             this.setChildCount(new Integer(children.size()) );
158     }
159       
160     public org.infoglue.cms.entities.content.impl.simple.SmallContentImpl getParentContent()
161     {
162         return this.parentContent;
163     }
164      
165            
166     public void setParentContent (org.infoglue.cms.entities.content.impl.simple.SmallContentImpl parentContent)
167     {
168         this.parentContent = parentContent;
169     }
170       
171     public java.util.Collection getContentVersions()
172     {
173         return this.contentVersions;
174     }
175             
176     public void setContentVersions (java.util.Collection contentVersions)
177     {
178         this.contentVersions = contentVersions;
179         if (this.getChildCount()!= null)
180         {
181             if(this.getChildCount().intValue() == 0)
182                 this.setChildCount(new Integer(contentVersions.size()) );
183         }
184         else
185             this.setChildCount(new Integer(contentVersions.size()) );
186     }
187     */

188       
189     public java.lang.String JavaDoc getCreator()
190     {
191         return this.valueObject.getCreatorName();
192     }
193             
194     public void setCreator (java.lang.String JavaDoc creator)
195     {
196         this.valueObject.setCreatorName(creator);
197     }
198       
199     public org.infoglue.cms.entities.management.impl.simple.RepositoryImpl getRepository()
200     {
201         return this.repository;
202     }
203             
204     public void setRepository (org.infoglue.cms.entities.management.impl.simple.RepositoryImpl repository)
205     {
206         this.repository = repository;
207         this.valueObject.setRepositoryId(repository.getRepositoryId());
208     }
209       
210     /*
211     public java.util.Collection getRelatedContents()
212     {
213         return this.relatedContents;
214     }
215             
216     public void setRelatedContents (java.util.Collection relatedContents)
217     {
218         this.relatedContents = relatedContents;
219     }
220       
221     public java.util.Collection getRelatedByContents()
222     {
223         return this.relatedByContents;
224     }
225             
226     public void setRelatedByContents (java.util.Collection relatedByContents)
227     {
228         this.relatedByContents = relatedByContents;
229     }
230     */

231     
232     /**
233      * Returns the childCount.
234      * @return Integer
235      */

236     public Integer JavaDoc getChildCount()
237     {
238         return this.valueObject.getChildCount();
239     }
240
241     /**
242      * Sets the childCount.
243      * @param childCount The childCount to set
244      */

245     public void setChildCount(Integer JavaDoc childCount)
246     {
247         this.valueObject.setChildCount(childCount);
248     }
249
250     public void setIsProtected(Integer JavaDoc isProtected)
251     {
252         this.valueObject.setIsProtected(isProtected);
253     }
254
255     public Integer JavaDoc getIsProtected()
256     {
257         return this.valueObject.getIsProtected();
258     }
259
260     public void setRepositoryId(Integer JavaDoc repositoryId)
261     {
262         this.valueObject.setRepositoryId(repositoryId);
263     }
264
265     public Integer JavaDoc getRepositoryId()
266     {
267         return this.valueObject.getRepositoryId();
268     }
269
270     public void setContentTypeDefinitionId(Integer JavaDoc contentTypeDefinitionId)
271     {
272         this.valueObject.setContentTypeDefinitionId(contentTypeDefinitionId);
273     }
274
275     public Integer JavaDoc getContentTypeDefinitionId()
276     {
277         return this.valueObject.getContentTypeDefinitionId();
278     }
279     
280     public void setParentContentId(Integer JavaDoc parentContentId)
281     {
282         this.valueObject.setParentContentId(parentContentId);
283     }
284
285     public Integer JavaDoc getParentContentId()
286     {
287         return this.valueObject.getParentContentId();
288     }
289 }
290
Popular Tags