KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > entities > management > impl > simple > CategoryImpl


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  * $Id: CategoryImpl.java,v 1.2 2005/01/04 15:29:26 mattias Exp $
24  */

25
26 package org.infoglue.cms.entities.management.impl.simple;
27
28 import org.infoglue.cms.entities.kernel.BaseEntityVO;
29 import org.infoglue.cms.entities.management.Category;
30 import org.infoglue.cms.entities.management.CategoryVO;
31
32 public class CategoryImpl implements Category
33 {
34     private CategoryVO valueObject = new CategoryVO();
35
36     public CategoryImpl()
37     {}
38
39     public CategoryImpl(Integer JavaDoc id)
40     {
41         setCategoryId(id);
42     }
43
44     public CategoryImpl(CategoryVO vo)
45     {
46         valueObject = (vo != null)? vo : new CategoryVO();
47     }
48
49     public Integer JavaDoc getId() { return valueObject.getId(); }
50     public Object JavaDoc getIdAsObject() { return getId(); }
51
52     public Integer JavaDoc getCategoryId() { return valueObject.getCategoryId(); }
53     public void setCategoryId(Integer JavaDoc i){ valueObject.setCategoryId(i); }
54
55     public String JavaDoc getName() { return valueObject.getName(); }
56     public void setName(String JavaDoc s) { valueObject.setName(s); }
57
58     public String JavaDoc getDescription() { return valueObject.getDescription(); }
59     public void setDescription(String JavaDoc s){ valueObject.setDescription(s); }
60
61     public boolean isActive() { return valueObject.isActive(); }
62     public void setActive(boolean b) { valueObject.setActive(b); }
63
64     public Integer JavaDoc getParentId() { return valueObject.getParentId(); }
65     public void setParentId(Integer JavaDoc i) { valueObject.setParentId(i); }
66
67     public CategoryVO getValueObject() { return valueObject; }
68     public void setValueObject(CategoryVO vo) { valueObject = vo; }
69
70     public BaseEntityVO getVO() { return (BaseEntityVO) getValueObject(); }
71     public void setVO(BaseEntityVO vo) { setValueObject((CategoryVO) vo); }
72
73     public String JavaDoc toString()
74     {
75         return valueObject.toString();
76     }
77 }
78
Popular Tags