1 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 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 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 getId() { return getContentCategoryId(); } 57 public Object getIdAsObject() { return getId(); } 58 59 public ContentCategoryVO getValueObject() { return valueObject; } 60 public void setValueObject(ContentCategoryVO c) { valueObject = c; } 61 62 public Integer getContentCategoryId() { return valueObject.getContentCategoryId(); } 63 public void setContentCategoryId(Integer i) { valueObject.setContentCategoryId(i); } 64 65 public String getAttributeName() { return valueObject.getAttributeName(); } 66 public void setAttributeName(String s) { valueObject.setAttributeName(s); } 67 68 public Integer getContentVersionId() { return valueObject.getContentVersionId(); } 69 public void setContentVersionId(Integer 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 |