KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > core > repository > IRuntimeElement


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11  * the license for the specific language governing your rights and limitations.
12  *
13  * @created Jul 7, 2005
14  * @author Marc Batchelor
15  *
16  */

17
18 package org.pentaho.core.repository;
19
20 import java.math.BigDecimal JavaDoc;
21 import java.util.Collection JavaDoc;
22 import java.util.Date JavaDoc;
23 import java.util.List JavaDoc;
24 import java.util.Map JavaDoc;
25 import java.util.Set JavaDoc;
26
27 public interface IRuntimeElement {
28     /**
29      * @return Returns the parent ID
30      */

31     public String JavaDoc getParentId();
32
33     /**
34      * @param parentId
35      * The parentId to set.
36      */

37     public void setParentId(String JavaDoc parentId);
38
39     /**
40      * @return Returns the parent Type
41      */

42     public String JavaDoc getParentType();
43
44     /**
45      * @param parentType
46      * The parent type to set
47      */

48     public void setParentType(String JavaDoc parentType);
49
50     /**
51      * @return Returns the instance Id
52      */

53     public String JavaDoc getInstanceId();
54
55     /**
56      * @param instanceId
57      * The instance Id to set
58      */

59     public void setInstanceId(String JavaDoc instanceId);
60
61     /**
62      * @return Returns the solution Id.
63      */

64     public String JavaDoc getSolutionId();
65
66     /**
67      * @param solutionId
68      * The solution Id to set
69      */

70     public void setSolutionId(String JavaDoc solutionId);
71
72     /**
73      * @return Returns the revision (updated by Hibernate)
74      */

75     public int getRevision();
76
77     /**
78      * Gets a string property from the Runtime Element.
79      *
80      * @param key
81      * The key of the property
82      * @return The value of the property, or NULL if the property doesn't exist.
83      */

84     public String JavaDoc getStringProperty(String JavaDoc key);
85
86     /**
87      * Gets a string property from the Runtime Element.
88      *
89      * @param key
90      * The key of the property
91      * @param defaultValue
92      * The value to return if the property doesn't exist
93      * @return The value of the property.
94      */

95     public String JavaDoc getStringProperty(String JavaDoc key, String JavaDoc defaultValue);
96
97     /**
98      * Sets a string property in the Runtime Element. Special implementation
99      * note - Null values aren't supported in the Map. So, if a null value is
100      * passed in, this implementation will remove the entry from the Runtime
101      * Element.
102      *
103      * @param key
104      * The key of the property to set
105      * @param value
106      * The value to associate with the key
107      */

108     public void setStringProperty(String JavaDoc key, String JavaDoc value);
109
110     /**
111      * Gets a BigDecimal property from the Runtime Element.
112      *
113      * @param key
114      * The key of the property
115      * @return The value of the property, or null if the property doesn't exist.
116      */

117     public BigDecimal JavaDoc getBigDecimalProperty(String JavaDoc key);
118
119     /**
120      * Gets a BigDecimal property from the Runtime Element.
121      *
122      * @param key
123      * The key of the property
124      * @param defaultValue
125      * The value to return if the property doesn't exist
126      * @return The value of the property, or defaultValue if the property
127      * doesn't exist.
128      */

129     public BigDecimal JavaDoc getBigDecimalProperty(String JavaDoc key, BigDecimal JavaDoc defaultValue);
130
131     /**
132      * Sets a BigDecimal property in the Runtime Element. Special implementation
133      * note - Null values aren't supported in the Map. So, if a null value is
134      * passed in, this implementation will remove the entry from the Runtime
135      * Element.
136      *
137      * @param key
138      * The key of the property to set
139      * @param value
140      * The value to associate with the key.
141      */

142     public void setBigDecimalProperty(String JavaDoc key, BigDecimal JavaDoc value);
143
144     /**
145      * Gets a Date property from the Runtime Element.
146      *
147      * @param key
148      * The key of the property
149      * @return The value of the property, or NULL if the property doesn't exist.
150      */

151     public Date JavaDoc getDateProperty(String JavaDoc key);
152
153     /**
154      * Gets a Date property from the Runtime Element.
155      *
156      * @param key
157      * The key of the property
158      * @param defaultValue
159      * The value to return if the property doesn't exist
160      * @return The value of the property, or defaultValue if the property
161      * doesn't exist.
162      */

163     public Date JavaDoc getDateProperty(String JavaDoc key, Date JavaDoc defaultValue);
164
165     /**
166      * Sets a Date property in the Runtime Element. Special implementation note -
167      * Null values aren't supported in the Map. So, if a null value is passed
168      * in, this implementation will remove the entry from the Runtime Element.
169      *
170      * @param key
171      * The key of the property to set
172      * @param value
173      * The value to associate with the key.
174      */

175     public void setDateProperty(String JavaDoc key, Date JavaDoc value);
176
177     /**
178      * Gets a Long property from the Runtime Element.
179      *
180      * @param key
181      * The key of the property
182      * @param defaultValue
183      * The value to return if the property doesn't exist
184      * @return The value of the property, or defaultValue if the property
185      * doesn't exist.
186      */

187     public Long JavaDoc getLongProperty(String JavaDoc key, Long JavaDoc defaultValue);
188
189     /**
190      * Gets a property from the paramMap as a long using a default value if it
191      * doesn't exist in the map
192      *
193      * @param key
194      * Key in the paramMap
195      * @param defaultValue
196      * The default value if the property doesn't exist in the
197      * paramMap.
198      * @return The property in the map.
199      */

200     public long getLongProperty(String JavaDoc key, long defaultValue);
201
202     /**
203      * Sets a Long property in the Runtime Element.
204      *
205      * @param key
206      * The key of the property to set
207      * @param value
208      * The value to associate with the key.
209      */

210     public void setLongProperty(String JavaDoc key, Long JavaDoc value);
211
212     /**
213      * Sets a Long property in the Runtime Element. Special implementation note -
214      * Null values aren't supported in the Map. So, if a null value is passed
215      * in, this implementation will remove the entry from the Runtime Element.
216      *
217      * @param key
218      * The key of the property to set
219      * @param value
220      * The value to associate with the key. Note - A new Long object
221      * is constructed and stored.
222      */

223     public void setLongProperty(String JavaDoc key, long value);
224
225     /**
226      * Gets a List property from the Runtime Element
227      *
228      * @param key
229      * The key of the property to get
230      * @return The list associated with the key, or NULL if it doesn't exist.
231      */

232     public List JavaDoc getListProperty(String JavaDoc key);
233
234     /**
235      * Gets a Map property from the Runtime Element Special implementation note -
236      * Null values aren't supported in the Map. So, if a null value is passed
237      * in, this implementation will remove the entry from the Runtime Element.
238      *
239      * @param key
240      * The key of the property to get
241      * @return The Map associated with the key, or NULL if it doesn't exist.
242      */

243     public Map JavaDoc getMapProperty(String JavaDoc key);
244
245     /**
246      * Sets a List Property in the Runtime Element
247      *
248      * @param key
249      * The key of the property to set
250      * @param value
251      * The List value to associate with the key.
252      */

253     public void setListProperty(String JavaDoc key, List JavaDoc value);
254
255     /**
256      * Sets a Map Property in the Runtime Element Special implementation note -
257      * Null values aren't supported in the Map. So, if a null value is passed
258      * in, this implementation will remove the entry from the Runtime Element.
259      *
260      * @param key
261      * The key of the property to set
262      * @param value
263      * The Map value to associate with the key.
264      */

265     public void setMapProperty(String JavaDoc key, Map JavaDoc value);
266
267     /**
268      * @return A string containing the XML representation of the Runtime Element
269      */

270     public String JavaDoc toXML();
271
272     /**
273      * @return Returns the loggingLevel.
274      */

275     public int getLoggingLevel();
276
277     /**
278      * @param allowableReadAttributeNames
279      * The names of the attributes that this process is allowed to
280      * read.
281      */

282     public void setAllowableAttributeNames(Collection JavaDoc allowableReadAttributeNames);
283
284     /**
285      * @return The set of currently defined parameter names
286      */

287     public Set JavaDoc getParameterNames();
288
289     /**
290      * Gets the type of the parameter
291      *
292      * @param name
293      * Parameter name
294      * @return String type of the parameter
295      */

296     public String JavaDoc getParameterType(String JavaDoc name);
297
298     public void setLoaded(boolean value);
299
300     public boolean getLoaded();
301
302     /**
303      * Causes an immediate call to the underlying persistence mechanism's
304      * write-now method. For Hibernate, this results in a call to
305      * HibernateUtil.flush().
306      */

307     public void forceSave();
308
309 }
310
Popular Tags