KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > rm > resources > publishing > TemplateGroup


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19 package org.openharmonise.rm.resources.publishing;
20
21 import java.util.*;
22
23 import org.openharmonise.commons.dsi.*;
24 import org.openharmonise.rm.dsi.DatabaseInfo;
25 import org.openharmonise.rm.resources.xml.*;
26
27
28
29 /**
30  * Parent object to allow hierarchies of <code>Template</code> objects.
31  *
32  * @author Michael Bell
33  * @version $Revision: 1.2 $
34  *
35  */

36 public class TemplateGroup extends XMLResourceGroup {
37
38     //DB constants
39
private static final String JavaDoc TBL_TEMPLATEGROUP = "template_group";
40     
41     //XML constants
42
public static final String JavaDoc TAG_TEMPLATEGROUP = "TemplateGroup";
43     
44     private static List CHILD_CLASS_NAMES = null;
45
46     static {
47           DatabaseInfo.getInstance().registerTableName(TemplateGroup.class.getName(),TBL_TEMPLATEGROUP);
48     
49           try {
50               CHILD_CLASS_NAMES = new Vector();
51               CHILD_CLASS_NAMES.add(TemplateGroup.class.getName());
52               CHILD_CLASS_NAMES.add(Template.class.getName());
53         
54           } catch (Exception JavaDoc e) {
55               throw new RuntimeException JavaDoc(e.getMessage());
56           }
57       }
58
59     /**
60      * Basic empty constructor.
61      */

62     public TemplateGroup() {
63         super();
64     }
65
66     /**
67      * Constructs object with an interface to the DB.
68      *
69      * @param dbintrf
70      */

71     public TemplateGroup(AbstractDataStoreInterface dbintrf) {
72         super(dbintrf);
73     }
74
75     /**
76      * Constructor for a known historical object.
77      *
78      * @param dbintrf
79      * @param nId
80      * @param bIsHist
81      */

82     public TemplateGroup(
83         AbstractDataStoreInterface dbintrf,
84         int nId,
85         int nKey,
86         boolean bIsHist) {
87         super(dbintrf, nId, nKey, bIsHist);
88     }
89
90     /**
91      * Standard constructor for a known object.
92      *
93      * @param dbintrf
94      * @param nId
95      */

96     public TemplateGroup(AbstractDataStoreInterface dbintrf, int nId) {
97         super(dbintrf, nId);
98     }
99
100
101     /* (non-Javadoc)
102      * @see org.openharmonise.rm.dsi.DataStoreObject#getDBTableName()
103      */

104     public String JavaDoc getDBTableName() {
105         
106         return TBL_TEMPLATEGROUP;
107     }
108
109     /* (non-Javadoc)
110      * @see org.openharmonise.rm.publishing.Publishable#getTagName()
111      */

112     public String JavaDoc getTagName() {
113         return TAG_TEMPLATEGROUP;
114     }
115
116     /* (non-Javadoc)
117      * @see org.openharmonise.rm.resources.AbstractParentObject#getChildClassNames()
118      */

119     public List getChildClassNames() {
120         
121         return CHILD_CLASS_NAMES;
122     }
123
124 }
125
Popular Tags