KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > model > ModelResolution


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.model;
8
9
10 /**
11  * <p>
12  * This class is the return value from the {@link
13  * ModelResolver#resolve(com.inversoft.verge.mvc.MVCRequest,
14  * String, java.util.Map) resolve} method on the {@link
15  * ModelResolver ModelResolver} class. This encapsulates
16  * the result of the model object lookup.
17  * </p>
18  *
19  * <p>
20  * It is important to remember that you can sub-class this
21  * Object to provide new values of the resolution. This is
22  * only a starting poing. In fact, each MVC model
23  * implementation could theoretically provide their own
24  * version of this class, although that could be overkill.
25  * </p>
26  *
27  * @author Brian Pontarelli
28  * @since 2.0
29  * @version 2.0
30  */

31 public class ModelResolution {
32
33     private Object JavaDoc model;
34     private MetaData metaData;
35
36
37     /**
38      * Construsts a new <code>ModelResolution</code> with the given model object
39      * and the given MetaData object that describes how the model object was
40      * resolved.
41      *
42      * @param model (Optional) The Model object resolved
43      * @param metaData (Optional) The MetaData that describes the model resolution
44      */

45     public ModelResolution(Object JavaDoc model, MetaData metaData) {
46         this.model = model;
47         this.metaData = metaData;
48     }
49
50
51     /**
52      * Returns the MetaData for this model object
53      *
54      * @return The MetaData for this model object
55      */

56     public MetaData getMetaData() {
57         return metaData;
58     }
59
60     /**
61      * Sets the MetaData for this model object
62      *
63      * @param metaData The MetaData
64      */

65     public void setMetaData(MetaData metaData) {
66         this.metaData = metaData;
67     }
68
69     /**
70      * Returns the model object
71      *
72      * @return The model object
73      */

74     public Object JavaDoc getModel() {
75         return model;
76     }
77
78     /**
79      * Sets the model object
80      *
81      * @param model The model object
82      */

83     public void setModel(Object JavaDoc model) {
84         this.model = model;
85     }
86 }
Popular Tags