1 package net.sourceforge.blogentis.utils.impl;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import java.util.List;
26
27 import org.apache.torque.TorqueException;
28 import org.apache.torque.util.Criteria;
29
30 import net.sourceforge.blogentis.om.BaseConfigurablePeer;
31 import net.sourceforge.blogentis.om.Blog;
32 import net.sourceforge.blogentis.om.StoredBlog;
33 import net.sourceforge.blogentis.utils.MappedConfiguration;
34
35 /***
36 * @author abas
37 */
38 public class BlogImpl
39 implements Blog {
40
41 protected StoredBlog blog = null;
42 protected MappedConfiguration configuration = null;
43
44 public BlogImpl(StoredBlog sb) {
45 blog = sb;
46 }
47
48 public int getBlogId() {
49 return blog.getBlogId();
50 }
51
52 public BaseConfigurablePeer getConfigurablePeer() {
53 return blog.getConfigurablePeer();
54 }
55
56 public String getDescription() {
57 return blog.getDescription();
58 }
59
60 public String getName() {
61 return blog.getName();
62 }
63
64 public List getSections()
65 throws TorqueException {
66 return blog.getSections();
67 }
68
69 public List getSections(Criteria criteria)
70 throws TorqueException {
71 return blog.getSections(criteria);
72 }
73
74 public String getTitle() {
75 return blog.getTitle();
76 }
77
78 public synchronized MappedConfiguration getConfiguration() {
79 if (configuration == null) {
80 configuration = new MappedConfiguration(blog);
81 }
82 return configuration;
83 }
84 }