KickJava   Java API By Example, From Geeks To Geeks.

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


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 package org.infoglue.cms.entities.content.impl.simple;
24
25 import org.infoglue.cms.entities.content.ContentCategory;
26 import org.infoglue.cms.entities.content.ContentCategoryVO;
27 import org.infoglue.cms.entities.kernel.BaseEntityVO;
28 import org.infoglue.cms.entities.management.impl.simple.CategoryImpl;
29
30 /**
31  * @author Frank Febbraro (frank@phase2technology.com)
32  */

33 public class ContentCategoryImpl implements ContentCategory
34 {
35     private ContentCategoryVO valueObject = new ContentCategoryVO();
36     private CategoryImpl category;
37     private ContentVersionImpl contentVersion;
38
39     public ContentCategoryImpl()
40     {}
41
42     public ContentCategoryImpl(Integer JavaDoc id)
43     {
44         setContentCategoryId(id);
45     }
46
47     public ContentCategoryImpl(ContentCategoryVO vo)
48     {
49         valueObject = (vo != null)? vo : new ContentCategoryVO();
50     }
51
52
53     public BaseEntityVO getVO() { return (BaseEntityVO) getValueObject(); }
54     public void setVO(BaseEntityVO vo) { setValueObject((ContentCategoryVO) vo); }
55
56     public Integer JavaDoc getId() { return getContentCategoryId(); }
57     public Object JavaDoc getIdAsObject() { return getId(); }
58
59     public ContentCategoryVO getValueObject() { return valueObject; }
60     public void setValueObject(ContentCategoryVO c) { valueObject = c; }
61
62     public Integer JavaDoc getContentCategoryId() { return valueObject.getContentCategoryId(); }
63     public void setContentCategoryId(Integer JavaDoc i) { valueObject.setContentCategoryId(i); }
64
65     public String JavaDoc getAttributeName() { return valueObject.getAttributeName(); }
66     public void setAttributeName(String JavaDoc s) { valueObject.setAttributeName(s); }
67
68     public Integer JavaDoc getContentVersionId() { return valueObject.getContentVersionId(); }
69     public void setContentVersionId(Integer JavaDoc i) { valueObject.setContentVersionId(i); }
70
71     public CategoryImpl getCategory()
72     {
73         return category;
74     }
75
76     public void setCategory(CategoryImpl c)
77     {
78         category = c;
79         valueObject.setCategory(c.getValueObject());
80     }
81
82     public ContentVersionImpl getContentVersion()
83     {
84         return contentVersion;
85     }
86     
87     public void setContentVersion(ContentVersionImpl contentVersion)
88     {
89         this.contentVersion = contentVersion;
90         valueObject.setContentVersionId(contentVersion.getContentVersionId());
91     }
92 }
93
Popular Tags